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.

Slides:



Advertisements
Similar presentations
Lecture 21 NP-complete problems
Advertisements

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.
Complexity 18-1 Complexity Andrei Bulatov Probabilistic Algorithms.
Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP.
Advanced Topics in Algorithms and Data Structures
CS21 Decidability and Tractability
Graphs 4/16/2017 8:41 PM NP-Completeness.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2004 Lecture 6 Wednesday, 10/13/04 NP-Completeness.
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.
NP-Completeness CS 51 Summer 2008 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A AA A A AAA.
1 Polynomial Time Reductions Polynomial Computable function : For any computes in polynomial time.
Computability and Complexity 20-1 Computability and Complexity Andrei Bulatov Class NL.
NP-Completeness NP-Completeness Graphs 4/17/2017 4:10 AM x x x x x x x
Chapter 11: Limitations of Algorithmic Power
CS3381 Des & Anal of Alg ( SemA) City Univ of HK / Dept of CS / Helena Wong 7. NP-Completeness - 1 NP-Completeness.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 22 Instructor: Paul Beame.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2006 Lecture 6 Monday, 3/6/06 NP-Completeness.
February 20, 2015CS21 Lecture 191 CS21 Decidability and Tractability Lecture 19 February 20, 2015.
Computability and Complexity 17-1 Computability and Complexity Andrei Bulatov Strong NP-Completeness.
NP and Computational Intractability
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
MCS312: NP-completeness and Approximation Algorithms
Theory of Computation, Feodor F. Dragan, Kent State University 1 NP-Completeness P: is the set of decision problems (or languages) that are solvable in.
Computational Complexity Theory Lecture 2: Reductions, NP-completeness, Cook-Levin theorem Indian Institute of Science.
Theory of Computing Lecture 17 MAS 714 Hartmut Klauck.
Prabhas Chongstitvatana1 NP-complete proofs The circuit satisfiability proof of NP- completeness relies on a direct proof that L  p CIRCUIT-SAT for every.
MCS 312: NP Completeness and Approximation algorthms Instructor Neelima Gupta
1 NP-Completeness Poly time algorithm: input size n (in some encoding), worst case running time – O(n c ) for some constant c. Three classes of problems.
TECH Computer Science NP-Complete Problems Problems  Abstract Problems  Decision Problem, Optimal value, Optimal solution  Encodings  //Data Structure.
CSC 413/513: Intro to Algorithms NP Completeness.
CSCI 2670 Introduction to Theory of Computing November 29, 2005.
CSCI 2670 Introduction to Theory of Computing December 1, 2004.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
CSC401 – Analysis of Algorithms Chapter 13 NP-Completeness Objectives: Introduce the definitions of P and NP problems Introduce the definitions of NP-hard.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
1 Design and Analysis of Algorithms Yoram Moses Lecture 11 June 3, 2010
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.
Unit 9: Coping with NP-Completeness
1 NPC NP-Complete Problems 2 We can solve any problem(!)(?) … but perhaps not with a computer! Some problems are not computable: The Halting Problem:
NP-Algorithms Tractable vs Intractable Some problems are intractable: as they grow large, we are unable to solve them in reasonable time.
1 How to establish NP-hardness Lemma: If L 1 is NP-hard and L 1 ≤ L 2 then L 2 is NP-hard.
NP-completeness Class of hard problems. Jaruloj ChongstitvatanaNP-complete Problems2 Outline  Introduction  Problems and Languages Turing machines and.
Additional Classes: co-NP class Krishna Mahesh Deevela Murali.
Discrete Optimization Lecture 6 – Part 2 M. Pawan Kumar
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
Discrete Optimization Lecture 4 M. Pawan Kumar
NP-Completeness  For convenience, the theory of NP - Completeness is designed for decision problems (i.e. whose solution is either yes or no).  Abstractly,
NP-Completeness Note. Some illustrations are taken from (KT) Kleinberg and Tardos. Algorithm Design (DPV)Dasgupta, Papadimitriou, and Vazirani. Algorithms.
NP-complete Languages
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
TU/e Algorithms (2IL15) – Lecture 9 1 NP-Completeness NOT AND OR AND NOT AND.
Complexity ©D.Moshkovitz 1 Our First NP-Complete Problem The Cook-Levin theorem A B C.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
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
Conceptual Foundations © 2008 Pearson Education Australia Lecture slides for this course are based on teaching materials provided/referred by: (1) Statistics.
TU/e Algorithms (2IL15) – Lecture 10 1 NP-Completeness, II.
Data Structures and Algorithm Analysis Lecture 24
Graphs 4/13/2018 5:25 AM Presentation for use with the textbook, Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015 NP-Completeness.
P & NP.
NP-Completeness NP-Completeness Graphs 5/7/ :49 PM x x x x x x x
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 Lecture 26 NP-Completeness
Advanced Algorithms Analysis and Design
NP-Completeness NP-Completeness Graphs 11/16/2018 2:32 AM x x x x x x
NP-Completeness NP-Completeness Graphs 12/3/2018 2:46 AM x x x x x x x
Chapter 34: NP-Completeness
CS 583 Fall 2006 Analysis of Algorithms
Presentation transcript:

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 |y| = O(|x| c ) The algorithm A verifies language L in polynomial time. HAM-CYCLE  NP

