CSCI3390-Lecture 18: Why is the P =?NP Problem Such a Big Deal?

Similar documents
CSCI3390-Lecture 17: A sampler of NP-complete problems

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

Limitations of Algorithm Power

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

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

NP Complete Problems. COMP 215 Lecture 20

6-1 Computational Complexity

NP-Completeness. CptS 223 Advanced Data Structures. Larry Holder School of Electrical Engineering and Computer Science Washington State University

Design and Analysis of Algorithms

CSCI3390-Lecture 14: The class NP

CSCI3390-Second Test with Solutions

Lecture 15 - NP Completeness 1

Computational Complexity

Computer Science 385 Analysis of Algorithms Siena College Spring Topic Notes: Limitations of Algorithms

Topics in Complexity Theory

Data Structures in Java

Algorithms and Theory of Computation. Lecture 19: Class P and NP, Reduction

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

CS/COE

Essential facts about NP-completeness:

NP Completeness. CS 374: Algorithms & Models of Computation, Spring Lecture 23. November 19, 2015

Introduction to Computational Complexity

Undecidable Problems. Z. Sawa (TU Ostrava) Introd. to Theoretical Computer Science May 12, / 65

6.080 / Great Ideas in Theoretical Computer Science Spring 2008

Introduction to Complexity Theory

P P P NP-Hard: L is NP-hard if for all L NP, L L. Thus, if we could solve L in polynomial. Cook's Theorem and Reductions

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.

CS 6505, Complexity and Algorithms Week 7: NP Completeness

CSC 5170: Theory of Computational Complexity Lecture 9 The Chinese University of Hong Kong 15 March 2010

Advanced topic: Space complexity

NP-Complete Problems. More reductions

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

CMSC 441: Algorithms. NP Completeness

Notes for Lecture 21

CS154, Lecture 17: conp, Oracles again, Space Complexity

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

Lecture 4: NP and computational intractability

Summer School on Introduction to Algorithms and Optimization Techniques July 4-12, 2017 Organized by ACMU, ISI and IEEE CEDA.

Lecture 20: conp and Friends, Oracles in Complexity Theory

Automata Theory CS Complexity Theory I: Polynomial Time

NP Completeness and Approximation Algorithms

NP-completeness. Chapter 34. Sergey Bereg

Algorithms: COMP3121/3821/9101/9801

Easy Problems vs. Hard Problems. CSE 421 Introduction to Algorithms Winter Is P a good definition of efficient? The class P

NP-Completeness. Andreas Klappenecker. [based on slides by Prof. Welch]

CSCI 1590 Intro to Computational Complexity

1.1 P, NP, and NP-complete

DESIGN AND ANALYSIS OF ALGORITHMS. Unit 6 Chapter 17 TRACTABLE AND NON-TRACTABLE PROBLEMS

Unit 6 Chapter 17 TRACTABLE AND NON-TRACTABLE PROBLEMS

Tractable & Intractable Problems

NP-Complete Problems. Complexity Class P. .. Cal Poly CSC 349: Design and Analyis of Algorithms Alexander Dekhtyar..

Complexity Theory: The P vs NP question

CHAPTER 3 FUNDAMENTALS OF COMPUTATIONAL COMPLEXITY. E. Amaldi Foundations of Operations Research Politecnico di Milano 1

NP-complete problems. CSE 101: Design and Analysis of Algorithms Lecture 20

Harvard CS 121 and CSCI E-121 Lecture 22: The P vs. NP Question and NP-completeness

NP-Complete Reductions 1

1 PSPACE-Completeness

1 Reductions and Expressiveness

: Computational Complexity Lecture 3 ITCS, Tsinghua Univesity, Fall October 2007

A.Antonopoulos 18/1/2010

Algorithms. Sudoku. Rubik s cube. Evaluating how good (how efficient) an algorithm is 3/4/17. Algorithms, complexity and P vs NP SURVEY

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

Umans Complexity Theory Lectures

Lecture 22: Counting

Chapter Finding parse trees

CSCI 1590 Intro to Computational Complexity

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

Computational complexity theory

Problem Complexity Classes

Complexity, P and NP

First-Order Logic. 1 Syntax. Domain of Discourse. FO Vocabulary. Terms

NP-Complete and Non-Computable Problems. COMP385 Dr. Ken Williams

P, NP, NP-Complete. Ruth Anderson

CS 3719 (Theory of Computation and Algorithms) Lectures 23-32

} } } Lecture 23: Computational Complexity. Lecture Overview. Definitions: EXP R. uncomputable/ undecidable P C EXP C R = = Examples

More on NP and Reductions

Logic: The Big Picture

