NPComplete-handouts-2

# NPComplete-handouts-2 - NP-Completeness 4/20/2006 1:35 AM...

This preview shows pages 1–6. Sign up to view the full content.

NP-Completeness 4/20/2006 1:35 AM 1 NP-Completeness 1 NP-Completeness x 1 x 3 x 2 x 1 x 4 x 3 x 2 x 4 11 12 13 21 22 23 31 32 33 NP-Completeness 2 Outline and Reading P and NP (§13.1) ± Definition of P ± Definition of NP ± Alternate definition of NP NP - completeness (§13.2) ± Definition of NP-hard and NP-complete Some NP -c omplete problems (§13.3) ± Problem reduction ± SAT (and CNF-SAT and 3SAT) ± Vertex Cover ± Clique ± Hamiltonian Cycle

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
NP-Completeness 4/20/2006 1:35 AM 2 NP-Completeness 3 Running Time Revisited Input size, n ± To be exact, let denote the number of bits in a nonunary encoding of the input All the polynomial- time algorithms studied so far in this course run in polynomial time using this definition of input size. ± Exception: any pseudo-polynomial time algorithm ORD PVD MIA DFW SFO LAX LGA HNL 849 8 0 2 1 3 7 4 184 9 1120 233 5 NP-Completeness 4 Dealing with Hard Problems What to do when we find a problem that looks hard… I couldn’t find a polynomial-time algorithm; I guess I’m too dumb. (cartoon inspired by [Garey-Johnson, 79])
NP-Completeness 4/20/2006 1:35 AM 3 NP-Completeness 5 Dealing with Hard Problems Sometimes we can prove a strong lower bound… (but not usually) I couldn’t find a polynomial-time algorithm, because no such algorithm exists! (cartoon inspired by [Garey-Johnson, 79]) NP-Completeness 6 Dealing with Hard Problems NP-completeness let’s us show collectively that a problem is hard. I couldn’t find a polynomial-time algorithm, but neither could all these other smart people. (cartoon inspired by [Garey-Johnson, 79])

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
NP-Completeness 4/20/2006 1:35 AM 4 NP-Completeness 7 Polynomial-Time Decision Problems To simplify the notion of “hardness,” we will focus on the following: ± Polynomial- time as the cut -o ff for efficiency ± Decision problems: output is 1 or 0 (“yes” or “no”) ² Examples: ² Does a given graph G have an Euler tour? ² Does a text T contain a pattern P? ² Does an instance of 0/1 Knapsack have a solution with benefit at least K? ² Does a graph G have an MST with weight at most K? NP-Completeness 8 Problems and Languages A language L is a set of strings defined over some alphabet Σ Every decision algorithm A defines a language L ± L is the set consisting of every string x such that A outputs “yes” on input x. ± We say “A accepts x’’ in this case ² Example: ² If A determines whether or not a given graph G has an Euler tour, then the language L for A is all graphs with Euler tours.
NP-Completeness 4/20/2006 1:35 AM 5 NP-Completeness 9 The Complexity Class P A complexity class is a collection of languages P is the complexity class consisting of all languages that are accepted by polynomial-time algorithms For each language L in P there is a polynomial- time decision algorithm A for L.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 09/10/2009 for the course CS 401 taught by Professor Cs401 during the Spring '08 term at Illinois Tech.

### Page1 / 16

NPComplete-handouts-2 - NP-Completeness 4/20/2006 1:35 AM...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online