

































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


































1
2
NP - complete problems Proof that Punch-Card Puzzle is NP -complete P vs. NP question Known and unknown hierarchies Next Time: Foundational proof that 3SAT is NP-complete (Cook-Levin Theorem)
4
Here is a list of some NP -complete problems:
5
We already know what it means for a problem to be in NP. NP -complete problems are problems which are in NP but are also NP -hard:
7
automatically NTM’s.
8
Proof that ANTM is NP -hard:
Given any language L’ S* in NP , there is a NTM M’ which decides L’. Define the following mapping reduction f : Given x S*, f (x) = < M’ , x >
f can be achieved by an I/O TM which runs in polynomial time, simply by pre-appending x by the description of M’ on the tape. Furthermore, f (x) is in ANTM exactly when x is in L’. So f is a poly-time mapping reduction.•
Q: Is ANTM NP -complete? Docsity.com
10
Standard technique for showing that a problem is NP -complete.
Show directly that problem is in NP.
Show that a previously known NP - complete problem is poly-time reducible to the problem of interest.
Typically, for step (2) an NP -complete SAT variant is used.
11
Let’s show that the Punch-Card Puzzle is NP - complete. We’ve already done step 1 in the previous lecture. Let’s reduce CSAT to the puzzle in poly-time:
is a case that the Puzzle CSAT reduction is almost exactly the reverse of CSAT Puzzle.
13
EG: Consider conjunction of 4 clauses:
There should be 3 cards because there are 3 variables and 4 rows, because there are 4 clauses.
14
EG: Consider conjunction of 4 clauses:
There should be 3 cards because there are 3 variables and 4 rows, because there are 4 clauses.
16
EG: Consider conjunction of 4 clauses:
17
EG: Consider conjunction of 4 clauses:
Q: Any problems? Docsity.com
19
A: (2nd^ Idea) Just add the card whose right column is completely filled in, and left column completely open:
Claim: This actually works in general!
In fact…
20
LEMMA: Suppose a boolean expression f is transformed into a card puzzle according to 1st idea. Then if f is unsatisfiable, not even 1 column can be filled.
Proof of lemma: If 1 column can be filled, we can assume it’s the left column by flipping all cards if it wasn’t. By construction, each card will fill in a row exactly when its variable has the corresponding truth value. Thus filling in the left column, means that f is satisfiable. We’ve shown that if even 1 column is fillable, then f is satisfiable, which is equivalent to lemma.//Docsity.com