Question: ONLY THE WORD EXPLANATION NEEDED NO CODE PLEASE. Also include PSEUDOCODE - ( pointers are not allowed ) You are consulting for an oil company,
ONLY THE WORD EXPLANATION NEEDED NO CODE PLEASE. Also include PSEUDOCODE pointers are not allowed
You are consulting for an oil company, which is planning a large
pipeline called the huge pipeline running horizontally from east to west through an oil field of n wells. From each well, a spur pipeline is to be connected directly to the main pipeline along a shortest path going to either the north or the south Suppose that there are n wells, represented by n points p p pn in the plane. We are given the x and ycoordinates of the n wells pi xi yi for i n Note that the wells are not given in any sorted order. Our goal is to pick an optimal location for the main pipeline ie find the ycoordinate of the main pipeline such that the total sum of the lengths of the spur pipelines is minimized. For simplicity, we assume that no two wells have the same xcoordinate or ycoordinate.
Design an On time algorithm to compute an optimal location for the main pipeline. The answer is not the median of the sorted ycoordinates
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