If L  P then L  NP, since if there is a polynomial time algorithm to decide L, the algorithm can be easily converted to verification algorithm to accept those inputs that it detemines to be in L. Thus P  NP

Unknown NP is closed under complement? L  NP  /L  NP ? Define complexity class co-NP : L such that /L  NP NP = co-NP ? P is closed under complement P  NP  co-NP

P = NP  co-NP ? Any language in NP  co-NP - NP ? P = NP = co-NP NP = co-NP P co-NP NP P = NP  co-NP co-NP NP NP  co-NP P Four possible relationships between complexity classes

NP-Complete problems If NP - P is nonempty, HAM-CYCLE  NP - P NP-Complete languages are, in a sense, the “hardest” languages in NP. Compare the relative “hardness” of languages by “polynomial time reducibility”.

Reducibility Q is reduced to Q’ if any instance of Q can be “easily rephrased” into an instance of Q’. Then Q is, in a sense, “not harder to solve” than Q’. L 1 is polynomial time reducible to L 2, L 1  p L 2, if there exists a polynomial time computable function f: {0,1}*  {0,1}* such that  x  {0,1}* ; x  L 1 iff f(x)  L 2. f is called reduction function

FA2 A1 x f(x) f(x)  L2 ? x  L1 ? Lemma 36.3 If L 1, L 2  {0,1}* are languages such that L 1  p L 2, then L 2  P implies L 1  P.

NP-completeness A language L  {0,1}* is NP-complete if 1.L  NP and 2.L’  p L for every L’  NP If 2 but not 1 L is NP-hard

Theorem 36.4 If any NP-complete problem is polynomial time solvable, then P = NP. If any problem in NP is not polynomial time solvable, then all NP-complete problems are not polynomial time solvable.

Circuit satisfiability A truth assignment for a boolean combinational circuit is a set of boolean input values. A one- output combinational circuit is satisfiable if it has a truth assignment that causes the output to be 1. CIRCUIT-SAT = { | C is a satisfiable boolean combinational circuit } k inputs, 2 k possible assignments

Lemma 36.5 The circuit satisfiability problem belongs to the class NP. Proof : Provide a polynomial time algorithm that can verify CIRCUIT-SAT.

Lemma 36.6 The circuit satisfiability is NP-hard. Proof : Provide a polynomial time algorithm computing a reduction function f that maps every binary string x to a circuit C = f(x) such that x  L if and only if C  CIRCUIT-SAT.

L  NP, A exists that verifies L in polynomial time. The algorithm F that we shall construct will use the two input algorithm A to compute the reduction function f. Running time of A : T(n) = O(n k ) input string length n, certificate length O(n k )

Basic idea of proof Represent the computation A as a sequence of configurations and M is a combinational circuit that implement the mapping of one configuration to another. Configuration : the program, the program counter, working storage, machine states.

Program A PC machine state x y memory M c1 Program A PC machine state x y memory M c0 Program A PC machine state x y memory cT(n)... input 0/1 output

C i --M--> C i+1 If A run at most T(n) steps the output appears in C T(n) Construct M that computes all configurations. F : given x computes C = f(x) that is satisfiable iff there exists a certificate y such that A(x,y) = 1. when F obtains x, it first computes n = |x| and construct C’ consists of T(n) copies of M.

Proof 1.F correctly computes f. C is satisfiable iff there exists y such that A(x,y) = 1. 2.F runs in polynomial time. Part 1 if part Suppose there exists y, length O(n k ) such that A(x,y) = 1. Apply y to the input of C, the output of C is C(y) = A(x,y) = 1. Thus if a certificate exists then C is satisfiable.

Part 1 only if Suppose C is satisfiable, hence there exists an input y to C such that C(y) = 1, from which we conclude that A(x,y) =1. Part 2 (A runs in polynomial time) The number of bits required to represent a configuration is polynomial in n (n = |x|). Program A has constant size

The length of input x is n The length of the certificate y is O(n k ) The algorithm runs at most O(n k ) steps, the amount of working storage required by A is polynomial of n. The length of a configuration is polynomial in O(n k ) M has the size polynomial in the length of a configuration, hence is polynomial in n.

The circuit C consists of at most t = O(n k ) copies of M, hence it has size in polynomial of n. The construction of C from x can be accomplished in polynomial time by the reduction algorithm F, since each step of construction takes polynomial time. Theorem 36.7 The circuit-satisfiability problem is NP-complete