Skip to content

Kruskal's cheapest links

networks

Level 2 of 3

Also called Kruskal's algorithm and Minimum spanning forest.

fresh numbers

The test's questions that a run answers, asked again on new numbers whenever you like. The answer, its working and the reason for every other choice come from kruskal's cheapest links's own run on the numbers shown.

choose one

question 1

Kruskal's method runs on this map. What do the roads kept add up to?

1286947AABBCCEEFFGG
the answer, and why

the answer is D

A-B 1, A-E 2, C-G 4, B-F 6, F-G 7 are kept, which is 20. E-F and B-C would close loops.

if you chose another

  • That adds every road on the map.
  • That stops after 4 roads, leaving C and G cut off from the rest.
  • That takes E-F 8 for F-G 7, but E-F closes a loop, and C and G stay cut off from the rest.

new numbersthe test page's numbers

question 2

On this map, what do the roads kept add up to once 3 are kept?

9143268AABBCCEEFFGG
the answer, and why

the answer is B

A-E 1, B-C 2 and B-F 3 come first, and each joins two groups. That is 6.

if you chose another

  • That is 4 roads, with E-F's 4 added.
  • That is A-B's 9 alone, which comes later and is left out.
  • That takes A-B's 9 in place of B-C's 2.

new numbersthe test page's numbers

question 3

The roads come in the order written. On which map does the sort make the most comparisons?

the answer, and why

the answer is B

Sorting the roads of C-G 6, G-H 8, C-F 1, C-H 2, B-C 6, B-F 1 makes 9 comparisons, the most of the four.

if you chose another

  • That map's sort makes no comparison, fewer than 9.
  • That map's sort makes 4 comparisons, fewer than 9.
  • That map's sort makes no comparison, fewer than 9.

new numbersthe test page's numbers