Lecture Notes 4. Issued 8 March 2018

Similar documents
CS Lecture 29 P, NP, and NP-Completeness. k ) for all k. Fall The class P. The class NP

6.045: Automata, Computability, and Complexity (GITCS) Class 15 Nancy Lynch

Introduction to Complexity Theory

Lecture 20: conp and Friends, Oracles in Complexity Theory

ECS 120 Lesson 24 The Class N P, N P-complete Problems

an efficient procedure for the decision problem. We illustrate this phenomenon for the Satisfiability problem.

The Class NP. NP is the problems that can be solved in polynomial time by a nondeterministic machine.

Lecture 6: Oracle TMs, Diagonalization Limits, Space Complexity

Design and Analysis of Algorithms

Theory of Computation CS3102 Spring 2014 A tale of computers, math, problem solving, life, love and tragic death

NP Complete Problems. COMP 215 Lecture 20

Essential facts about NP-completeness:

BBM402-Lecture 11: The Class NP

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

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

CS154, Lecture 13: P vs NP

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

Correctness of Dijkstra s 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.

CS154, Lecture 13: P vs NP

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

Exam Computability and Complexity

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

Polynomial-time Reductions

Spring Lecture 21 NP-Complete Problems

Introduction. Pvs.NPExample

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

Computational Complexity

CS Lecture 28 P, NP, and NP-Completeness. Fall 2008

UNIT-VIII COMPUTABILITY THEORY

Logarithmic space. Evgenij Thorstensen V18. Evgenij Thorstensen Logarithmic space V18 1 / 18

CS5371 Theory of Computation. Lecture 19: Complexity IV (More on NP, NP-Complete)

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

Advanced topic: Space complexity

ITCS:CCT09 : Computational Complexity Theory Apr 8, Lecture 7

Turing Machines and Time Complexity

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

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

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

6-1 Computational Complexity

NP-Complete Problems. More reductions

Combinatorial Optimization

CS 6505, Complexity and Algorithms Week 7: NP Completeness

NP Completeness and Approximation Algorithms

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

Complexity, P and NP

1 Reductions and Expressiveness

CS311 Computational Structures. NP-completeness. Lecture 18. Andrew P. Black Andrew Tolmach. Thursday, 2 December 2010

NP-Completeness. NP-Completeness 1

Complexity Theory. Knowledge Representation and Reasoning. November 2, 2005

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

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

1.1 P, NP, and NP-complete

Polynomial-time reductions. We have seen several reductions:

CSCI3390-Lecture 16: NP-completeness

Lecture 4: NP and computational intractability

Lecture 19: Finish NP-Completeness, conp and Friends

NP-Completeness. A language B is NP-complete iff B NP. This property means B is NP hard

The Complexity of Maximum. Matroid-Greedoid Intersection and. Weighted Greedoid Maximization

Umans Complexity Theory Lectures

The purpose here is to classify computational problems according to their complexity. For that purpose we need first to agree on a computational

1 PSPACE-Completeness

Artificial Intelligence. 3 Problem Complexity. Prof. Dr. Jana Koehler Fall 2016 HSLU - JK

Algebraic Dynamic Programming. Solving Satisfiability with ADP

Chapter 7: Time Complexity

Principles of Knowledge Representation and Reasoning

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

CS 5114: Theory of Algorithms

CSCI 1590 Intro to Computational Complexity

Lecture 7: Polynomial time hierarchy

Quantum Computing Lecture 8. Quantum Automata and Complexity

Instructor N.Sadagopan Scribe: P.Renjith. Lecture- Complexity Class- P and NP

3130CIT Theory of Computation

conp, Oracles, Space Complexity

COMP/MATH 300 Topics for Spring 2017 June 5, Review and Regular Languages

Complexity. Complexity Theory Lecture 3. Decidability and Complexity. Complexity Classes

SAT, Coloring, Hamiltonian Cycle, TSP

CMSC 441: Algorithms. NP Completeness

Definition: conp = { L L NP } What does a conp computation look like?

Chapter 34: NP-Completeness

Computational complexity theory

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

DRAFT. Diagonalization. Chapter 4

Lecture 4 : Quest for Structure in Counting Problems

NP-Completeness. f(n) \ n n sec sec sec. n sec 24.3 sec 5.2 mins. 2 n sec 17.9 mins 35.

