Approximation Algorithms for Max Cut Outline Preliminaries Approximation Algorithm for Max Cut with Unit Weights Weighted Max Cut Inapproximability Results Definition
Total Page:16
File Type:pdf, Size:1020Kb
Outline Preliminaries Approximation algorithm for Max Cut with unit weights Weighted Max Cut Inapproximability Results Preliminaries Approximation algorithm for Max Cut with unit weights Weighted Max Cut Inapproximability Results Angeliki Chalki Network Algorithms and Complexity, 2015 Approximation Algorithms for Max Cut Outline Preliminaries Approximation algorithm for Max Cut with unit weights Weighted Max Cut Inapproximability Results Definition I Max Cut Definition: Given an undirected graph G=(V, E), find a partition of V into two subsets A, B so as to maximize the number of edges having one endpoint in A and the other in B. I Weighted Max Cut Definition: Given an undirected graph G=(V, E) and a positive weght we for each edge, find a partition of V into two subsets A, B so as to maximize the combined weight of the edges having one endpoint in A and the other in B. Angeliki Chalki Network Algorithms and Complexity, 2015 Approximation Algorithms for Max Cut Outline Preliminaries Approximation algorithm for Max Cut with unit weights Weighted Max Cut Inapproximability Results NP- Hardness Max- Cut: I is NP- Hard (reduction from 3-NAESAT). I is the same as finding maximum bipartite subgraph of G. I can be thought of a variant of the 2-coloring problem in which we try to maximize the number of edges consisting of two different colors. I is APX-hard [Papadimitriou, Yannakakis, 1991]. There is no PTAS for Max Cut unless P=NP. Angeliki Chalki Network Algorithms and Complexity, 2015 Approximation Algorithms for Max Cut Outline Preliminaries Approximation algorithm for Max Cut with unit weights Weighted Max Cut Inapproximability Results Max Cut with unit weights The algorithm iteratively updates the cut. 1. Initialize the cut arbitrarily. 1 2. For any vertex υ which has less than 2 of its edges crossing the cut, we move the vertex to the other side of the cut. 3. If no such vertex exists then stop else go to step 2. Each iteration involves examining at most jV j vertices before moving one, hence O(jV 2j) time. The cut value is increased by at least 1 after each iteration. The maximum possible cut value is jEj, hence there are at most jEj iterations. Overall time complexity: O(jV 2j · jEj). Angeliki Chalki Network Algorithms and Complexity, 2015 Approximation Algorithms for Max Cut Outline Preliminaries Approximation algorithm for Max Cut with unit weights Weighted Max Cut Inapproximability Results What is the approximation ratio of this algorithm? At least half of the edges of each vertex contributes to the solution. P 1 P 8υ 2 A : u2B w(υ;u) ≥ 2 · (υ;u)2E w(υ;u) P 1 P 8u 2 B : υ2A w(u,υ) ≥ 2 · (u,υ)2E w(u,υ) Summing over all vertices: P P 2 · υ2A;u2B w(u,υ) ≥ e2E we ≥ OPT I What is a tight example for this algorithm? P I A better ratio cannot be achieved using e2E we as an upper bound for the maxcut. In complete graphs the max cut is half the size of the upper bound. Angeliki Chalki Network Algorithms and Complexity, 2015 Approximation Algorithms for Max Cut Outline Preliminaries Approximation algorithm for Max Cut with unit weights Weighted Max Cut Inapproximability Results The previous algorithm for Weighted Max Cut For the general case of weighted graphs, the time complexity 2 P becomes O(jV j · e2E we ) which is not always polynomial in the size of the input. Note. There exist modifications to the algorithm that give a strongly polynomial running time, with an additional term in the approximation coefficient. Angeliki Chalki Network Algorithms and Complexity, 2015 Approximation Algorithms for Max Cut Outline Preliminaries Approximation algorithm for Max Cut with unit weights Weighted Max Cut Inapproximability Results Randomized Approximation Algorithm for Max Cut There is a simple randomized algorithm for Max Cut: Assign each vertex at random to A or to B with equal probability, such that the random decisions for the different vertices are mutually independent. The expected weight of the solution is: P P E e2E(A;B) we = e2E we · Pr(e 2 E(A; B)) = 1 P 1 = 2 e2E we ≥ 2 OPT : In the case of Max Cut with unit weights the expected number of jEj cut edges is 2 . Angeliki Chalki Network Algorithms and Complexity, 2015 Approximation Algorithms for Max Cut Outline Preliminaries Approximation algorithm for Max Cut with unit weights Weighted Max Cut Inapproximability Results Las Vegas algorithm for Max Cut with unit weights In the case of unit weights (we = 1 8e 2 E), we can obtain a Las Vegas algorithm repeating the previous procedure. P jEj Let, p = Pr e2E(A;B) we > 2 . Then, jEj P 2 = E e2E(A;B) we = P P jEj i · Pr e2E(A;B) we = i + i6 2 −1 P P + jEj i · Pr e2E(A;B) we = i i> 2 jEj 6 (1 − p) · 2 − 1 + p · jEj, which implies that 1 p > jEj and the expected number of steps before finding a cut 2 +1 jEj jEj of value at least 2 is 2 + 1. Angeliki Chalki Network Algorithms and Complexity, 2015 Approximation Algorithms for Max Cut Outline Preliminaries Approximation algorithm for Max Cut with unit weights Weighted Max Cut Inapproximability Results Derandomization using conditional expectations Instead of random choices, we evaluate both alternatives according to the conditional expectation of the objective function if we fix the decisions until now. We need three sets A, B, C. Initially C=V and A=B=?. At an intermediate state, the expected weight w(A; B; C) of the random cut produced by this procedure is: w(A; B; C) = P 1 P 1 P 1 P e2E(A;B) we + 2 e2E(A;C) we + 2 e2E(B;C) we + 2 e2E(C;C) we . Angeliki Chalki Network Algorithms and Complexity, 2015 Approximation Algorithms for Max Cut Outline Preliminaries Approximation algorithm for Max Cut with unit weights Weighted Max Cut Inapproximability Results Derandomization using conditional expectations Initialize A = B = ?, C = V . for all υ 2 V do Compute w(A + υ; B; C − υ) and w(A; B + υ; C − υ). if w(A + υ; B; C − υ) > w(A; B + υ; C − υ) then A = A + υ else B = B + υ end if C = C − υ end for return A,B Angeliki Chalki Network Algorithms and Complexity, 2015 Approximation Algorithms for Max Cut Outline Preliminaries Approximation algorithm for Max Cut with unit weights Weighted Max Cut Inapproximability Results Derandomization using conditional expectations The analysis of the algorithm is based on the observation that: 1 Initially w(A; B; C) = 2 we . For every A,B,C and υ 2 V : maxfw(A + υ; B; C − υ); w(A; B + υ; C − υ)g ≥ w(A; B; C). The algorithm computes a partition (A,B) such that the 1 weight of the cut is at least 2 we . Angeliki Chalki Network Algorithms and Complexity, 2015 Approximation Algorithms for Max Cut Outline Preliminaries Approximation algorithm for Max Cut with unit weights Weighted Max Cut Inapproximability Results Obtaining a greedy algorithm The algorithm can be simplified! Observe that: w(A + υ; B; C − υ) − w(A; B + υ; C − υ) = P P e2E(υ;B) we − e2E(υ;A) we . The following algorithm is a 2-approximation algorithm running in linear time! Angeliki Chalki Network Algorithms and Complexity, 2015 Approximation Algorithms for Max Cut Outline Preliminaries Approximation algorithm for Max Cut with unit weights Weighted Max Cut Inapproximability Results Greedy Algorithm Initialize A = B = ?. for all υ 2 V do P P if e2E(υ;B) we − e2E(υ;A) we > 0 then A = A + υ else B = B + υ end if end for return A,B This algorithm first appeared in the 1967 paper "On bipartite subgraphs of graphs" of Erd}os. Angeliki Chalki Network Algorithms and Complexity, 2015 Approximation Algorithms for Max Cut Outline Preliminaries Approximation algorithm for Max Cut with unit weights Weighted Max Cut Inapproximability Results Greedy Algorithm P P P The property e2E(A;B) we ≥ e2E(A;A) we + e2E(B;B) we is a loop invariant of the algorithm. It is easy to see that after any loop more edges (weight of edges) are added to the cut than added inside the set A or B. But, P P P P e2E(A;B) we + e2E(A;A) we + e2E(B;B) we = e2E we , P 1 P hence e2E(A;B) we ≥ 2 · e2E we . Angeliki Chalki Network Algorithms and Complexity, 2015 Approximation Algorithms for Max Cut Outline Preliminaries Approximation algorithm for Max Cut with unit weights Weighted Max Cut Inapproximability Results PCP Theorem and Inapproximability A decision problem L belongs to PCPc(n);s(n)[r(n); q(n)], if there is a randomised oracle Turing Machine V (verifier) that, on input x and oracle access to a string w (the proof or witness), satisfies the following properties: Completeness: If x 2 L then for some w, V w (x) accepts with probability at least c(n). Soundness: If x 62 L then for every w, V w (x) accepts with probability at most s(n). The randomness complexity r(n) of the verifier is the maximum number of random bits that V uses over all x of length n. The query complexity q(n) of the verifier is the maximum number of queries that V makes to w over all x of length n. Angeliki Chalki Network Algorithms and Complexity, 2015 Approximation Algorithms for Max Cut Outline Preliminaries Approximation algorithm for Max Cut with unit weights Weighted Max Cut Inapproximability Results PCP Theorem and Inapproximability In "Some Optimal Inapproximability results", H˚astad [2001], proved inapproximability results based on the following theorem.