Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chu-Liu/Edmonds’ Algorithm an introduction

Similar presentations


Presentation on theme: "Chu-Liu/Edmonds’ Algorithm an introduction"— Presentation transcript:

1 Chu-Liu/Edmonds’ Algorithm an introduction
Qingxia Liu 2019/2/24

2 A Quick Glance Chu-Liu/Edmonds’ Algorithm Contributors input output
a weighted directed graph G(V,E) root r (reachable to every vertex of G) output a minimum spanning tree of G rooted at r Contributors Yoeng-jin Chu and Tseng-hong Liu (1965) Edmonds(1967) Bock(1971) Tarjan(1977): O(ElogV), O(V2) Gabow(1986): O(E+VlogV) ……

3 Basic Concepts Minimum Spanning Tees in directed graphs
a spanning tree rooted at r a set of n-1 edges containing paths from r to every vertex of minimum total edge cost MINT ∑(u,v)∈T c(u,v)

4 Chu-Liu/Edmonds Algorithm
Construct original S discard entering edges of r For i∈V\{r}, select the edge (k,i) of mink c(k,i) Let the selected n-1 edges be the set S. If no cycle formed, G(N,S) is a MST. Otherwise, deal with cycle.

5 Chu-Liu/Edmonds Algorithm
Deal with Cycle For each cycle formed contract the cycle into a pseudo-node (k) for each edge(i,j) (i∈V\cycle, j∈cycle) modify the cost: c(i,k)=c(i,j)-c(x(j),j) for each pseudo-node select the entering arc which has the smallest modified cost replace the arc which enters the same real node in S by the new selected arc. If no cycle formed, G(N,S) is a MST. else deal with cycle O(E) time where c(x(j),j) is the cost of the arc in the cycle which enters j. find the replacing arc(s) which has the minimum extra cost to eliminate cycle(s) if any

6 Example Construct original S 1 10 8 5 6 4 7 3 11 9
2 3 4 5 10 11 9 7 8 1 1 5 2 3 6 4 where c(x(j),j) is the cost of the arc in the cycle which enters j. find the replacing arc(s) which has the minimum extra cost to eliminate cycle(s) if any 5 4 3 6

7 Example Cycle Contract k 10 11 9 7 8 10 11 9 7 8 1 5 6 4 3
2 3 4 5 10 11 9 7 8 1 6 2 3 4 5 10 11 9 7 8 1 1 5 2 k 3 6 4 where c(x(j),j) is the cost of the arc in the cycle which enters j. find the replacing arc(s) which has the minimum extra cost to eliminate cycle(s) if any 5 4 3 6

8 Example Edge Replacing modify cost: c(i,k) = c(i,3)-c(4,3)
or c(i,4)-c(5,4) or c(i,5)-c(3,4)) Edge Replacing 1 6 2 3 4 5 10 11 9 7 8 1 1 1 5 1 6 2 2 4 5 3 3 6 6 4 7 where c(x(j),j) is the cost of the arc in the cycle which enters j. find the replacing arc(s) which has the minimum extra cost to eliminate cycle(s) if any 5 5 4 4 3 3 5 2 6 6 6

9 Example Minimum Spanning Tree ∑(u,v)∈T c(u,v)=23 10 11 9 7 8 10 11 9 7
6 2 3 4 5 10 11 9 7 8 1 6 2 3 4 5 10 11 9 7 8 where c(x(j),j) is the cost of the arc in the cycle which enters j. find the replacing arc(s) which has the minimum extra cost to eliminate cycle(s) if any

10 Implementation Tarjan (1977) O(mlogn)
Camerini et.al.(1979) repaired an error where c(x(j),j) is the cost of the arc in the cycle which enters j. find the replacing arc(s) which has the minimum extra cost to eliminate cycle(s) if any

11 Implementation Tarjan (1977)
First step: of any vertex v, choose the edge (u,v) of largest value among its entering edges, add to set H General step: for each root component S in G(H) find the largest unexamined entering edge (u,v) (v∈S) if u∈S, discard the edge; else, let W be the weakly connected component of G(H) that v∈W. if u∈W, add (u,v) to H; root component: no entering edge

12 Implementation Tarjan (1977) Disjoint Set Priority Queue
else u∉S, u∈W, find the cycle c(between S1……Sk) formed by (u,v), let (i,j) be the minimum edge on the cycle, modify unexamined edge (x,y) y∈Si as c(x,y)=c(x,y)-c(a,y’)+c(i,j) add (u,v) to H Disjoint Set record weakly/strongly connected component Priority Queue keep track of entering edges of each strongly connected compnent root component: no entering edge

13 Implementation Gabow (1986) O(nlogn+m) improvement on the first phase:
depth-first strategy: growth path root component: no entering edge

14 References Tarjan, Robert Endre. "Finding optimum branchings." Networks 7.1 (1977): H. N. Gabow, Z. Galil, T. Spencer, and R. E. Tarjan, “Efficient algorithms for finding minimum spanning trees in undirected and directed graphs,” Combinatorica 6 (1986), Camerini, Paolo M., Luigi Fratta, and Francesco Maffioli. "A note on finding optimum branchings." Networks 9.4 (1979):

15 Thank You ~ Any questions?

16 Basic Concepts Branching Optimum Branching
a branching B of G is a set of edges such that each vertex has at most one in-degree if (x1,y1),(x2,y2) are distinct edges of B, then y1 != y2 no cycle Optimum Branching a branching that ∑(u,v)∈B c(u,v) is maximum/minimum

17 Example Minimum Spanning Tree ∑(u,v)∈T c(u,v)=23 10 11 9 7 8 10 11 9 7
6 2 3 4 5 10 11 9 7 8 1 6 2 3 4 5 10 11 9 7 8 where c(x(j),j) is the cost of the arc in the cycle which enters j. find the replacing arc(s) which has the minimum extra cost to eliminate cycle(s) if any


Download ppt "Chu-Liu/Edmonds’ Algorithm an introduction"

Similar presentations


Ads by Google