Lecture 1: Contraction Algorithm

Similar documents
Chapter 11. Min Cut Min Cut Problem Definition Some Definitions. By Sariel Har-Peled, December 10, Version: 1.

Lecture 12: Introduction to Spectral Graph Theory, Cheeger s inequality

Lecture 9: Low Rank Approximation

Lecture 8: Path Technology

Lecture 9: Counting Matchings

Lecture 9: SVD, Low Rank Approximation

Lecture 13: Spectral Graph Theory

Lecture 4: Hashing and Streaming Algorithms

Theorem 1.7 [Bayes' Law]: Assume that,,, are mutually disjoint events in the sample space s.t.. Then Pr( )

Lecture 16: Roots of the Matching Polynomial

Lecture 2: January 18

Quick Sort Notes , Spring 2010

Lecture 7: Schwartz-Zippel Lemma, Perfect Matching. 1.1 Polynomial Identity Testing and Schwartz-Zippel Lemma

Minimum Cut in a Graph Randomized Algorithms

Algortithms for the Min-Cut problem

2.1 Laplacian Variants

Lecture 1 and 2: Random Spanning Trees

Lecture 19: November 10

Randomized Algorithms III Min Cut

Lecture 14: Random Walks, Local Graph Clustering, Linear Programming

FINAL EXAM PRACTICE PROBLEMS CMSC 451 (Spring 2016)

More Asymptotic Analysis Spring 2018 Discussion 8: March 6, 2018

CMPUT 675: Approximation Algorithms Fall 2014

CSC 344 Algorithms and Complexity. Proof by Mathematical Induction

Lecture 6 September 21, 2016

MATH3283W LECTURE NOTES: WEEK 6 = 5 13, = 2 5, 1 13

Lecture 6. Today we shall use graph entropy to improve the obvious lower bound on good hash functions.

Lecture: Modeling graphs with electrical networks

25.1 Markov Chain Monte Carlo (MCMC)

CMSC 451: Lecture 7 Greedy Algorithms for Scheduling Tuesday, Sep 19, 2017

Topic 4 Randomized algorithms

Network Design and Game Theory Spring 2008 Lecture 6

25 Minimum bandwidth: Approximation via volume respecting embeddings

CS383, Algorithms Spring 2009 HW1 Solutions

Lecture 17: D-Stable Polynomials and Lee-Yang Theorems

Lecture 24: April 12

MA015: Graph Algorithms

Math 239: Discrete Mathematics for the Life Sciences Spring Lecture 14 March 11. Scribe/ Editor: Maria Angelica Cueto/ C.E.

Graph coloring, perfect graphs

CSE 421 Greedy Algorithms / Interval Scheduling

1 Closest Pair of Points on the Plane

1 Matchings in Non-Bipartite Graphs

Lecture 1: Introduction: Equivalence of Counting and Sampling

b + O(n d ) where a 1, b > 1, then O(n d log n) if a = b d d ) if a < b d O(n log b a ) if a > b d

Lecture 12: Interactive Proofs

Lecture 2 Sep 5, 2017

Topic: Sampling, Medians of Means method and DNF counting Date: October 6, 2004 Scribe: Florin Oprea

COS597D: Information Theory in Computer Science October 5, Lecture 6

Compute the Fourier transform on the first register to get x {0,1} n x 0.

Algorithms Exam TIN093 /DIT602

17.1 Correctness of First-Order Tableaux

CS 6820 Fall 2014 Lectures, October 3-20, 2014

Random Walks and Evolving Sets: Faster Convergences and Limitations

Lecture 2 (Limits) tangent line secant line

Lecture 7: Dynamic Programming I: Optimal BSTs

Lecture 8: Linear Algebra Background

CSE 4502/5717: Big Data Analytics

Lecture 10: Powers of Matrices, Difference Equations

GRAPH PARTITIONING USING SINGLE COMMODITY FLOWS [KRV 06] 1. Preliminaries

Chapter 4: Constant-degree Polynomial Partitioning

Measure Theory and Lebesgue Integration. Joshua H. Lifton

DR.RUPNATHJI( DR.RUPAK NATH )

CSE 311: Foundations of Computing. Lecture 14: Induction

A short course on matching theory, ECNU Shanghai, July 2011.

Sum of Squares. Defining Functions. Closed-Form Expression for SQ(n)

1. When applied to an affected person, the test comes up positive in 90% of cases, and negative in 10% (these are called false negatives ).

Decomposing oriented graphs into transitive tournaments

