BCCS: Computational methods for complex systems Wednesday, 16 June Lecture 3

Similar documents
Notes for Lecture 2. Statement of the PCP Theorem and Constraint Satisfaction

Limits to Approximability: When Algorithms Won't Help You. Note: Contents of today s lecture won t be on the exam

PCP Theorem and Hardness of Approximation

1 Agenda. 2 History. 3 Probabilistically Checkable Proofs (PCPs). Lecture Notes Definitions. PCPs. Approximation Algorithms.

On the efficient approximability of constraint satisfaction problems

NP-Complete Reductions 2

Notes for Lecture 21

Lecture 18: PCP Theorem and Hardness of Approximation I

Lecture 12 Scribe Notes

Complexity Theory. Jörg Kreiker. Summer term Chair for Theoretical Computer Science Prof. Esparza TU München

Foundations of Machine Learning and Data Science. Lecturer: Avrim Blum Lecture 9: October 7, 2015

Lecture 10: Hardness of approximating clique, FGLSS graph

Design and Analysis of Algorithms

Geometric Steiner Trees

CS294: PCP and Hardness of Approximation January 25, Notes for Lecture 3

Lecturer: Shuchi Chawla Topic: Inapproximability Date: 4/27/2007

Keywords. Approximation Complexity Theory: historical remarks. What s PCP?

Lecture 8 (Notes) 1. The book Computational Complexity: A Modern Approach by Sanjeev Arora and Boaz Barak;

Week Cuts, Branch & Bound, and Lagrangean Relaxation

Lecture 15: A Brief Look at PCP

Lecture 16 November 6th, 2012 (Prasad Raghavendra)

Topics in Complexity Theory

CS 320, Fall Dr. Geri Georg, Instructor 320 NP 1

6.841/18.405J: Advanced Complexity Wednesday, April 2, Lecture Lecture 14

UC Berkeley CS 170: Efficient Algorithms and Intractable Problems Handout 22 Lecturer: David Wagner April 24, Notes 22 for CS 170

CMSC 441: Algorithms. NP Completeness

Solution of Exercise Sheet 12

NP Complete Problems. COMP 215 Lecture 20

2 Evidence that Graph Isomorphism is not NP-complete

NP-Complete Problems. More reductions

CS154, Lecture 18: 1

Chapter 34: NP-Completeness

NP-Completeness I. Lecture Overview Introduction: Reduction and Expressiveness

DD2446 Complexity Theory: Problem Set 4

2 P vs. NP and Diagonalization

CS 583: Algorithms. NP Completeness Ch 34. Intractability

Advanced Algorithms (XIII) Yijia Chen Fudan University

CS151 Complexity Theory. Lecture 15 May 22, 2017

NP-Complete problems

Stanford University CS254: Computational Complexity Handout 8 Luca Trevisan 4/21/2010

PCP Course; Lectures 1, 2

Approximation algorithm for Max Cut with unit weights

P is the class of problems for which there are algorithms that solve the problem in time O(n k ) for some constant k.

Topics in Complexity

Introduction to Computational Complexity

Today. Few Comments. PCP Theorem, Simple proof due to Irit Dinur [ECCC, TR05-046]! Based on some ideas promoted in [Dinur- Reingold 04].

Lecture 16: Constraint Satisfaction Problems

NP-COMPLETE PROBLEMS. 1. Characterizing NP. Proof

1 Probabilistically checkable proofs

Non-Approximability Results (2 nd part) 1/19

U.C. Berkeley CS294: Beyond Worst-Case Analysis Handout 8 Luca Trevisan September 19, 2017

Lecture 19: Interactive Proofs and the PCP Theorem

Algorithms and Complexity theory

Automata Theory CS Complexity Theory I: Polynomial Time

Essential facts about NP-completeness:

Polynomial-time Reductions

Algorithms: COMP3121/3821/9101/9801

Approximation Resistance from Pairwise Independent Subgroups

Lecture 11 October 7, 2013

Approximation Algorithms for Re-optimization

Lecture 25: Cook s Theorem (1997) Steven Skiena. skiena

Lecture 26. Daniel Apon

Chapter 11. Approximation Algorithms. Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.

Welcome to... Problem Analysis and Complexity Theory , 3 VU

DRAFT. PCP and Hardness of Approximation. Chapter 19

More NP-Complete Problems

PCPs and Inapproximability Gap-producing and Gap-Preserving Reductions. My T. Thai

