1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 22 Instructor: Paul Beame.

Slides:



Advertisements
Similar presentations
Polynomial-time reductions We have seen several reductions:
Advertisements

1 NP-completeness Lecture 2: Jan P The class of problems that can be solved in polynomial time. e.g. gcd, shortest path, prime, etc. There are many.
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Concept of Completeness and hardness for a complexity class Definition.
The Theory of NP-Completeness
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
Graphs 4/16/2017 8:41 PM NP-Completeness.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 21 Instructor: Paul Beame.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
The Theory of NP-Completeness
NP-Complete Problems Problems in Computer Science are classified into
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 23 Instructor: Paul Beame.
Analysis of Algorithms CS 477/677
NP-Completeness NP-Completeness Graphs 4/17/2017 4:10 AM x x x x x x x
Last class Decision/Optimization 3-SAT  Independent-Set Independent-Set  3-SAT P, NP Cook’s Theorem NP-hard, NP-complete 3-SAT  Clique, Subset-Sum,
NP-complete examples CSC3130 Tutorial 11 Xiao Linfu Department of Computer Science & Engineering Fall 2009.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 24 Instructor: Paul Beame.
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
Chapter 11: Limitations of Algorithmic Power
Toward NP-Completeness: Introduction Almost all the algorithms we studies so far were bounded by some polynomial in the size of the input, so we call them.
Complexity Issues Mark Allen Weiss: Data Structures and Algorithm Analysis in Java Lydia Sinapova, Simpson College.
P, NP, and NP-Complete Suzan Köknar-Tezel.
Hardness Results for Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.
Hardness Results for Problems
1 The Theory of NP-Completeness 2 NP P NPC NP: Non-deterministic Polynomial P: Polynomial NPC: Non-deterministic Polynomial Complete P=NP? X = P.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
The Theory of NP-Completeness 1. What is NP-completeness? Consider the circuit satisfiability problem Difficult to answer the decision problem in polynomial.
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Complexity Classes (Ch. 34) The class P: class of problems that can be solved in time that is polynomial in the size of the input, n. if input size is.
The Complexity of Optimization Problems. Summary -Complexity of algorithms and problems -Complexity classes: P and NP -Reducibility -Karp reducibility.
1 Computational Complexity Classify problems according to the amount of computational resources used by the best algorithms that solve them Recall: worst-case.
NP Complexity By Mussie Araya. What is NP Complexity? Formal Definition: NP is the set of decision problems solvable in polynomial time by a non- deterministic.
TECH Computer Science NP-Complete Problems Problems  Abstract Problems  Decision Problem, Optimal value, Optimal solution  Encodings  //Data Structure.
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.
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 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
1 Chapter 34: NP-Completeness. 2 About this Tutorial What is NP ? How to check if a problem is in NP ? Cook-Levin Theorem Showing one of the most difficult.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
Lecture 6 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
NP-Complete Problems Algorithm : Design & Analysis [23]
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
NP-Algorithms Tractable vs Intractable Some problems are intractable: as they grow large, we are unable to solve them in reasonable time.
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.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
Lecture 25 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
CSE 6311 – Spring 2009 ADVANCED COMPUTATIONAL MODELS AND ALGORITHMS Lecture Notes – Feb. 3, 2009 Instructor: Dr. Gautam Das notes by Walter Wilson.
NPC.
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.
CSC 413/513: Intro to Algorithms
COMPLEXITY. Satisfiability(SAT) problem Conjunctive normal form(CNF): Let S be a Boolean expression in CNF. That is, S is the product(and) of several.
1 Ch 10 - NP-completeness Tractable and intractable problems Decision/Optimization problems Deterministic/NonDeterministic algorithms Classes P and NP.
Lecture. Today Problem set 9 out (due next Thursday) Topics: –Complexity Theory –Optimization versus Decision Problems –P and NP –Efficient Verification.
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
COMPLEXITY. Satisfiability(SAT) problem Conjunctive normal form(CNF): Let S be a Boolean expression in CNF. That is, S is the product(and) of several.
1 The Theory of NP-Completeness 2 Review: Finding lower bound by problem transformation Problem X reduces to problem Y (X  Y ) iff X can be solved by.
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.
34.NP Completeness. Computer Theory Lab. Chapter 34P.2.
Conceptual Foundations © 2008 Pearson Education Australia Lecture slides for this course are based on teaching materials provided/referred by: (1) Statistics.
P & NP.
NP-Completeness Yin Tat Lee
NP-Complete Problems.
NP-Completeness Yin Tat Lee
CSE 589 Applied Algorithms Spring 1999
Presentation transcript:

