1 / 89

A Randomized Linear-Time Algorithm to Find Minimum Spanning Trees David R. Karger , Stanford

A Randomized Linear-Time Algorithm to Find Minimum Spanning Trees David R. Karger , Stanford Philip N. Klein, Brown Robert E. Tarjan , Princeton Presented By: Claire Le Goues Theory lunch August 14, 2008. Minimum Spanning Tree (MST).

atrim
Download Presentation

A Randomized Linear-Time Algorithm to Find Minimum Spanning Trees David R. Karger , Stanford

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Randomized Linear-Time Algorithm to Find Minimum Spanning Trees David R. Karger, Stanford Philip N. Klein, Brown Robert E. Tarjan, Princeton Presented By: Claire Le Goues Theory lunch August 14, 2008

  2. Minimum Spanning Tree (MST) • Definition: a subset of edges in an undirected, weighted graph such that all the vertices are touched by at least one of the edges and the combined weight of all the edges is minimal (the weight of this tree is 65)

  3. MST: Why? • Cable/phone line layouts • Airplane route scheduling • Electricity grids • …and so on. • Doing it quickly and efficiently is important!

  4. Previous (Deterministic) Approaches • Greedy algorithms, polynomial time: • Baruvka (1926) • Prim’s and Kruskal’s algorithms. • Better algorithms, O(nlogn): • Chazelle • Gabow et al. • etc

  5. Can we do better? SURE! (probabilistically) Introducing: RANDOMNESS

  6. A Sorting Digression • Quicksort (vs. Mergesort, for example) • Pick a random pivot point and recurse on parts. • If we pick the point properly, it’s much better! • But we need to know how/what to pick, and how to combine the subparts • KKT’s algorithm is analogous.

  7. Preliminaries: Cut and Cycle Properties • Cut property: For any proper nonempty subset X of the vertices, the lightest edge with exactly one endpoint in X belongs to the minimum spanning tree • Cycle property: For any cycle C in a graph, the heaviest edge in C does not appear in the minimum spanning tree

  8. More preliminaries • w(x,y) is the weight of the edge {x, y} • Where F is a forest in G, F(x,y) is the path connecting x and y in F, and wF(x,y) is the maximum weight of an edge on F(x,y) • An edge (x,y) is F-heavy if w(x,y)> wF(x,y) and F-light otherwise. • F-heavy edges don’t belong in an MST!

  9. F-Heavy Edges 3 B A 7 12 1 8 D 1 C

  10. F-Heavy Edges 3 B A 7 12 1 8 D 1 C

  11. F-Heavy Edges 3 B A w(B,D) = 12 7 12 1 8 D 1 C

  12. F-Heavy Edges 3 B A 7 12 1 8 D 1 C

  13. F-Heavy Edges 3 B A 7 Wf(B,D) = 8 12 1 8 D 1 C

  14. F-Heavy Edges 3 B A 12 > 8, So w(B,D) is F-Heavy! 7 12 1 8 D 1 C

  15. F-Heavy Edges 3 B A 7 12 1 8 D 1 C

  16. F-Heavy Edges 3 B A w(A,D) = 7 7 12 1 8 D 1 C

  17. F-Heavy Edges 3 B A wf(A,D) = 1 7 12 1 8 D 1 C

  18. F-Heavy Edges 3 B A 7 > 1, So w(A,D) is F-Heavy! 7 12 1 8 D 1 C

  19. F-Heavy Edges - The Final MST 3 B A 7 12 1 8 D 1 C

  20. One more thing: Boruvka Step • For each vertex v, select the minimum-weight edge incident to v. • The selected edges defined connected components; coalesce these components into single vertices. • Delete all resulting loops, isolated vertices, and all but the lowest-weight edge among each set of multiple edges.

  21. The Algorithm • STEP 1: Perform two Boruvka steps. • STEP 2: Choose a subgraph H by selecting each edge independently with probability 1/2. Apply the algorithm to the subgraph, producing a minimum spanning forest F of H. Throw away all F-heavy edges in the entire graph. • STEP 3: Recurse on the remaining graph to compute a spanning forest F’. Return edges contracted in STEP 1 along with the edges of F’

  22. 3 3 9 16 14 11 1 17 1 12 5 10 13 11 15 10 10 9 12 2 12 13 14 19 2 6 7 8 1 7 5 0 3 5 6 7 9 14 2 2 4 6 5 5 3 7 18 5 6 4 5 4 18 4 4 17 20 3

  23. 3 3 9 16 14 11 1 17 1 12 5 10 13 11 15 10 10 9 12 2 12 13 14 19 2 6 7 8 1 7 5 0 3 5 6 7 9 14 2 2 4 6 5 5 3 7 18 5 6 4 5 4 18 4 4 17 20 3

  24. 3 3 9 16 14 11 1 17 1 12 5 10 13 11 15 10 10 9 12 2 12 13 14 19 2 6 7 8 1 7 5 0 3 5 6 7 9 14 2 2 4 6 5 5 3 7 18 5 6 4 5 4 18 4 4 17 20 3

  25. 3 3 9 16 14 11 1 17 1 12 5 10 13 11 15 10 10 9 12 2 12 13 14 19 2 6 7 8 1 7 5 0 3 5 6 7 9 14 2 2 4 6 5 5 3 7 18 5 6 4 5 4 18 4 4 17 20 3

  26. 3 3 9 16 14 11 1 17 1 12 5 10 13 11 15 10 10 9 12 2 12 13 14 19 2 6 7 8 1 7 5 0 3 5 6 7 9 14 2 2 4 6 5 5 3 7 18 5 6 4 5 4 18 4 4 17 20 3

  27. 3 3 9 16 14 11 1 17 1 12 5 10 13 11 15 10 10 9 12 2 12 13 14 19 2 6 7 8 1 7 5 0 3 5 6 7 9 14 2 2 4 6 5 5 3 7 18 5 6 4 5 4 18 4 4 17 20 3

  28. 3 3 9 16 14 11 1 17 1 12 5 10 13 11 15 10 10 9 12 2 12 13 14 19 2 6 7 8 1 7 5 0 3 5 6 7 9 14 2 2 4 6 5 5 3 7 18 5 6 4 5 4 18 4 4 17 20 3

  29. 3 3 9 16 14 11 1 17 1 12 5 10 13 11 15 10 10 9 12 2 12 13 14 19 2 6 7 8 1 7 5 0 3 5 6 7 9 14 2 2 4 6 5 5 3 7 18 5 6 4 5 4 18 4 4 17 20 3

  30. 3 3 9 16 14 11 1 17 1 12 5 10 13 11 15 10 10 9 12 2 12 13 14 19 2 6 7 8 1 c 7 5 0 3 5 6 7 9 14 2 2 4 6 5 5 3 7 18 5 6 4 5 4 18 4 4 17 20 3

  31. 14 1 13 15 3 3 9 16 11 17 1 12 5 10 11 10 10 9 12 2 12 13 14 19 2 6 7 8 1 7 5 0 3 5 6 7 9 14 2 2 4 6 5 5 3 7 18 5 6 4 5 4 18 4 4 17 20 3

  32. 3 3 9 16 14 11 1 17 1 12 5 10 13 11 15 10 10 9 12 2 12 13 14 19 2 6 7 8 1 7 5 0 3 5 6 7 9 14 2 2 4 6 5 5 3 7 18 5 6 4 5 4 18 4 4 17 20 3

  33. 3 3 9 16 14 11 1 17 1 12 5 10 13 11 15 10 10 9 12 2 12 13 14 19 2 6 7 8 1 7 5 0 3 5 6 7 9 14 2 2 4 6 5 5 3 7 18 5 6 4 5 4 18 4 4 17 20 3

  34. 3 3 9 16 14 11 1 17 1 12 5 10 13 11 15 10 10 9 12 2 12 13 14 19 2 6 7 8 1 7 5 0 3 5 6 7 9 14 2 2 4 6 5 5 3 7 18 5 6 4 5 4 18 4 4 17 20 3

  35. 14 1 13 15 3 3 9 16 11 17 1 12 5 10 11 10 10 9 12 2 12 13 14 19 2 6 7 8 1 7 5 0 3 5 6 7 9 14 2 2 4 6 5 5 3 7 18 5 6 4 5 4 18 4 4 17 20 3

  36. 17 11, 12 14, 15 9 12 12 3 6 7 0,2,3,8,10,18 14 14 10 5 13 1, 9, 16 6 5 5 7 4 4,6,7,13,17 11 5, 19, 20 18

  37. 17 11, 12 (A) 14, 15 (C) 9 12 12 3 6 7 0,2,3,8,10,18 (B) 14 14 10 5 13 1, 9, 16 (D) 6 5 5 7 4 4,6,7,13,17 (E) 11 5, 19, 20 (F) 18

  38. A C 12 3 6 7 B 10 5 D 7 4 E F

  39. A C 12 3 6 7 B 10 5 D 7 4 E F

  40. A C 12 3 6 7 B 10 5 D 7 4 E F

  41. A C 12 3 7 B D 7 4 E F

  42. A C 12 3 7 B D 7 4 E F

  43. A C 12 3 7 B D 7 4 E F

  44. A C 12 3 7 B D 7 4 E F

  45. A B, C, D 7 E, F

  46. A B, C, D 7 E, F

  47. A B,C,D,E,F

  48. A C 12 3 6 7 B 10 5 D 7 4 E F

  49. A C 12 3 6 7 B 10 5 D 7 4 E F

  50. A C 6 B 10 5 D E F

More Related