Algorithms Design & Analysis. Approximation Algorithm

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181.

On the Optimality of Some Semidefinite Programming-Based. Approximation Algorithms under the Unique Games Conjecture. A Thesis presented

Probabilistically Checkable Proofs. 1 Introduction to Probabilistically Checkable Proofs

Lecture notes on OPP algorithms [Preliminary Draft]

Limitations of Algorithm Power

NP Completeness and Approximation Algorithms

Not all counting problems are efficiently approximable. We open with a simple example.

4/12/2011. Chapter 8. NP and Computational Intractability. Directed Hamiltonian Cycle. Traveling Salesman Problem. Directed Hamiltonian Cycle

Decision Problems TSP. Instance: A complete graph G with non-negative edge costs, and an integer

U.C. Berkeley CS278: Computational Complexity Professor Luca Trevisan August 30, Notes for Lecture 1

Complexity Classes IV

1 The Knapsack Problem

CMPT307: Complexity Classes: P and N P Week 13-1

On the efficient approximability of constraint satisfaction problems

Lecture 15 - NP Completeness 1

CSC 5170: Theory of Computational Complexity Lecture 13 The Chinese University of Hong Kong 19 April 2010

CS151 Complexity Theory. Lecture 13 May 15, 2017

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: NP-Completeness I Date: 11/13/18

1 Reductions and Expressiveness

Lecture 15 - Zero Knowledge Proofs

Algorithms and Theory of Computation. Lecture 22: NP-Completeness (2)

Data Structures in Java

VIII. NP-completeness

NP-Completeness. Until now we have been designing algorithms for specific problems

Overview. 1 Introduction. 2 Preliminary Background. 3 Unique Game. 4 Unique Games Conjecture. 5 Inapproximability Results. 6 Unique Game Algorithms

Algorithm Design and Analysis

Lecture Hardness of Set Cover

Algorithm Design and Analysis

Lecture 26: Arthur-Merlin Games

Lecture 18: More NP-Complete Problems

Transcription:

BCCS: Computational methods for complex systems Wednesday, 16 June 2010 Lecturer: Ashley Montanaro 1 Lecture 3 Hardness of approximation 1 Overview In my lectures so far, we ve mostly restricted ourselves to decision problems, i.e. problems with a yes-no answer. Many problems we wish to solve in practice have a different flavour and can be understood as optimisation problems. For example: Knapsack: given a set of values {v i } and weights {w i }, and a maximum weight M, maximise n i=1 v ix i, subject to n i=1 w ix i M, x i {0, 1}. Travelling Salesman: given a graph G whose edges are weighted with costs, find a tour (cycle) that visits all vertices exactly once and achieves the lowest cost. Max-3sat: given a CNF boolean formula (not necessarily satisfiable) where each clause contains at most 3 variables, find an assignment to the variables that satisfies the largest number of clauses. Max-E3sat: the same as Max-3sat, but where each clause contains exactly 3 variables. The decision variants of all of these are NP-complete, so we don t expect to be able to solve them exactly in polynomial time. But often in practice we might be satisfied with a reasonably approximate answer. The concept of the quality of an approximation can be formalised as follows. Every optimisation problem P has a set of feasible solutions F (x) for each input x, and each solution s F (x) has a value v(s) 2. If P is a maximisation problem, the optimum value is then defined as and if P is a minimisation problem, OPT(x) = max s F (x) v(s); OPT(x) = min s F (x) v(s). Let A be an algorithm which, given an instance x, returns a feasible solution A(x) F (x). If P is a maximisation problem, we say that A is an α-approximation algorithm if, for all x, we have A(x) α OPT(x), and if P is a minimisation problem, we say that A is an α-approximation algorithm if, for all x, we have A(x) α OPT(x). 1 http://www.cs.bris.ac.uk/~montanar/bccs/ 2 This terminology makes sense if we want to maximise the value; for minimisation problems the term cost might be more appropriate. 1

