150 likes | 480 Views
Min-cut for Undirected Graphs. Given an undirected graph, a global min-cut is a cut (S,V-S) minimizing the number of crossing edges , where a crossing edge is an edge ( u,v ) s.t. u ∊S and v∊ V-S. S. V - S. Graph Contraction.
E N D
Min-cut for Undirected Graphs Given an undirected graph, a global min-cut is a cut (S,V-S) minimizing the number of crossing edges, where a crossing edge is an edge (u,v) s.t.u∊S and v∊ V-S. S V - S
Graph Contraction For an undirected graph G, we can construct a new graph G’ by contracting two vertices u, v in G as follows: u and v become one vertex{u,v} and the edge (u,v) is removed; the other edges incident to u or v in G are now incident on the new vertex {u,v} in G’; Note: There may be multi-edges between two vertices. We just keep them. b a b a v u {u,v} e d c e d c Graph G Graph G’
Karger’s Min-cut Algorithm CD C C contract B B B D D A A contract A (i) Graph G (ii) Contract nodes C and D (iii) contract nodes A and CD ACD Note: C is a cut but not necessarily a min-cut. B (Iv)Cut C={(A,B), (B,C), (B,D)} C is a cut, but not necessarily a min-cut.
Karger’s Min-cut Algorithm For i = 1 to 100n2 repeat randomly pick an edge (u,v) contract u and v until two vertices are left ci← the number of edges between them Output mini ci
Analysis Fact 1: If degree(u) denotes the number of edges touching node u, then Proof: easy Fact 2: If there are n nodes, then the average degree of a node is 2|E |/n. Proof: This is a straightforward calculation: when you pick a node X at random,
Analysis Cont. Fact 3:The size of the minimum cut is at most 2|E |/n. Proof: Consider the partition of V into two pieces, one containing a single node u, and the other containing the remaining n - 1 nodes. The size of this cut is degree(u). Since this is a valid cut, the minimum cut cannot be bigger than this. In other words, for all nodes u, (size of minimum cut) <= degree(u). This means that the size of the minimum cut is also <= the average degree, which we’ve seen is 2|E |/n.
Analysis Cont. Fact 4:If an edge is picked at random, the probability that it lies across the minimum cut is at most 2/n. Proof: Follow Class Lecture