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.

icon
Related questions
Question
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.
Transcribed Image Text: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.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 1 steps

Blurred answer