ADVANCED ALGORITHMS Lecture 25: Intractability � 1
ANNOUNCEMENTS ➤ HW 6 is out — due on Friday, December 7 ➤ Project final deadline: Wednesday, December 5 2gth Nov class on Thursday No mostly review Next week 9 � 2
LAST WEEK G k Independents ➤ Complexity of decision problems — limits on time/space of computation polynomial time Of ➤ Classes P and NP ➤ NP — non-deterministic polynomial time; problems for which a YES instance has a “witness/certificate” that can be e ffi ciently verified. ➤ E.g., typical puzzle, circuit satisfiability, checking if number is prime pT fiak ➤ Cook-Levin theorem: every problem in NP is “basically” SAT � 3
using independent set problem RECAP — NP as running example I prover witness w Verifier (polynomial time) i F a witness certificate w a YES instance I is If a YES instance convince verifier that I is that can cannot convince instance prover a No I is If a YES instance is verifier that I � 4
SAT SATISFIABILITY PROBLEM F l I l I I I inputs X n X X 7 IF do there exist inputs Given the circuit Problem the output is TRUE l 2 s t Xi Cook Anyproblem imNP mm asSAT canbe encoded
E can be Independent set as f SAT encoded 7 t tf ta I M I l l Xn Xi Xj Xz X I l l 0 o o engotindmoset circuit returns 1 iff Easylo cheek the bits are T 3k of AND a b for any edge ij either xi f F or nj managed to cast IS as Reduction instance of SAT an
RECAP — NP witness w Verifier (polynomial time) Idea behind Cook/Levin theorem : encode verifier as circuit, witness as variables 2 � 5
REDUCTIONS BETWEEN PROBLEMS ➤ Intuitive idea: if problem A can be solved in polynomial time, so can problem B so does ind Set CTm time algorithm SAT has a poly if ➤ Map instances of A —> instances of B while “preserving” answer A I idµy i iE � 6
time
REDUCTIONS BETWEEN PROBLEMS Garay Johnson p reduces to P SAT Sauppose � 7
COOK/LEVIN THEOREM AN EXAMPLE OF REDUCTION an efficient Any problem in NP has Theory reduction to SAT SAT reduces to P proving that Is hard P is the only way of showing 2 Problem P Factoring � 8
SAT Ind set L p NP, NP-HARD AND NP-COMPLETE Cook Levin then a poly lime Set of all problems that have IIP problem QE NP Q SpsAT to SAT reduction SAT Ep Q problem 9 is NP hard if NP hard is NP complete if Q C NP and problem 9 NP compete Q E PSAT ie NP hard Qu SAT Ep Q � 9 h rd alls
pep hard Halting isomorphism 2 problem graph E na Chess o o Ht matching
NP, NP-HARD AND NP-COMPLETE � 10
GOAL ➤ See how to prove that a problem is NP complete — will use only a couple of examples ➤ What about approximation? � 11
Indset Ep'sAT 3-SAT Goat find some problems sat SAT Ep problem ➤ 3-SAT: special case of circuit satisfiability. boolean variables x xn Problem LORT Cm C Clauses i ft't OR I V Xia V Ti C either var or Xi t neglvar Acm C A C A Formula of CHE AND � 12 fol
fol TEH ti ORD ERI ERI 1 l l I X n X Xz assignment of TIF does there exist an 3 to f is True s t ni SAT Ep 3 5 theorem I of 3 SAT of SAT I It so is a YES instance if I is NO I u n mum i ii 7 g n n g is TRUE I h
Rule n g 3-SAT IS NP COMPLETE i can be written E h Cz h as 2 V II Eg Z ft AZ n Zg E Jeff Erickson's notes � 13
INDEPENDENT SET � 14
INDEPENDENT SET � 15
APPROXIMATION ➤ Fundamental question: do NP-complete problems have good approximation algorithms? (saw many examples) ➤ Are there limits to approximation? � 16
PCP THEOREM ➤ “Gap inducing reductions” ➤ SAT —> GAP-3-SAT � 17
GAP PRESERVING REDUCTIONS ➤ 3-SAT —> Independent set � 18
GAP AMPLIFICATION � 19
Recommend
More recommend