Computability Theory

CSCI3390-Lecture 14: The class NP

NP-completeness. Chapter 34. Sergey Bereg

Lecture Notes Each circuit agrees with M on inputs of length equal to its index, i.e. n, x {0, 1} n, C n (x) = M(x).

NP-Complete Reductions 2

Lecture 13, Fall 04/05

Comparison of several polynomial and exponential time complexity functions. Size n

NP-COMPLETE PROBLEMS. 1. Characterizing NP. Proof

The P-vs-NP problem. Andrés E. Caicedo. September 10, 2011

Classes of Problems. CS 461, Lecture 23. NP-Hard. Today s Outline. We can characterize many problems into three classes:

Q = Set of states, IE661: Scheduling Theory (Fall 2003) Primer to Complexity Theory Satyaki Ghosh Dastidar

Chapter 2 : Time complexity

Polynomial time reduction and NP-completeness. Exploring some time complexity limits of polynomial time algorithmic solutions

Transcription:

CM30073 Advanced Algorithms and Complexity 1. Structure of the class NP Lecture Notes 4 Issued 8 March 2018 Recall that it is not known whether or not P = NP, the widely accepted hypothesis being that this equality is wrong. Let NP C NP denote the class of all NP -complete problems, and denote NP I := NP \ (NP C P ). Theorem. (1) NP I ; If P NP, then: (2) there exist the problems A, B NP I such that neither A B, nor B A. Proof is nontrivial, we don t consider it in this unit (see the book by M. Garey and D. Johnson). The item (2) of the Theorem states that under the hypothesis P NP the set NP I is divided into more that one equivalence classes with respect to polynomial transformation. 2. Complements to languages Definition. Let L Σ be a language over an alphabet Σ. The set of words L = Σ \ L is called the complement to L. Observe that L is not necessarily a language, i.e. a set of words generated by a grammar (or accepted by a TM). For all problems from NP the complement is indeed a language, however it is not at all obvious that if L NP, then L NP. That is because the definition of NTM (unlike the definition of Yes - No TM) is non-symmetrical with respect to Yes - No output. For the problem CNF SAT, the complement is the following Yes - No prob- Example. lem. Input: Output: Boolean formula F in conjunctive normal form. Yes if F is not satisfiable (i.e., identically false), else No. There is no apparent way of taking advantage of the non-determinism (i.e., guessing module) for solving this problem. It seems to be nothing essentially better than just examining one by one every true/false assignment to all variables and checking whether it gives the value false to F. 3. Class co-n P Definition. 1

(1) co NP = {L : L NP }; (2) co P = {L : L P }; Hypothesis. NP co NP. This hypothesis is stronger than P N P since obviously P = co P, thus if P = NP, then NP = co NP. Theorem. Let L be an NP -complete problem such that L NP. Then NP = co NP. Proof is relatively straightforward. We don t consider it in this course. 4. Some famous candidates for problems in NP I (1) Graph Isomorphism Input: Two graphs G = (V, E) and G = (V, E ). Output: Yes if there is a bijective (one-to-one) map (function), called isomorphism, f : V V such that (v, w) E is equivalent to (f(v), f(w)) E ; else No. The status of Graph Isomorphism is unknown. Despite many efforts no polynomial time algorithm was found. On the other hand, the problem seems to be too rigid to be N P -complete. Compare it with the following N P -complete problem Isomorphism to Subgraph. Input: Two graphs G = (V, E) and G = (V, E ). Output: Yes if there is a subgraph in G which is isomorphic to G ; else No. Isomorphism to Subgraph is N P -complete problem which is proved by polynomially transforming to it the k-clique problem (take as G the complete graph with k vertices). (2) Linear Programming Input : Output : System of linear inequalities in several variables with integer coefficients. Yes if the system is consistent (i.e., has a solution) in real numbers, else No. The status of Linear Programming was open for a long time until in late seventies a polynomial-time algorithm was discovered. Even before that it seemed quite unlikely for the problem to be NP -complete since the complement to Linear Programming is in NP (follows from so-called Duality Theorem in linear programming). If Linear Programming was N P -complete, then, by Theorem from previous section, N P = co N P, which is probably wrong. 5. Search problems The computational problems we considered so far were Yes - No problems, which were associated with languages of inputs with the output Yes. It appears important, however to 2