1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 22 Instructor: Paul Beame

2 Polynomial time  Define P (polynomial-time) to be  the set of all decision problems solvable by algorithms whose worst-case running time is bounded by some polynomial in the input size.  P = U k  0 TIME(n k )

3 The complexity class NP  NP consists of all decision problems where one can verify the YES answers efficiently (in polynomial time) given a short (polynomial-size) hint.  Some problems in NP and their hints  DecisionTSP: the tour itself,  Independent-Set, Clique: the set U  Satisfiability: an assignment that makes F true.

4 P and NP NP P

5 NP-hardness & NP-completeness  Some problems in NP seem hard  people have looked for efficient algorithms for them for hundreds of years without success  However  nobody knows how to prove that they are really hard to solve, i.e. P  NP

6 NP-hardness & NP-completeness  Alternative approach  show that they are at least as hard as any problem in NP  Rough definition:  A problem is NP-hard iff it is at least as hard as any problem in NP  A problem is NP-complete iff it is both  NP-hard  in NP

7 Showing one problem is at least as hard as another  Reductions  Used before in case of considering whether problems could be solve by programs  we allowed any old program T as the reduction

8 Polynomial-time reductions  We have a problem using our ordinary notion of reduction in complexity  We want that if L  R then, up to a small amount of slop, L is at least as easy as R  But...  our reduction T might take a really, really long time even though it is computable by a program  Solution:  require that program T be efficient, too.

9 Reduction L  R inputs for Linputs for R T x y L(x)=R(T(x)) Intuition: L is at least as easy as R or, equivalently, R is at least as hard as L computable by a program

10 Decision Problems: Reduction L  R inputs for Linputs for R T x y computable by a program yes no L answers yes to x  R answers yes to T(x)

11 Polynomial-time reduction L  p R inputs for Linputs for R x y T computable by a program in polynomial-time yes no L answers yes to x  R answers yes to T(x)

12 Polynomial-time reductions preserve polynomial time  Theorem: If L  p R and R is in P then L is also in P  Proof:  Let T be reduction showing L  p R that runs in polynomial time, say cn t.  Let A be the algorithm solving R that runs in polynomial time, say dn r  Our algorithm B for L first runs T and then runs A on the output of T

13 Running time of B  Running T takes time at most cn t.  The output of T has at most c’n t bits for some constant c’ because we can only create a constant number of output bits per output per step.  Running A on T’s output takes time at most d(c’n t ) r.  The input of A is size at most c’n t.  Total run-time is O(n tr ) which is polynomial

14 NP-hardness & NP-completeness  Definition: A problem R is NP-hard iff every problem L  NP satisfies L  p R  Definition: A problem R is NP-complete iff R is NP-hard and R  NP  Not obvious that such problems even exist!

15 e.g., Independent-Set  p Clique  Independent-Set:  Given a graph G=(V,E) and an integer k, is there a subset U of V with |U|  k such that no two vertices in U are joined by an edge.  Clique:  Given a graph G=(V,E) and an integer k, is there a subset U of V with |U|  k such that every pair of vertices in U is joined by an edge.  What is the reduction T?

16 Cook’s Theorem  Theorem (Cook 1971): Satisfiability is NP-complete  Proof idea:  Given any problem L in NP  Look at the algorithm that verifies the hint for L  One can write a polynomial-size CNF formula F L,x that that can be made true iff the verification algorithm for L, on input x and the hint, liked the hint for L  F L,x is satisfiable iff L answers YES on input x  The transformation from x to F L,x can be computed efficiently

17 P and NP NP P NP-complete NP-hard