Lecture Notes 4. Issued 8 March 2018

Combinatorial Optimization

6.841/18.405J: Advanced Complexity Wednesday, February 12, Lecture Lecture 3

Computational Complexity. IE 496 Lecture 6. Dr. Ted Ralphs

Giving a step-by-step reduction from SAT to TSP and giving some remarks on Neil Tennant's Changes of Mind

Lecture 8. MINDNF = {(φ, k) φ is a CNF expression and DNF expression ψ s.t. ψ k and ψ is equivalent to φ}

ECS122A Handout on NP-Completeness March 12, 2018

NP-Completeness. ch34 Hewett. Problem. Tractable Intractable Non-computable computationally infeasible super poly-time alg. sol. E.g.

COMPLEXITY THEORY. Lecture 17: The Polynomial Hierarchy. TU Dresden, 19th Dec Markus Krötzsch Knowledge-Based Systems

Chapter 34: NP-Completeness

NP-COMPLETE PROBLEMS. 1. Characterizing NP. Proof

conp, Oracles, Space Complexity

Instructor N.Sadagopan Scribe: P.Renjith

NP, polynomial-time mapping reductions, and NP-completeness

Lecture 19: Finish NP-Completeness, conp and Friends

Lecture 7: The Polynomial-Time Hierarchy. 1 Nondeterministic Space is Closed under Complement

Finish K-Complexity, Start Time Complexity

Notes for Lecture Notes 2

CSCI3390-Lecture 6: An Undecidable Problem

CS 350 Algorithms and Complexity

Computational complexity theory

Transcription:

CSCI3390-Lecture 18: Why is the P =?NP Problem Such a Big Deal? The conjecture that P is different from NP made its way on to several lists of the most important unsolved problems in Mathematics (never mind Computer Science, where it is the most important unsolved problem). It is relatively simple to state, even simpler to paraphrase: Is finding a solution harder than just verifying a solution? and, judging by the strenuous efforts that have made to solve it during the past four decades, very, very hard. Depending on whom you listen to, the conjecture is either something that must be true, with unthinkable consequences otherwise or, something that might very well be false. If it is false, then it will reshape our view of the computational universe, in a way that goes beyond the development of efficient algorithms for a collection of NP-complete combinatorial decision problems like CLIQUE and 3- COLORABILITY. These notes are a summary of a few of these consequences. 1 Polynomial solution to optimization problems If P=NP then we would have polynomial-time solutions for a number of hard optimization problems, not just decision problems. We ll concentrate on one such problem, but the principle is quite general. The Traveling Salesman Problem (TSP) has as its input a weighted undirected graph G, together with a home vertex v. The weights are integers attached to each edge of the graph. Thus the size of a problem instance includes the total number of bits required to write down all the weights, as well as tabulate all the vertices and edges. The output of the problem is a circuit, beginning and ending at vertex v, that has minimum total weight. Think of the vertices of the graph as 1

the cities on a salesman s route, and the weight of an edge between, say, Boston and Philadelphia as the cost of traveling between these two cities. The problem is then to visit every city on the salesman s route as efficiently as possible. First note that this problem is as hard as any problem in NP, in the sense that if we had a polynomial-time solution, then it would follow that P=NP. To see this, let G be a graph with n vertices, and let us assign weight 1 to every edge. Pick any vertex v as the home. Then this weighted graph has an optimal traveling salesman circuit of length n if and only if G has a Hamiltonian circuit. Thus a polynomialtime solution to the TSP implies a polynomial-time solution to an NP-complete decision problem, and thus P=NP. We ll show the converse: That is, suppose that P=NP. We will give a polynomialtime algorithm that finds an optimal route for the salesman. Let N be an integer that is greater than the number of vertices, the number of edges, and the number of bits in each weight. We can take N as a measure of the size of the input instance. The graph has no circuit at all if it is not connected, and this is something that we can determine in polynomial time. If the graph is connected, then doing a depth-first search would provide a circuit that traverses each edge exactly twice. The total weight of this circuit is no more than twice the sum of N N-bit numbers; that is, no more than M = 2N 2 N. Now consider the following decision problem (Problem 1): The input consists of the TSP input, together with a threshold value T. The output is Yes if and only if there is a circuit of weight no more than T. This problem is easily seen to be in NP, since if we had a candidate circuit we could efficiently verify that its weight does not exceed the threshold. Thus if P=NP we have a polynomial-time algorithm for this decision problem. We now couple this algorithm with binary search, first testing if there is a circuit with weight no more than M/2. If there is, we repeat with T = M/4, if not, with T = 3M/4. In no more than log 2 M < 2N iterations, we will find the exact weight of the optimal path. Since each iteration requires time p(n), where p is a polynomial (using our P=NP assumption!) we have shown a polynomial-time algorithm for finding the exact weight of an optimal circuit. What about finding the optimal circuit itself? We now turn to another decision problem (Problem 2). Here the input is the weighted graph G, a home vertex v, a sequence of no more than N vertices v = v 0, v 1,..., v k, and a target T. The output is Yes if and only if there is a circuit of weight T that starts with the sequence v 0,..., v k. Once again, this problem is in NP, so if P=NP, it can be decided in polynomial time. We now use for T the optimal value determined by our solution to Problem 1, 2

