Randomized Algorithms and Randomized Rounding Lecture 21: April 13 G n 2 leaves 0.30.60.2 0.70.4.

Slides:



Advertisements
Similar presentations
Lecture 7. Network Flows We consider a network with directed edges. Every edge has a capacity. If there is an edge from i to j, there is an edge from.
Advertisements

1 LP Duality Lecture 13: Feb Min-Max Theorems In bipartite graph, Maximum matching = Minimum Vertex Cover In every graph, Maximum Flow = Minimum.
Bipartite Matching, Extremal Problems, Matrix Tree Theorem.
Approximation Algorithms Chapter 14: Rounding Applied to Set Cover.
Approximation, Chance and Networks Lecture Notes BISS 2005, Bertinoro March Alessandro Panconesi University La Sapienza of Rome.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
1 Maximum flow sender receiver Capacity constraint Lecture 6: Jan 25.
Theory of Computing Lecture 3 MAS 714 Hartmut Klauck.
Lecture 22: April 18 Probabilistic Method. Why Randomness? Probabilistic method: Proving the existence of an object satisfying certain properties without.
Theory of Computing Lecture 16 MAS 714 Hartmut Klauck.
Complexity ©D Moshkovitz 1 Approximation Algorithms Is Close Enough Good Enough?
The number of edge-disjoint transitive triples in a tournament.
CSL758 Instructors: Naveen Garg Kavitha Telikepalli Scribe: Manish Singh Vaibhav Rastogi February 7 & 11, 2008.
Graph Clustering. Why graph clustering is useful? Distance matrices are graphs  as useful as any other clustering Identification of communities in social.
Graph Clustering. Why graph clustering is useful? Distance matrices are graphs  as useful as any other clustering Identification of communities in social.
Totally Unimodular Matrices Lecture 11: Feb 23 Simplex Algorithm Elliposid Algorithm.
Karger’s Min-Cut Algorithm Amihood Amir Bar-Ilan University, 2009.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
1 Optimization problems such as MAXSAT, MIN NODE COVER, MAX INDEPENDENT SET, MAX CLIQUE, MIN SET COVER, TSP, KNAPSACK, BINPACKING do not have a polynomial.
Approximation Algorithm: Iterative Rounding Lecture 15: March 9.
Approximation Algorithms
Maximum Flows Lecture 4: Jan 19. Network transmission Given a directed graph G A source node s A sink node t Goal: To send as much information from s.
Computability and Complexity 24-1 Computability and Complexity Andrei Bulatov Approximation.
Job Scheduling Lecture 19: March 19. Job Scheduling: Unrelated Multiple Machines There are n jobs, each job has: a processing time p(i,j) (the time to.
Study Group Randomized Algorithms Jun 7, 2003 Jun 14, 2003.
Prize Collecting Cuts Daniel Golovin Carnegie Mellon University Lamps of ALADDIN 2005 Joint work with Mohit Singh & Viswanath Nagarajan.
Distributed Combinatorial Optimization
Randomness in Computation and Communication Part 1: Randomized algorithms Lap Chi Lau CSE CUHK.
Lecture 20: April 12 Introduction to Randomized Algorithms and the Probabilistic Method.
Karger’s Min-Cut Approximate Max-Cut Monday, July 21st 1.
Maximal Independent Set Distributed Algorithms for Multi-Agent Networks Instructor: K. Sinan YILDIRIM.
1 Introduction to Approximation Algorithms Lecture 15: Mar 5.
A General Approach to Online Network Optimization Problems Seffi Naor Computer Science Dept. Technion Haifa, Israel Joint work: Noga Alon, Yossi Azar,
Packing Element-Disjoint Steiner Trees Mohammad R. Salavatipour Department of Computing Science University of Alberta Joint with Joseph Cheriyan Department.
Approximation Algorithms: Bristol Summer School 2008 Seffi Naor Computer Science Dept. Technion Haifa, Israel TexPoint fonts used in EMF. Read the TexPoint.
Randomized Algorithms Morteza ZadiMoghaddam Amin Sayedi.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Fixed Parameter Complexity Algorithms and Networks.
Simple and Improved Parameterized Algorithms for Multiterminal Cuts Mingyu Xiao The Chinese University of Hong Kong Hong Kong SAR, CHINA CSR 2008 Presentation,
CS38 Introduction to Algorithms Lecture 18 May 29, CS38 Lecture 18.
The Best Algorithms are Randomized Algorithms N. Harvey C&O Dept TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A AAAA.
1/36 Randomized algorithms Instructor: YE, Deshi
Design Techniques for Approximation Algorithms and Approximation Classes.
Approximating Minimum Bounded Degree Spanning Tree (MBDST) Mohit Singh and Lap Chi Lau “Approximating Minimum Bounded DegreeApproximating Minimum Bounded.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Order Statistics The ith order statistic in a set of n elements is the ith smallest element The minimum is thus the 1st order statistic The maximum is.
Approximating the Minimum Degree Spanning Tree to within One from the Optimal Degree R 陳建霖 R 宋彥朋 B 楊鈞羽 R 郭慶徵 R
1 Chapter 10 Extending the Limits of Tractability Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.
 2004 SDU Lecture 7- Minimum Spanning Tree-- Extension 1.Properties of Minimum Spanning Tree 2.Secondary Minimum Spanning Tree 3.Bottleneck.
The Selection Problem. 2 Median and Order Statistics In this section, we will study algorithms for finding the i th smallest element in a set of n elements.
Approximation Algorithms for NP-hard Combinatorial Problems Magnús M. Halldórsson Reykjavik University Local Search, Greedy and Partitioning
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
NP-Completness Turing Machine. Hard problems There are many many important problems for which no polynomial algorithms is known. We show that a polynomial-time.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
Iterative Rounding in Graph Connectivity Problems Kamal Jain ex- Georgia Techie Microsoft Research Some slides borrowed from Lap Chi Lau.
Theory of Computing Lecture 12 MAS 714 Hartmut Klauck.
TU/e Algorithms (2IL15) – Lecture 12 1 Linear Programming.
Approximation Algorithms based on linear programming.
Theory of Computational Complexity Probability and Computing Ryosuke Sasanuma Iwama and Ito lab M1.
TU/e Algorithms (2IL15) – Lecture 12 1 Linear Programming.
TU/e Algorithms (2IL15) – Lecture 8 1 MAXIMUM FLOW (part II)
Lap Chi Lau we will only use slides 4 to 19
Topics in Algorithms Lap Chi Lau.
Minimum Spanning Tree 8/7/2018 4:26 AM
Chapter 5. Optimal Matchings
Randomized Algorithms CS648
Data Structures Review Session
Chapter 23 Minimum Spanning Tree
Problem Solving 4.
EE5900 Advanced Embedded System For Smart Infrastructure
Presentation transcript:

Randomized Algorithms and Randomized Rounding Lecture 21: April 13 G n 2 leaves

Minimum Cut Minimum cut: Given an undirected multigraph G with n vertices, find a cut of minimum cardinality (a min-cut). A cut is a set of edges whose removal disconnects the graph. This problem can be solved in polynomial by the max-flow algorithm. However, using randomness, we can design a really simple algorithm.

Edge Contraction Contraction of an edge e = (u,v): Merge u and v into a single vertex “uv”. For any edge (w,u) or (w,v), this edge becomes (w,“uv”) in the resulting graph. Delete any edge which becomes a “self-loop”, i.e. an edge of the form (v,v) ,2 5 3

Edge Contraction Observation: an edge contraction would not decrease the min-cut size. This is because every cut in the graph at any intermediate stage is a cut in the original graph ,2 5 3

A Randomized Algorithm Algorithm Contract: Input: A multigraph G=(V,E) Output: A cut C 1.H <- G. 2.while H has more than 2 vertices do 2.1 choose an edge (x,y) uniformly at random from the edges in H. 2.2 H <- H/(x,y). (contract the edge (x,y)) 3. C <- the set of vertices corresponding to one of the two meta-vertices in H. Running time: Each iteration takes O(n) time. Each iteration has one fewer vertices. So, there are at most n iteration. Total running time O(n 2 ).

Analysis Obviously, this algorithm will not always work. How should we analyze the success probability? Let C be a minimum cut, and E(C) be the edges crossing C. Claim 1: C is produced as output if and only if none of the edges in E(C) is contracted by the algorithm. So, we want to estimate the probability that an edge in E(C) is picked. What is this probability?

Analysis Let k be the number of edges in E(C). How many edges are there in the initial graph? Claim 2: The graph has at least nk/2 edges. Because each vertex has degree at least k. So, the probability that an edge in E(C) is picked at the first iteration is at most 2/n.

Analysis In the i-th iteration, there are n-i+1 vertices in the graph. Observation: an edge contraction would not decrease the min-cut size. So the min-cut still has at least k edges. Hence there are at least (n-i+1)k/2 edges in the i-th iteration. The probability that an edge in E(C) is picked is at most 2/(n-i+1).

Analysis So, the probability that a particular min- cut is output by Algorithm Contract with probability at least Ω(n -2 ).

Boosting the Probability To boost the probability, we repeat the algorithm for n 2 log(n) times. What is the probability that it still fails to find a min-cut? So, high probability to find a min-cut in O(n 4 log(n)) time.

Ideas to an Improved Algorithm Key: The probability that an edge in E(C) is picked is at most 2/(n-i+1). Observation: at early iterations, it is not very likely that the algorithm fails. Idea: “share” the random choices at the beginning! In the previous algorithm, we boost the probability by running the Algorithm Contract (from scratch) independently many times. G n contractions n 2 leaves

Ideas to an Improved Algorithm Idea: “share” the random choices at the beginning! Previous algorithm. G n contractions n 2 leaves G ……………… n 2 leaves n/2 contractions n/4 contractions n/8 contractions log(n) levels New algorithm.

A Fast Randomized Algorithm Algorithm FastCut: Input: A multigraph G=(V,E) Output: A cut C 1.n <- |V|. 2.if n <= 6, then compute min-cut by brute-force enumeration else 2.1 t <- (1 + n/√2). 2.2 Using Algorithm Contract, perform two independent contraction sequences to obtain graphs H1 and H2 each with t vertices. 2.3 Recursively compute min-cuts in each of H1 and H return the smaller of the two min-cuts.

A Surprise Theorem 1: Algorithm Fastcut runs in O(n 2 log(n)) time. Theorem 2: Algorithm Fastcut succeeds with probability Ω(1/log(n)). By a similar boosting argument, repeating Fastcut for log 2 (n) times would succeed with high probability. Total running time = O(n 2 log 3 (n))! It is much faster than the best known deterministic algorithm, which has running time O(n 3 ). Min-cut is faster than Max-Flow!

Theorem 1: Algorithm Fastcut runs in O(n 2 log(n)) time. Complexity Formal Proof: Let T(n) be the running time of Fastcut when given an n-vertex graph. And the solution to this recurrence is: Q.E.D.

Complexity G n 2 leaves n/2 contractions n/4 contractions n/8 contractions log(n) levels First level complexity = 2 x (n 2 /2) = n 2. Second level complexity = 4 x (n 2 /4) = n 2. Total time = n 2 log(n). The i-th level complexity = 2 i x (n 2 /2 i ) = n 2.

Theorem 2: Algorithm Fastcut succeeds with probability Ω(1/log(n)). Analysis G n 2 leaves n/2 contractions n/4 contractions n/8 contractions log(n) levels Claim: for each “branch”, the survive probability is at least ½.

Analysis Claim: for each “branch”, the survive probability is at least ½.

Theorem 2: Algorithm Fastcut succeeds with probability Ω(1/log(n)). Analysis Proof: Let k denote the depth of recursion, and p(k) be a lower bound on the success probability. For convenience, set it to be equality:

Analysis We want to prove that p(k) = Ω(1/k), and then substituting k=log(n) would do. Theorem 2: Algorithm Fastcut succeeds with probability Ω(1/log(n)). It is more convenient to replace p(k) by q(k) = 4/p(k)-1, and we have: A simple inductive argument now establishes that where So q(k) = O(k)

Remarks Open question 1: A deterministic algorithm for min-cut with running time close to O(n 2 )? Open question 2: A randomized algorithm for min-cut with running time close to O(m)? Just for fun: A randomized algorithm for minimum k-cut with running time O(n f(k) )? Open question 3: Is minimum cut really easier than maximum flow? Fastcut is fast, simple and cute.

Set Cover Set cover problem: Given a ground set U of n elements, a collection of subsets of U, S* = {S1,S2,…,Sk}, where each subset has a cost c(Si), find a minimum cost subcollection of S* that covers all elements of U. Vertex cover is a special case, why? A convenient interpretation: sets elements Choose a min-cost set of white vertices to “cover” all black vertices.

Linear Programming Relaxation for each element e. for each subset S. How to “round” the fractional solutions? Idea: View the fractional values as probabilities, and do it randomly!

sets elements Algorithm First solve the linear program to obtain the fractional values x* Then flip a (biased) coin for each set with probability x*(S) being “head”. Add all the “head” vertices to the set cover. Repeat log(n) rounds.

Performance Theorem: The randomized rounding gives an O(log(n))-approximation. Claim 1: The sets picked in each round have an expected cost of at most LP. Claim 2: Each element is covered with high probability after O(log(n)) rounds. So, after O(log(n)) rounds, the expected total cost is at most O(log(n)) LP, and every element is covered with high probability, and hence the theorem. Remark: It is NP-hard to have a better than O(log(n))-approximation!

Cost Claim 1: The sets picked in each round have an expected cost of at most LP. Q.E.D.

Feasibility First consider the probability that an element e is covered after one round. Claim 2: Each element is covered with high probability after O(log(n)) rounds. Let say e is covered by S1, …, Sk which have values x1, …, xk. By the linear program, x1 + x2 + … + xk >= 1. Pr[e is not covered in one round] = (1 – x1)(1 – x2)…(1 – xk). This is maximized when x1=x2=…=xk=1/k, why? Pr[e is not covered in one round] <= (1 – 1/k) k

Feasibility First consider the probability that an element e is covered after one round. Claim 2: Each element is covered with high probability after O(log(n)) rounds. Pr[e is not covered in one round] <= (1 – 1/k) k So, What about after O(log(n)) rounds?

Feasibility Claim 2: Each element is covered with high probability after O(log(n)) rounds. So,

Remark Let say the sets picked have an expected total cost of at most clog(n) LP. Claim: The total cost is greater than 4clog(n) LP with probability at most ¼. This follows from the Markov inequality, which says that: Proof of Markov inequality: The claim follows by substituting E[X]=clog(n)LP and t=4clog(n)LP

Wrap Up Theorem: The randomized rounding gives an O(log(n))-approximation. This is the only known rounding method for set cover. Randomized rounding has many other applications.