Recall & Review
beginner
What is a Minimum Spanning Tree (MST)?
A Minimum Spanning Tree is a subset of edges in a connected, weighted graph that connects all vertices together without any cycles and with the minimum possible total edge weight.
Click to reveal answer
beginner
What is the main idea behind Prim's Algorithm?
Prim's Algorithm builds the MST by starting from any vertex and repeatedly adding the smallest edge that connects a vertex in the MST to a vertex outside it until all vertices are included.
Click to reveal answer
beginner
In Prim's Algorithm, how do we choose the next edge to add?
We choose the edge with the smallest weight that connects a vertex already in the MST to a vertex not yet included.
Click to reveal answer
intermediate
What data structure is commonly used to efficiently select the next edge in Prim's Algorithm?
A priority queue (often implemented as a min-heap) is used to quickly find and extract the edge with the smallest weight.
Click to reveal answer
intermediate
Why does Prim's Algorithm always produce a Minimum Spanning Tree?
Because it always picks the smallest edge connecting the growing MST to a new vertex, ensuring no cycles and minimal total weight by the greedy choice property.
Click to reveal answer
What does Prim's Algorithm start with?
✗ Incorrect
Prim's Algorithm starts from any single vertex and grows the MST by adding edges.
Which data structure helps Prim's Algorithm pick the next smallest edge efficiently?
✗ Incorrect
A priority queue (min-heap) is used to efficiently select the smallest edge.
Prim's Algorithm is an example of which type of algorithm?
✗ Incorrect
Prim's Algorithm uses a greedy approach by always choosing the smallest edge.
What condition must the graph satisfy for Prim's Algorithm to work correctly?
✗ Incorrect
Prim's Algorithm requires the graph to be connected to reach all vertices.
What does Prim's Algorithm add to the MST at each step?
✗ Incorrect
At each step, Prim's Algorithm adds the smallest edge connecting the MST to a new vertex.
Explain how Prim's Algorithm builds a Minimum Spanning Tree step-by-step.
Think about growing the tree one edge at a time by choosing the smallest connecting edge.
You got /4 concepts.
Describe why Prim's Algorithm guarantees the minimum total weight for the spanning tree.
Focus on how choosing the smallest edge at each step leads to overall minimum weight.
You got /4 concepts.