How to implement (using C++ ) and a worst-case run-time analysis of the code ….

How to implement (using C++ ) and a worst-case run-time analysis of the code .
—————————————–
Consider a straight road with houses scattered very sparsely along it. You want to place cell phone base stations at certain points along the road, so that every houseis within four miles of one of the base stations. Give a greedy algorithm that achieves this goal, using as few base stations as possible. Compute the worst-caserun-time complexity of your algorithm and prove the optimality of the solution it gives.
Assume that the road is a straight line with a western end and an eastern end. The input would be the distance of each house from the western end. A sample input wouldbe:
House number 1, 2, 3, 4 ,5 ,6 ,7 ,8, 9 ,10, 11, 12, 13 ,14, 15
Distance 10, 36, 21, 30 ,47, 44, 16 ,31, 25, 54, 13, 39, 6 ,19, 53

Need your ASSIGNMENT done? Use our paper writing service to score better and meet your deadline.


Click Here to Make an Order Click Here to Hire a Writer