1 How to establish NP-hardness Lemma: If L 1 is NP-hard and L 1 ≤ L 2 then L 2 is NP-hard.

Slides:



Advertisements
Similar presentations
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Advertisements

NP-Hard Nattee Niparnan.
 2004 SDU Lecture17-P,NP, NPC.  2004 SDU 2 1.Decision problem and language decision problem decision problem and language 2.P and NP Definitions of.
Lecture 21 NP-complete problems
Complexity class NP Is the class of languages that can be verified by a polynomial-time algorithm. L = { x in {0,1}* | there exists a certificate y with.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
1 L is in NP means: There is a language L’ in P and a polynomial p so that L 1 · L 2 means: For some polynomial time computable map r : 8 x: x 2 L 1 iff.
Computability and Complexity 14-1 Computability and Complexity Andrei Bulatov Cook’s Theorem.
CS21 Decidability and Tractability
February 23, 2015CS21 Lecture 201 CS21 Decidability and Tractability Lecture 20 February 23, 2015.
1 Polynomial Church-Turing thesis A decision problem can be solved in polynomial time by using a reasonable sequential model of computation if and only.
1 Polynomial Church-Turing thesis A decision problem can be solved in polynomial time by using a reasonable sequential model of computation if and only.
1 Polynomial Church-Turing thesis A decision problem can be solved in polynomial time in a reasonable sequential model of computation if and only if it.
1 Polynomial Time Reductions Polynomial Computable function : For any computes in polynomial time.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 23 Instructor: Paul Beame.
NP-Completeness (2) NP-Completeness Graphs 4/17/2017 6:25 AM x x x x x
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
Chapter 11: Limitations of Algorithmic Power
Theory of Computing Lecture 19 MAS 714 Hartmut Klauck.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
1 L is in NP means: There is a language L’ in P and a polynomial p so that L 1 ≤ L 2 means: For some polynomial time computable map r : x: x L 1 iff r(x)
Complexity Classes Kang Yu 1. NP NP : nondeterministic polynomial time NP-complete : 1.In NP (can be verified in polynomial time) 2.Every problem in NP.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
Computational Complexity Theory Lecture 2: Reductions, NP-completeness, Cook-Levin theorem Indian Institute of Science.
Theory of Computing Lecture 17 MAS 714 Hartmut Klauck.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Prabhas Chongstitvatana1 NP-complete proofs The circuit satisfiability proof of NP- completeness relies on a direct proof that L  p CIRCUIT-SAT for every.
Polynomial-time reductions We have seen several reductions:
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
1 Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples: b number of comparisons needed to find the.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
1 P P := the class of decision problems (languages) decided by a Turing machine so that for some polynomial p and all x, the machine terminates after at.
Lecture 12 P and NP Introduction to intractability Class P and NP Class NPC (NP-complete)
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
CSE 589 Part V One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important. Bertrand Russell.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
NP Completeness Piyush Kumar. Today Reductions Proving Lower Bounds revisited Decision and Optimization Problems SAT and 3-SAT P Vs NP Dealing with NP-Complete.
NP-complete Languages
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
TU/e Algorithms (2IL15) – Lecture 9 1 NP-Completeness NOT AND OR AND NOT AND.
1 SAT SAT: Given a Boolean function in CNF representation, is there a way to assign truth values to the variables so that the function evaluates to true?
1 Design and Analysis of Algorithms Yoram Moses Lecture 13 June 17, 2010
CSE 332: NP Completeness, Part II Richard Anderson Spring 2016.
TU/e Algorithms (2IL15) – Lecture 10 1 NP-Completeness, II.
NP-Completeness A problem is NP-complete if: It is in NP
NP-Completeness (2) NP-Completeness Graphs 4/13/2018 5:22 AM x x x x x
P & NP.
Computational Complexity Theory
L is in NP means: There is a language L’ in P and a polynomial p so that L1 ≤ L2 means: For some polynomial time computable map r :  x: x  L1 iff.
Richard Anderson Lectures NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
NP-Completeness Proofs
Richard Anderson Lecture 26 NP-Completeness
Lecture 24 NP-Complete Problems
ICS 353: Design and Analysis of Algorithms
NP-Completeness (2) NP-Completeness Graphs 11/23/2018 2:12 PM x x x x
Richard Anderson Lecture 25 NP-Completeness
Richard Anderson Lecture 28 NP-Completeness
Chapter 34: NP-Completeness
Richard Anderson Lecture 30 NP-Completeness
Prabhas Chongstitvatana
Richard Anderson Lecture 26 NP-Completeness
NP-Completeness (2) NP-Completeness Graphs 7/9/2019 6:12 AM x x x x x
Presentation transcript:

1 How to establish NP-hardness Lemma: If L 1 is NP-hard and L 1 ≤ L 2 then L 2 is NP-hard.

2 SAT SAT is in NP. Cook’s theorem (1972): SAT is NP-hard.

3 SAT SAT: Given a Boolean function in CNF representation, is there a way to assign truth values to the variables so that the function evaluates to true? SAT: Given a CNF, is it true that it does not represent the constant-0 function? Input: ( ¬ x 1 ∨ ¬ x 2 ) ∧ (x 1 ∨ x 2 ) Output: Yes. Input: ( ¬ x 1 ∨ ¬ x 2 ) ∧ (x 1 ∨ x 2 ) ∧ (x 1 ∨ ¬ x 2 ) ∧ ( ¬ x 1 ∨ x 2 ) Output: No.

4 Cooks’ theorem: SAT is NP-hard Proof of Cook’s theorem: – CIRCUIT SAT is NP-hard. – CIRCUIT SAT reduces to SAT. – Hence, SAT is NP-hard.

5 CIRCUIT SAT CIRCUIT SAT: Given a Boolean circuit, is there a way to assign truth values to the input gates, so that the output gate evaluates to true? Generalizes SAT, as CNFs are formulas and formulas are circuits.

6 Circuits vs. Turing Machines We consider Circuits also as computational devices themselves. Like Turing Machines, circuits C: {0,1} n  {0,1} solve decision problems on {0,1} n. Unlike Turing machines, circuits takes inputs of a fixed input length n only.

7 CIRCUIT SAT is NP-hard Given an arbitrary language L in NP we must show that L reduces to CIRCUIT SAT. This means: We must construct a polynomial time computable map r mapping instances of L to circuits, so that ∀ x: x ∈ L ⇔ r(x) ∈ CIRCUIT SAT The only thing we know about L is that there is a language L’ in P and a polynomial p, so that:

8 Theorem Given Turing Machine M for L’ running in time at most q(n) on inputs of length n, where q is a polynomial. For every n, there is a circuit C n with at most O(q(n) 2 ) gates so that ∀ x ∈ {0,1} n : C n (x)=1 iff M accepts x. The map 1 n  C n is polynomial time computable.

9 The Tableau Method Time 0 Time 1 Time t … s 21 Can be replaced by acyclic Boolean circuit of size ≈ s

10 Cell state vectors Given a Turing Machine computation, an integer t and an integer i let c ti  {0,1} s be a Boolean representation of the following information, a cell state vector: –The symbol in cell i at time t –Whether or not the head is pointing to cell i at time t –If the head is pointing to cell i, what is the state of the finite control of the Turing machine at time t? The integer s depends only on the Turing machine (not the input to the computation, nor t,i). To make c ti defined for all t, we let c (t+1)i = c ti if the computation has already terminated at time t.

11 Crucial Observation If we know the Turing machine and c t-1,i-1, c t-1,i, c t-1, i+1, we also can determine c t,i. In other words, there is a Boolean function h depending only on the Turing machine so that c t,i = h(c t-1,i-1, c t-1,i, c t-1,i+1 ). A circuit D for h is the central building block in a circuit computing all cell state vectors for all times for a given input.

12 2 t(n) t(n) x1x1 xnxn

13 Cooks’ theorem: SAT is NP-hard Proof of Cook’s theorem: – CIRCUIT SAT is NP-hard. – CIRCUIT SAT reduces to SAT. – Hence, SAT is NP-hard.

14 SAT ILP MILP MAX INDEPENDENT SET MIN VERTEX COLORING HAMILTONIAN CYCLE TSP TRIPARTITE MATCHING SET COVER KNAPSACK BINPACKING

15

16 Remarks on Papadimitriou’s terminology When Papadimitriou writes “log space reduction”, just substitute “polynomial time reduction”. When Papadimitriou writes NL, just substitute P. Papadimtriou’s concepts are more restrictive, but the more restrictive definitions will play no role in this course.