CSE373: Data Structures and Algorithms Lecture 2: Proof by Induction. Linda Shapiro Spring 2016

CHAPTER 8: EXPLORING R

Theoretical Cryptography, Lecture 10

Lecture 10: Duality in Linear Programs

1 Matroid intersection

Topic: Primal-Dual Algorithms Date: We finished our discussion of randomized rounding and began talking about LP Duality.

CPSC 536N: Randomized Algorithms Term 2. Lecture 9

Sequences of height 1 primes in Z[X]

The Strong Largeur d Arborescence

Epsilon-Delta Window Challenge Name Student Activity

Asymptotic Analysis and Recurrences

6.842 Randomness and Computation March 3, Lecture 8

N/4 + N/2 + N = 2N 2.

Partitions and Covers

1 Ways to Describe a Stochastic Process

Lecture 5: Probabilistic tools and Applications II

BEST TESTS. Abstract. We will discuss the Neymann-Pearson theorem and certain best test where the power function is optimized.

Aditya Bhaskara CS 5968/6968, Lecture 1: Introduction and Review 12 January 2016

Discrete Mathematics. The average degree of a multigraph critical with respect to edge or total choosability

2.1 Optimization formulation of k-means

the time it takes until a radioactive substance undergoes a decay

Shortest paths with negative lengths

CSE 548: Analysis of Algorithms. Lectures 18, 19, 20 & 21 ( Randomized Algorithms & High Probability Bounds )

Analysis of Algorithms CMPSC 565

Lecture 5 January 16, 2013

Lecture 5: January 30

Lecture 28: April 26

Lecture 8 - Algebraic Methods for Matching 1

Notes on uniform convergence

Topic: Balanced Cut, Sparsest Cut, and Metric Embeddings Date: 3/21/2007

1 Examples of Weak Induction

A note on three water cups

Chapter 11 - Sequences and Series

Transcription:

