Questions: Minimum Spanning Trees: Kruskal's and Prim's Algorithms

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

After running Kruskal's algorithm on a connected weighted graph, you notice it selected an edge that was NOT the globally lightest edge in the graph. Which statement best explains why this is still correct?

AKruskal's algorithm makes mistakes and may not produce a true MST
BThe cut property guarantees the cheapest edge crossing any partition must be in some MST, so skipping an edge due to cycle detection is always safe
CAny spanning tree is an MST if it uses V-1 edges
DThe globally lightest edge was included earlier, so this selection is a replacement
Question 2 Multiple Choice

Prim's algorithm and Dijkstra's algorithm look structurally similar — both use a priority queue and greedily select the minimum-cost next step. What is the key difference in what they are minimizing?

APrim's minimizes total path distance from the source; Dijkstra's minimizes tree weight
BPrim's minimizes the weight of the single edge connecting a new vertex to the growing tree; Dijkstra's minimizes the cumulative path cost from the source
CPrim's works on undirected graphs; Dijkstra's requires directed graphs
DThere is no meaningful difference — they produce the same result on the same graph
Question 3 True / False

An MST guarantees the shortest path between nearly every pair of vertices in the graph.

TTrue
FFalse
Question 4 True / False

Kruskal's algorithm can produce a minimum spanning forest (rather than a single tree) if applied to a disconnected graph.

TTrue
FFalse
Question 5 Short Answer

Explain why both Kruskal's and Prim's algorithms are guaranteed to produce a minimum spanning tree, despite using completely different strategies.

Think about your answer, then reveal below.