NP Completeness. Richard Karp, 1972.

Similar documents
NP-Complete problems

CS154, Lecture 15: Cook-Levin Theorem SAT, 3SAT

Complete problems for classes in PH, The Polynomial-Time Hierarchy (PH) oracle is like a subroutine, or function in

Lecture 2. 1 More N P-Compete Languages. Notes on Complexity Theory: Fall 2005 Last updated: September, Jonathan Katz

Lecture 17: Cook-Levin Theorem, NP-Complete Problems

NP Complete Problems. COMP 215 Lecture 20

NP-Complete Reductions 1

The Cook-Levin Theorem

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

CS 6505, Complexity and Algorithms Week 7: NP Completeness

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

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

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

Essential facts about NP-completeness:

2 P vs. NP and Diagonalization

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

Lecture 7: Polynomial time hierarchy

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

NP-Complete Reductions 2

Lecture 20: conp and Friends, Oracles in Complexity Theory

1. Introduction Recap

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

Intro to Theory of Computation

Complexity, P and NP

CSE 135: Introduction to Theory of Computation NP-completeness

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

Complexity Classes V. More PCPs. Eric Rachlin

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

CS154, Lecture 13: P vs NP

NP-completeness was introduced by Stephen Cook in 1971 in a foundational paper.

CSCI 1010 Models of Computa3on. Lecture 11 Proving Languages NP-Complete

CS21 Decidability and Tractability

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

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

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

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

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

CS21 Decidability and Tractability

15.1 Proof of the Cook-Levin Theorem: SAT is NP-complete

CSE 105 THEORY OF COMPUTATION

6.080 / Great Ideas in Theoretical Computer Science Spring 2008

Lecture 13, Fall 04/05

NP-Completeness. Algorithmique Fall semester 2011/12

Introduction to Complexity Theory

Chapter 7: Time Complexity

1 Circuit Complexity. CS 6743 Lecture 15 1 Fall Definitions

Lecture 3: Nondeterminism, NP, and NP-completeness

SAT, Coloring, Hamiltonian Cycle, TSP

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 P vs. BPP problem. 30/12/2016 Lecture 11

On the Computational Hardness of Graph Coloring

Algorithm Design and Analysis

Week 3: Reductions and Completeness

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

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

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).

The Polynomial Hierarchy

Lecture 19: Finish NP-Completeness, conp and Friends

CS154, Lecture 13: P vs NP

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

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

Lecture 3: Reductions and Completeness

Lecture 4: NP and computational intractability

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

conp, Oracles, Space Complexity

Introduction. Pvs.NPExample

Correctness of Dijkstra s algorithm

Introduction to Complexity Theory. Bernhard Häupler. May 2, 2006

Notes for Lecture 3... x 4

Introduction to Computational Complexity

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

P = k T IME(n k ) Now, do all decidable languages belong to P? Let s consider a couple of languages:

CS256 Applied Theory of Computation

Lecture 6: Oracle TMs, Diagonalization Limits, Space Complexity

A.Antonopoulos 18/1/2010

Lecture #14: NP-Completeness (Chapter 34 Old Edition Chapter 36) Discussion here is from the old edition.

Chapter 34: NP-Completeness

ECE 695 Numerical Simulations Lecture 2: Computability and NPhardness. Prof. Peter Bermel January 11, 2017

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

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

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

Chapter 2 : Time complexity

$1,000,000. P vs. NP. the prize for solving any of the Millennium Prize Problems. Millennium Prize Problems. Millennium Prize Problems

Notes on Complexity Theory Last updated: October, Lecture 6

6-1 Computational Complexity

COMP 382. Unit 10: NP-Completeness

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

Complexity Theory Final Exam

Notes on Computer Theory Last updated: November, Circuits

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

Theory of Computation Time Complexity

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

NP Completeness and Approximation Algorithms

DRAFT. Complexity of counting. Chapter 8

SAT, NP, NP-Completeness

1 From previous lectures

Umans Complexity Theory Lectures

Transcription:

NP Completeness In this paper we give theorems that suggest, but do not imply, that these problems as well as many others, will remain intractable perpetually. Richard Karp, 1972.

Reductions At the heart of today s complexity theory L 1 L 2 if problem of deciding L 1 reduces to that of deciding L 2 if can decide L 2, can decide L 1

Turing and Many-One Turing reduction: Build a TM (oracle machine) M L1, s.t. using the oracle O L2 which decides L 2, M L1^O L2 decides L 1 M L1 may query O L2 many times (with different inputs) Many-One: M L1 can query O L2 only once, and must output what O L2 outputs L 1 L2 M L1 maps its input x to an input f(x) for O L2 x L 1 f(x) L 2 and x L 1 f(x) L 2

Polynomial-Time Reduction Many-one reduction, where M L1 runs in polynomial time L 1 p L 2 L 2 is computationally (almost) as hard or harder compared to L 1 almost : reduction overheads (reduction time, size blow-up) L 2 may be way harder