and try out every vertex of G for v 1. We will thus run our algorithm no more than N times to determine the first vertex on an optimal circuit. We proceed similarly to find an appropriate value of v 2, etc. Thus we find an optimal circuit in N 2 iterations of our algorithm for Problem 2, so this is still polynomial time. 2 conp, P, and beyond ( collapse of the polynomialtime hierarchy ) Consider the problem of determining whether a propositional formula φ is a tautology that is, whether every assignment is satisfying. This is equivalent to the problem of determining whether φ is a contradiction i.e., has no satisfying assignments. The naïve algorithm for testing this is, as with SAT, to try out every one of the 2 n assignments to the n variables in the formula. However, with SAT there was the possibility of getting lucky and chancing upon a satisfying assignment before all the possibilities are examined. With the tautology problem, or the equivalent contradiction problem, there are no such lucky guesses to show that something is a tautology, so yes instances of this problem seem harder than SAT. (On the other hand, we could get lucky and find a non-satisfying assignment which would give us a quick No answer.) The contradiction problem is the complement of SAT. Similarly, the complement of the graph 3-colorability problem is the collection of graphs that can t be 3-colored; the complement of the Hamiltonian circuit problem is the collection of graphs that don t have Hamiltonian circuits, etc. The class conp consists of the complements of NP problems. The tautology problem is also in here, because it is the complement of the NP problem of determining if there is a non-satisfying assignment. If it happened that P = NP, then NP would be closed under complement (because P is). We would then have NP = conp = P, so all of these complement problems would also be solvable in polynomial time. But there s more. Suppose we are given two propositional formulas (or even boolean circuits) φ and ψ and asked if they are equivalent i.e., whether they agree on all assignments. That is, we are asking whether (φ ψ) ( φ ψ) is a tautology. As noted, this is a problem is in conp. To solve it, we would presumably test every possible assignment. 3

Now, suppose we are given a single formula or circuit φ, and we ask if there is a smaller formula or circuit ψ that is equivalent to φ. Ordinarily we would have to run through every formula smaller than φ and test it for equivalence, which requires us to run through every assignment. But now we can apply the hypothesis P=NP twice: equivalence testing would be in P, so the existence of a witness formula ψ would be in NP, and hence in P. So this problem, too, which appears to be at a higher level of complexity, would also be solvable in P. (More technical).what are these higher levels of complexity? We can define these various complea problem L in NP have the following form: There is some polynomial-time computable, boolean-valued function F and positivek > 0 such that w L x( x w k F (w, x)). This is just a fancy way in the language of predicate logic to express the existence of a polynomial-size witness. We might paraphrase this and write Then conp is characterized by or, more succinctly, NP = P. w L x( x w k F (w, x)), conp = P. Continuing with this theme, our formula equivalence problem has another layer of quantifiers: ψ( ψ φ x(x {0, 1} n ψ(x) = φ(x))), where by φ(x) I mean the result of substituting the assignment x for the variables in φ. We might call the underlying complexity class P. The same argument we gave above shows that, if P=NP, then no matter how many levels of quantification we apply, all such problems are solvable in polynomial time. This is called the collapse of the polynomial-time hierarchy. 4

3 The End of Creativity in Mathematics and Science? This point was raised, in different language, by Gödel in a letter written in the 1950 s long before the research on NP-complete problems began and only discovered after his death. A sentence of arithmetic expressing a complex theorem, if written out completely, might take up perhaps one thousand (10 3 ) symbols. Any proof that we are likely to comprehend, or, for that matter, check with a computer, would not use more than one billion symbols (10 9 ). Now consider the set of sentences φ of arithmetic that are theorems, and have proofs of length no more than φ 3. This problem is in NP. If P=NP then we would have a polynomial-time algorithm for settling all such questions of arithmetic, and even finding the proofs. Some would view this as a complete automation of the process of discovery and creation in mathematics and this has even been extrapolated to the discovery of scientific theories. (I don t find this terribly convincing, and I don t really buy it, so I may not be the best advocate or explainer of this line of thought.) 5