Standard 12: Greedy Algs 3: Minimum Spanning Tree


Short description: Apply definition of MST; execute Prim’s and Kruskal’s algorithms; identify complexity.

Relevant notes: Topic D: Greedy Algorithms.

Full description

Apply the definition of Minimum Spanning Tree. Execute greedy MST algorithms on examples; recall the complexity of Prim's algorithm.

Example problem

Part a.

Execute Prim's algorithm on the following graph, starting from $u$. Give the state of the algorithm at each round.

wt(u,v) = 11, wt(u,w) = 8, wt(v,w) = 7, wt(v,x) = 9, wt(w,x) = 3, wt(x,y) = 5

Part b.

Imagine a connected graph on $n$ vertices with $n$ edges. Your friend suggests that a minimum spanning tree can always be found by removing the highest-weight edge. Are they correct? Prove/disprove.

Sample solution

Sample solution.

Part a.

Roundbest_weight(u)vwxyvertex poppededge added
10$\infty$$\infty$$\infty$$\infty$uN/A
20118$\infty$$\infty$w$\{u,w\}$
30783$\infty$x$\{w,x\}$
407835y$\{x,y\}$
507835v$\{w,v\}$ .

Part b.

No. Let's suppose there is a cylce of $n-1$ vertices, and one of them is connected to the $n$th vertex by a single edge, which is the highest-weight edge in the graph. That edge has to be part of the minimum spanning tree, as otherwise the graph is disconnected.

Rubric

Rubric.

To pass, a solution must pass both parts.

To pass, a solution must follow the course requirements for writing, and for proofs in Part b.

For Part a, a solution must clearly present the best_weight array at each round and which vertex is popped. It must be correct, up to inconsequential details such as numbering the rounds starting from zero. For Part b, a solution must give a clear family of counterexamples and correctly prove that they are counterexamples.

The numerical rubric for this problem is: