Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

There is a long, straight pipeline with critical monitoring devices attached to it that you want to be able to be able to repair in

  1. There is a long, straight pipeline with critical monitoring devices attached to it that you want to be able to be able to repair in an emergency. In order to be able to repair them there needs to be an access road that runs up to the pipeline and is within 2 miles (comfortable walking distance) along the pipeline of each monitoring device. Suppose the monitoring devices are at integer distances m(1), ,m(n) from the beginning of the pipeline. Assume that m(i) < m(i+1) for all i from 1 to n-1. You want to determine the number and locations of the access roads that you have to build and maintain. Since the access roads are very expensive you want to build the smallest number of access roads possible. a. How does your algorithm determine where the next road is placed. A simple one line description but be specific. No pseudo code required.
  2. b. Explain briefly why your algorithm is O( number of devices).
  3. c. Prove your algorithm always finds the optimal solution. Use the notation DG[j] for the j the device location chosen by the greedy algorithm and D*[j] for a presumed optimal solution.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic Net Database Programming

Authors: Rod Stephens

1st Edition

0789726815, 978-0789726810

More Books

Students also viewed these Databases questions

Question

f. Did they change their names? For what reasons?

Answered: 1 week ago