Cook, Karp, Levin Polynomial-time reduction Cook: Turing reduction Karp: Many-one reduction We use this for p Between NP languages Levin: Karp + witnesses easily transformed back and forth Parsimonious: Karp + number of witnesses doesn t change

NP-completeness A language L is NP-Hard if for all L in NP, L p L A language L is NP-Complete if it is NP-Hard and is in NP To efficiently solve all problems in NP, you need to efficiently solve L and nothing more

A simple NPC language TMSAT = { (M,z,1 n,1 t ) w, w <n, s.t. TM represented by M accepts (z,w) within time t } TMSAT is in NP: TMVAL = { (M,z,1 n,1 t,w) w <n and TM represented by M accepts (z,w) within time t } is in P TMSAT is NP-hard: Given a language L in NP defined as L = { x w, w <n s.t. M L accepts (x,w) } and M L runs within time t, (where n,t are poly( x ) ), let the Karp reduction be f(x) = (M L,x,1 n,1 t ) Any natural NPC language?

Boolean Circuits Boolean valued wires, AND, OR, NOT, CONST gates, inputs, output, directed acyclic graph 0 1 Circuit evaluation CKT-VAL: given (ckt,inputs) find ckt s boolean output value Can be done very efficiently: CKT-VAL is in P CKT-SAT: given ckt, is there a satisfying input (output=1). In NP.

CKT-SAT is NP-Complete Reduce any NP language L to CKT-SAT Let s start from the TM for verifying membership in L, with time bound T Build a circuit which on input w outputs what the TM outputs on (x,w), within T steps This circuit is an instance of CKT-SAT Ensure reduction is poly-time

TM to Circuit Wires for configurations: a bundle for each tape cell, encoding (content,state), where state is encoded in the cell with the head Circuitry for evolution: each bundle depends (as specified by the TM) on 3 neighbouring bundles at the previous level (Part of) initial configuration, namely w, to be plugged in as input T configurations, T bundles each Circuit size = O(T 2 ) (x,w) x,q 0 w

TM to Circuit Reducing any NP language L to CKT-SAT TM for verifying membership in L, time-bound T, and input x A circuit which on input w outputs what the TM outputs on (x,w) within T steps Poly-time reduction CKT-SAT is NP-complete (x,w) x,q 0 w

Other NP-complete problems SAT and 3SAT SAT: Are all given clauses simultaneously satisfiable? (Conjunctive Normal Form) 3SAT: Each clause has at most 3 literals CLIQUE, INDEP-SET, VERTEX-COVER Hundreds (thousands?) more known Shown using already known ones: If L p L 1 and L 1 p L 2, then L p L 2

CKT-SAT p SAT Converting a circuit to a collection of clauses: For each wire (connected component), add a variable For each gate, add a clause involving variables for wires connected to the gate: x e.g. y AND z: (z x), (z y), ( z x y). i.e., ( z x), ( z y), (z x y). and x y OR z: (z x y), ( z x), ( z y).

SAT p 3SAT Previous reduction was to 3SAT, so 3SAT is NP-complete. And SAT is in NP. So SAT p 3SAT. More directly: (a b c d e) (a b x), ( x c d e) (a b x), ( x c y), ( y d e) Reduction needs 3SAT 2SAT is in fact in P! [Exercise] Reduction not parsimonious (can you make it? [Exercise])

3SAT p CLIQUE Clauses Graph vertices: each clause s satisfying assignments (for its variables) edges between consistent assignments m-clique iff all m clauses satisfiable (x y z) (w y) 1*0* 0*1* 1*1* (w x z) 3-Clique sat assignment 1*1* *110 11*0 ---- 1110 *000 *111 *100 *101 *110 *001 *010 00*0 11*1 10*0 01*1 01*0 10*1 11*0

INDEP-SET and VERTEX-COVER CLIQUE p INDEP-SET G has an m-clique iff G has an m-independent-set INDEP-SET p VERTEX-COVER G has an m-indep-set iff G has an (n-m)-vertex-cover

NP, P, co-np and NPC We say class X is closed under polynomial reductions if (L 1 p L 2 and L 2 in class X) implies L 1 in X e.g. P, NP are closed under polynomial reductions So is co-np (If X is closed, so is co-x. Why?) If any NPC language is in P, then NP = P NP conp If any NPC language is in co-np, then NP = co-np Note: X co-x X = co-x (Why?) NPC P conpc L is NP-complete iff L c is co-np-complete (Why?) co-np complete = co-(np-complete)

Today Polynomial-time reductions NP-completeness (using Karp reductions) Trivially, TMSAT Interestingly, CKT-SAT, SAT, 3SAT, CLIQUE, INDEP-SET, VERTEX-COVER If any NPC language in P, then P=NP

Next Time Ladner s Theorem: If NP P, then non-p, non-npc languages Time hierarchy theorems: More time, more power, strictly!