Transcription of Lecture 7: Minimum Spanning Trees and Prim’s Algorithm
{{id}} {{{paragraph}}}
Lecture7:MinimumSpanningTreesandPrim s AlgorithmCLRSC hapter23 OutlineofthisLecture Spanningtreesandminimumspanningtrees. Theminimumspanningtree(MST)problem. Thegeneric algorithmforMSTproblem. Prim s algorithmfortheMSTproblem. Thealgorithm Correctness Implementation+ RunningTime1 SpanningTreesSpanningTrees:Asubgraph of a undirectedgraph is aspanningtreeof if it is a treeandcontainsevery vertex of .Example: abcdeabcdeabcdeabcdeGraphspanningtree1sp anningtree2spanningtree32 SpanningTreesTheorem:Every connectedgraphhasa :Why is thistrue?Question:Givena connectedgraph , how canyoufinda spanningtreeof ?3 WeightedGraphsWeightedGraphs:A weightedgraphis a graph,inwhicheachedgehasa weight(somerealnumber).Weightofa : abcdeabcdeabcdeabcde10973223103223977932 23322310weightedgraphTree2, w=71 Tree3, w= anundirectedconnectedweightedgraphis a spanningtreeofminimumweight(amongallspan ningtrees).
Minimum Spanning Tree Problem MST Problem: Given a connected weighted undi-rected graph , design an algorithm that outputs a minimum spanning tree (MST) of . Question: What is most intuitive way to solve? Generic approach: A tree is an acyclic graph. The idea is to start with an empty graph and try to add
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document:
{{id}} {{{paragraph}}}