Keywords: Prim's algorithm proof.svg en Diagram to assist in proof of Prim's algorithm If <math>Y_1</math> is a minimum spanning tree and Y is the tree found by Prim's algorithm we find e the first edge added by the algorithm which is in <math>Y_1</math> but not in Y Let V be the vertices added to the tree up to that point Then we find a path in <math>Y_1</math> between the endpoints of e and find an edge f in that path with one endpoint in V Then <math>Y_1 - f + e</math> is also a minimum spanning tree and is in this case equal to Y In general more steps may be needed own User Dcoetzee 2013-11-14 Cc-zero Graph algorithms |