For a maximisation (resp. minimisation) problem P, the approximation threshold of P is the largest (resp. smallest) α such that there exists a polynomial-time α-approximation algorithm for P. Beware that there is no standardised terminology in this field; for example, some authors redefine α 1/α for maximisation problems, so it is always at least 1. Intuitively, the approximation threshold of a problem is how well we can expect to solve it in practice. It will turn out that different NP-complete problems can have very different approximation thresholds. 2 The good Theorem 1. There is a polynomial-time (1 ɛ)-approximation algorithm for Knapsack, for any ɛ > 0. Proof. We first use dynamic programming to get a pretty good algorithm for solving Knapsack. Let V = max{v 1,..., v n } be the maximum value of an item. Define a (n + 1) (nv + 1) table W by letting W (i, v) be the minimum weight attainable by selecting some subset of the first i items, such that their total value is exactly v. W (0, v) = for all v, and then W (i + 1, v) = min{w (i, v), W (i, v v i+1 ) + w i+1 }. Once we ve filled in the table, we pick the largest v such that W (n, v) M. This algorithm solves Knapsack in time O(n 2 V ). Note that this is not polynomial in the input size, as V might be very large. We can make this algorithm run faster, at the cost of introducing inaccuracy, by attempting to reduce V. To do this, we simply truncate the last b bits of each value v i (for some b to be determined) and replace them with zeroes, which can then be ignored. That is, we get new values v i = 2b v i /2 b. We end up with an algorithm that runs in O( n2 V ) time. How bad is the solution we get? Defining 2 b S and S to be the original and new solutions (i.e. sets of items), we have (exercise!) v i v i v i v i (v i 2 b ) v i n 2 b. i S i S i S i S i S i S Therefore, as V is a lower bound on the value of the optimal solution, this algorithm runs in time O( n2 V ) and outputs a solution that s at most a (1 ɛ) fraction lower than optimum, where ɛ = n2b 2 b V. But this implies that, for any ɛ, if we choose b such that 2 b = V ɛ n, we obtain an algorithm running in O( n3 ɛ ), which is polynomial in n for any fixed ɛ. 3 The bad Theorem 2. Unless P = NP, there is no polynomial-time (1 + ɛ)-approximation algorithm for Travelling Salesman, for any ɛ > 0. Proof. For a contradiction, suppose there is such an algorithm, and call it A. We will use it to construct a polynomial-time algorithm for the NP-complete Hamiltonian Cycle problem. 2

Given a graph G with n vertices, the algorithm for Hamiltonian Cycle constructs a Travelling Salesman instance with n vertices, where the distance between vertices i and j is 1 if there is an edge in G between i and j, and (1 + ɛ)n otherwise. We now apply our approximation algorithm A to this problem. If A returns a tour of cost exactly n, then we know that G has a Hamiltonian cycle. On the other hand, if A returns a tour with one or more edges of cost (1 + ɛ)n, then the total length of the tour is strictly greater than (1 + ɛ)n. As we have assumed that A never returns a tour with cost greater than (1+ɛ) times the optimum cost, this means that there is no tour with cost n or less. Therefore, G does not have a Hamiltonian cycle. 4 The ugly Theorem 3. Unless P = NP, there is no polynomial-time ( 7 8 Max-E3sat, for any ɛ > 0. + ɛ)-approximation algorithm for Note that there is an easy randomised 7 8-approximation algorithm for this problem: just pick an assignment to the variables at random 3. A random assignment will satisfy each clause with probability 7 8. By linearity of expectation, this implies that if there are m clauses, on average 7 8 m clauses will be satisfied. Theorem 3 says that you can t do any better than this trivial algorithm, unless P = NP. We will sketch a proof of a weaker variant of this result, which can be stated as follows. Theorem 4. Unless P = NP, there is an ɛ > 0 such that there is no polynomial-time (1 ɛ)- approximation algorithm for Max-3sat. Note that we have lost the tight bound on the approximation ratio and have also generalised from Max-E3sat to Max-3sat. The proof of Theorem 4 depends on a recently developed, and apparently unrelated, concept in theoretical computer science: probabilistically checkable proofs (PCPs). 4.1 Probabilistically checkable proofs Imagine we have a proof system where a prover wishes to convince a verifier that the verifier s input is in a language L. Given an n-bit input x and a poly(n)-bit proof, the verifier first looks at x and performs polynomial-time computation on x. The verifier then chooses, at random, a constant number of bits of the proof to read. The verifier reads these bits and performs some test on them, either accepting or rejecting the input depending on the result of the test. The PCP Theorem states that any language L NP has a proof system of this form where: For all x L, there exists a proof such that the verifier accepts with probability 1. For all x / L, for any proof, the verifier accepts with probability at most 1/2. 3 There is in fact also a 7 -approximation algorithm for the more general Max-3sat problem; this algorithm is 8 based on semidefinite programming and its proof of correctness is considerably more complicated. 3

