In ancient times, messages were sometimes transmitted using smoke or fire signal
ID: 659494 • Letter: I
Question
In ancient times, messages were sometimes transmitted using smoke or fire signals. A fire was lit on a tower and the smoke was seen up to 10 miles away. To communicate over longer distances, a relay station would pick up the signal and then light another fire. Assume you want to build a communication network of this type on a group of islands shown below (left). Your goal is to reach all islands with a minimum number of towers. The right graph contains an edge between each pair of islands whose distance is less than 10 miles.
Describe a greedy algorithm that finds a solution to this problem, taking a graph (such as the one in the figure) as an input. What is the running time of your algorithm? Which solution does your algorithm find? Show an example map and graph on which the greedy algorithm will not find an optimal solution
Explanation / Answer
Running time will be 1.5 minis.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.