consider also the problems with more complicated output. In fact, natural modifications of our basic NP -complete problems require a search of an object whose existence is checked. For instance, a modification of the Travelling Salesman problem asks to produce one of the shortest tours, a modification of SAT requires construction of a satisfying assignment. Observe that these modifications (we shall call them search problems) are harder than the corresponding Yes - No problems in the sense that any algorithm for a search problem automatically solves the Yes - No version. The theory we had developed so far is not very well adjusted for search problems. Firstly, the concept of nondeterministic Turing Machine is formulated for Yes - No problems. Secondly, and most importantly, the definition of relation is very specific, formulated essentially in terms of languages. We will start with generalization of the concept of polynomial transformation. 6. Turing transformation: informal definition Let us first recall that for two languages L 1, L 2 the relation L 1 L 2 informally means that there is an algorithm such that: (1) for given input word x 1 of the first problem the algorithm computes an input word x 2 of the second problem, herewith x 1 L 1 if and only if x 2 L 2 ; (2) the algorithm uses a subroutine to solve the problem 2 on the input x 2 and finds output y 2 ; (3) y 2 is also the answer for problem 1. The algorithm uses polynomial time for all its work, except the subroutine. Now we generalize this informal definition for search problems L 1 and L 2 : We say that L 1 is Turing transformable to L 2 if there exists an algorithm which for a given input x 1 of L 1 computes the required output using (zero, or one, or more times) an algorithm for the problem L 2 as a subroutine. The running time of the algorithm is polynomial if each call of the subroutine is counted as one elementary step. 7. Oracle Turing Machine Oracle Turing Machine (OTM) differs from ordinary (deterministic) TM with arbitrary output in the following way. Apart from the usual working tape, OTM has an additional oracle tape equipped with the oracle read-write head which is attached to the control module. OTM works like ordinary TM, but can at an arbitrary moment adopt (via asking state) a special asking mode in which: (1) the oracle head writes a word (which was generated during the previous normal work of the machine) on the oracle tape (oracle input); (2) after (1) is done, the oracle head writes a word on the oracle tape (oracle output). Passage from (1) to (2) is determined by a function g : Γ Γ, ( ) 3

where Γ is the tape alphabet. Each application of asking mode counts as one step for complexity. Since OTM depends on a concrete build-in function g, the notation OTM g might be more appropriate. The formal definition of OTM and its complexity is straightforward. 8. Turing transformation: definition Definition. Let L 1, L 2 be search problems, herewith L 2 is a problem of computing a function g of the form ( ). We say that L 1 is Turing transformable to L 2 (notation: L 1 T L 2 ) if there exists OTM g for solving L 1 using as oracle the function g and having polynomial complexity. Theorem 1. For any two Yes - No problems (languages L 1, L 2 ), if L 1 L 2, then L 1 T L 2. Proof. Trivial, since as we had seen before, is a particular case of T. Remark. languages. It is not known whether the statement inverse to Theorem 1 is true or not for Theorem 2. The relation T is transitive. Proof is straightforward. 9. N P -hard problems Definition. A search problem L is NP -hard if for any language L NP the following holds: L T L. ( ) Theorem. A search problem L is NP -hard if and only if for at least one (thus, for any) NP -complete language L relation ( ) is true. Proof. If L is NP -hard, then for any language from NP, in particular, for any NP - complete language L the relation ( ) is true. Conversely, if there exists an NP -complete language L such that ( ) is true, then for any language L NP we have L L T L, which, by Theorems 1 and 2 of Section 8, implies that L T L, thus L is NP -hard by the definition. Example. Consider a modification of Travelling Salesman problem as a search problem in which the output is the tour of the smallest length. Call this modification Optimal Travelling Salesman (OptTS), as opposed to Yes - No modification (TS) which involves a threshold. 4

Theorem. TS T OptTS, therefore OptTS is NP -hard. Proof. The OTM for TS with threshold B first uses the oracle to solve the OptTS with the same set of cities and distances as the input of TS (one step of computation), then in polynomial time finds the length l of the produced optimal tour and checks whether B l. If the latter inequality is true, then the answer is Yes, else No. Observe that this example does not use the relation T in full force, addressing the oracle only once. 5