Suppose you are in Canada's Thousand Islands National Park, and in one particular lake there are n small islands that park officials want to connect with floating bridges so that people can experience going between islands without a canoe. The cost of constructing a bridge is proportional to its length. Assume the distance between every pair of islands is given to you as a two dimensional matrix (an example of such a table for n = 8 islands is shown below). A B C Ꭰ E F G H A 240 210 340 280 200 345 120 B 240 265 175 215 180 185 155 C 210 265 - 260 115 350 435 195 Ꭰ 340 175 260 160 330 295 230 E 280 215 115 160 360 400 170 F 200 180 350 330 360 175 205 G 345 185 435 295 400 175 305 H 120 155 195 230 170 205 305 Design an algorithm for determining which bridges they should build to connect the islands at minimal cost. Write down the pseudocode and explain why your algorithm correctly computes the set of bridges of minimal cost. Analyze the runnning time of your algorithm.
Suppose you are in Canada's Thousand Islands National Park, and in one particular lake there are n small islands that park officials want to connect with floating bridges so that people can experience going between islands without a canoe. The cost of constructing a bridge is proportional to its length. Assume the distance between every pair of islands is given to you as a two dimensional matrix (an example of such a table for n = 8 islands is shown below). A B C Ꭰ E F G H A 240 210 340 280 200 345 120 B 240 265 175 215 180 185 155 C 210 265 - 260 115 350 435 195 Ꭰ 340 175 260 160 330 295 230 E 280 215 115 160 360 400 170 F 200 180 350 330 360 175 205 G 345 185 435 295 400 175 305 H 120 155 195 230 170 205 305 Design an algorithm for determining which bridges they should build to connect the islands at minimal cost. Write down the pseudocode and explain why your algorithm correctly computes the set of bridges of minimal cost. Analyze the runnning time of your algorithm.
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 1 steps