CSE 5: Design and Analysis of Algorithms I Spring 06 Lecture : Contraction Algorithm Lecturer: Shayan Oveis Gharan March 8th Scribe: Mohammad Javad Hosseini Disclaimer: These notes have not been subjected to the usual scrutiny reserved for formal publications. In the first few lectures, we will study several randomized algorithms for various optimization tasks. We start with a simple randomized algorithm to find the min-cut of a graph. The algorithm is introduce by David Karger [Kar93]. Then, we show an algorithm with improved running time by Karger and Stein [KS93].. Karger algorithm for the min-cut problem Suppose we have a graph G = (V, E). If we partition the graph to (S, S), E(S, S) are the edges that have one end-point in each partition (See Figure.). The min-cut problem is the find a -partition (or a cut) with minimum number of edges, i.e., min E(S, S). S Figure.: Partitioning of a graph Karger s Algorithm Do the following n times: Pick an edge in the graph uniformly at random and contract it (delete the loops). In the following figure, contracting the edges in the specified order, will find the min-cut. Note that in this case, we were lucky and did not contract the edges that were in the min-cut. Figure.: Illustration of Karger s algorithm [source: https://en.wikipedia.org/wiki/karger s algorithm] In order to further understand the algorithm, we can think of its connection to clustering. Say you have K clusters such that most of the edges are inside the clusters. If we run Karger s Algorithm, at the time we have K super-nodes, we can consider them as the clusters. Note that since there are a few edges between the clusters, the algorithm is more likely to contract intra cluster edges (as opposed to the inter-cluster edges. Theorem.. For any min-cut (S, S), Karger s algorithm returns (S, S) w.p at least ( n ) = n(n ). -

- Lecture : Contraction Algorithm Proof. First, observe that the algorithm succeeds if we do not contract any edges of the min-cut in all steps of the algorithm. Secondly, observe that no matter which edges we contract, the value of the minimum cut never decreases in the entire run of the algorithm. Let s say the value of the min-cut is C. Let A i be the event that we contract an edge of min-cut at step i. Note that at the step i, if we have not touched any of the edges in the min-cut, each node has at C incident edges. Therefore, at the end of step i the graph has at least (n i)c/ edges. We can write, P [A ] = C E C nc/ = n C P [A A ] (n )C/ = n... P [A n A,..., A n 3 ] C (3)C/ = 3 (.) Therefore, we have: P [success] = P [ n ] ( A i ) i= = P [ A ] P [ A A ]... P [ A n A,..., A n 3 ] ( n )( n )... ( 3 ) = n n 3 n 4 n n n... 3 = n(n ) This completes the proof of Theorem.. Corollary.. Any graph has at most ( n ) min-cuts. We should also note that the bound is tight for cycles... Boosting up the probabilities We can run independent copies of the algorithm to boost up the probabilities: Run Karger s algorithm K times and return the min cut found in all of these runs. Observe that this method will succeed w.p. ( ( n ) )K. We know that in general x exp( x). Therefore, we have: ( ( n )) K exp( K ( n ). (.) ) If we choose K n, we have P (success) n. (.3)

Lecture : Contraction Algorithm -3 We say an event happens with high probability, if the probability converges to as the size of the problems goes to infinity. By the above calculation, for K n, the algorithm succeeds with high probability. Note that for each of the independent runs, the running time is O(n ). Therefore, the total running time is O(n 4 ), which is slow! In the next section we see a nice idea to improve the running time to O(n log 3 n).. Improving the running time: Karger-Stein Algorithm (996) Theorem.3 ([KS93]). There is an algorithm that runs in O(n 3 ) and finds the min-cut with high probability. The idea of the algorithm is quite simple. First, observe that for any l, [ n l ] ( l P = ( ) n ). So, for l = n/, the cut (S, S) remains after n l steps with probability at least l(l ) n(n ) i= (n/ ) (n = /. In other words, the algorithm is doing a very good job in the first constant fraction of contraction steps. Only when we get down to a graph with a few nodes the probability of success decreases rapidly. The idea is motivated from fault tolerance applications. If we have a system that fails with probability p, we should keep at least /p copies of our system to ensure that at least one copy remains safe in expectation. That is exactly the idea of the Karger, Stein algorithm. We run two copies of the contraction algorithm for n n/ steps because the probability of failure is only /. After that for the next m m/ steps where m = n n/ we increase the number of independent copies to 4. This is because the probability of failure has gown down to /4. We keep increasing the number of copies geometrically as the size of the graphs gets smaller and smaller. At the end we return the best cut found in all of the copies. Algorithm Karger-Stein (996): Run two independent copies of the Karger s algorithm for n l steps, for l = n/. Run the algorithm recursively on the two remaining graphs. The following two claims bound the running time and the success probability of this algorithm. Claim.4. The running time is O(n log(n)). Proof. Let T (n) the the running time of the algorithm on a graph of size n. T (n) = O(n ) + T ( n ) n + ( n ) + 4( n ) + 8( n 3 ) +... = n ( + + 4 + 3 6 +...) n. (.4) Note that here, for the sake of simplicity, we ignored some constants.

-4 Lecture : Contraction Algorithm [ ] Claim.5. P success Proof. Let s define P (n) be the probability that the algorithm succeeds in a graph of size n. Next, we write a recurrence relation for P (n). Note that P (n/ ) is the probability that one of the two copies succeeds. So, P (n/ ) is the probability that one of the two copies fail. So, ( P (n/ )) is the probability that both copies fail, i.e., the algorithm fails. So, ( P (n) = ( )) n P. (.5) We use induction to show that P (n) : By definition, ( P (n) = + ( ) ( n n 4 P P ( ) n = P 4 ( ) n P Now, by induction hypothesis we know P (n/ ) log(n/. So, we would like to use this lower bound for ) both of the terms in the RHS, and obtain a lower bound on P (n). Unfortunately, the second term in the RHS has a negative coefficient, so we may increase the RHS when we replace P (n/ ) by log (n/. ) However, observe that the function f(x) = x x 4 is an increasing function of x for x. Therefore, if x a, one can write f(x) a a /4. We do the same above and we write P (n) log(n/ ) 4 log (n/ ). To prove the induction step we must show P (n). So, it is enough to show that log(n/ ) 4 log (n/ ) log n ( 4 log n ) + 4 + 4 4 log n. The last inequality holds trivially. This completes the proof of Claim.5 Now, to prove Theorem.3, it is enough to run K = () independent copy of the Karger, Stein algorithm. Then we will find the min cut with probability at least /n as desired. ( n) )(log n. ) )

REFERENCES -5 References [Kar93] D. R. Karger. Global min-cuts in RNC, and other ramifications of a simple min-out algorithm. In: SODA. Austin, Texas, United States: Society for Industrial and Applied Mathematics, 993, pp. 30 (cit. on p. -). [KS93] D. R. Karger and C. Stein. An O (n ) algorithm for minimum cuts. In: STOC. 993, pp. 757 765 (cit. on pp. -, -3).