In comparison with the usual characterisation of NP, we are looking at much fewer bits of the proof, but at the expense of having some probability of incorrectly identifying strings as being in L that are actually not in L. 4.2 The Max-qCSP problem The proof of the PCP Theorem is technical, and beyond the scope of this course. We ll content ourselves with proving that it implies an inapproximability result for Max-3sat. To do this, we first introduce a more general problem: Max-qCSP. A qcsp ( q-ary constraint satisfaction problem ) instance is a collection of boolean functions φ i : {0, 1} n {0, 1} (called constraints), each of which depends on at most q of its input bits. The Max-qCSP problem is to find an input x that satisfies the largest possible number of these constraints. Max-3sat is the special case of Max-3CSP where the constraints are only allowed to be OR functions. We will show that the PCP Theorem implies inapproximability of Max-qCSP. Consider a language L NP. Given an n-bit input x, using the proof whose existence is guaranteed by the PCP Theorem, we will construct an instance I of Max-qCSP with m = poly(n) constraints, such that: If x L, I is satisfiable; If x / L, the largest number of constraints of I that can be satisfied is m 2. Consider a claimed proof that x L, and introduce poly(n) variables {y i }, with one variable corresponding to each bit of the proof. Let R be a string of random bits generated by the verifier. Then R corresponds to a set of bits of the proof to read, and a test function f R to perform on them. For each R, we produce a constraint corresponding to f R. This constraint depends on the variables that are read when random string R is generated, and is satisfied if and only if f R passes. As the verifier only looks at a constant number of bits of the proof, there are at most O(log n) random bits used, so at most poly(n) constraints will be produced. Now, if x L, by the PCP Theorem all the constraints are satisfied. On the other hand, if x / L, at least half of the constraints must not be satisfied (or the probability of the verifier accepting would be greater than 1 2 ). But this reduction implies that, if we could distinguish between satisfiable instances of Max-qCSP and those for which at most half the constraints are satisfiable, we could solve any problem in NP, and hence P = NP. This in turn means that Max-qCSP cannot be approximated within a ratio of 1 2, unless P = NP. 4.3 Back to Max-3sat The final step in the proof of Theorem 4 is to show that the result of the previous section implies inapproximability of Max-3sat, which we will achieve by converting the Max-qCSP instance I into a Max-3sat instance I. First, we rewrite each of the clauses in I as a q-ary CNF expression of size at most 2 q. Second, each of the clauses in this CNF expression can be rewritten as the AND of at most q clauses of length at most 3, using the standard reduction technique from SAT to 3-SAT (which you have found yourself in an exercise). We therefore end up with a CNF expression I with at most m = q 2 q m clauses, each of which is of length at most 3. 4

Now it is clear that, if I is satisfiable, I is also satisfiable. On the other hand, if an ɛ fraction of the constraints of I are not satisfied, then at least an ɛ q 2 fraction of the clauses in I are not q satisfied (as each constraint in I corresponds to at most q 2 q clauses in I ). In particular, we see that the ability to find an approximate solution to Max-3sat that is at least a (1 1 ) fraction q 2 q+1 of the optimum implies the ability to find an approximate solution to Max-qCSP that is at least a 1 1 2 fraction of the optimum. Taking ɛ =, we have proven Theorem 4: there is a constant q 2 q+1 ɛ > 0 such that there is no polynomial-time (1 ɛ)-approximation algorithm for Max-3sat, unless P = NP. 5 Further reading The section of this lecture on PCPs is largely based on the Berkeley course CS294: PCP and Hardness of Approximation by Luca Trevisan 4. The Arora-Barak book has many more details about PCPs (Chapters 11 and 22), including the proof of the tight bound for Max-E3sat. The original proof of the PCP Theorem was the culmination of a series of results drawing together many different concepts in theoretical computer science. Ryan O Donnell has written a nice history of this 5. An algorithm for approximating Max-3sat based on linear programming, which achieves an approximation ratio of 3 4, is discussed in the Advanced Algorithms course here at Bristol6. 4 http://www.cs.berkeley.edu/~luca/pcp/ 5 http://www.cs.washington.edu/education/courses/533/05au/pcp-history.pdf 6 http://www.maths.bris.ac.uk/~csawh/teaching/aa/lect08.pdf 5