Question
Hospitals on a road: You are given villages situated along a highway. Let x 1, x 2, x 3 .... x n represent the positions
Hospitals on a road: You are given villages situated along a highway. Let x1, x2,x3 .... xn represent the positions of these villages on the highway (the highway is a straight line). We need to build hospitals in k of these villages. Let di denote the distance from the i-th village to the nearest hospital, and let be the sum of these distances. Our goal is to minimize D.
(a) Give an efficient algorithm to solve the problem fork = 1 and explain why it works. (Hint: Median) (3 pts)
(b) Consider an optimum placement for some k. Prove that thisoptimum
solution can be viewed as consisting of two optimum solutionsfor smaller problems,
where one problem is optimum placement of k - 1hospitals to cover some villages
and the other problem is placing a single hospital to cover therest of the villages.
State the "smaller problems" completely. (4 pts)
(c) Give a polynomial time algorithm to find the smallestpossible value of D
for a given k. (3 pts.)
D= D = i=1 di
Step by Step Solution
3.45 Rating (152 Votes )
There are 3 Steps involved in it
Step: 1
A a An efficient algorithm to solve the problem for k 1 is to find the median of the villages on the ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started