890 likes | 1.04k Views
Probabilistically Checkable Proofs and Hardness of Approximation. S.Safra some slides borrowed from Dana Moshkovits. The Crazy Tea Party. Problem To seat all guests at a round table, so people who sit an adjacent seats like each other. John. Jane. Mary. Alice. Bob.
E N D
Probabilistically Checkable Proofs and Hardness of Approximation S.Safrasome slides borrowed from Dana Moshkovits
The Crazy Tea Party Problem To seat all guests at a round table, so people who sit an adjacent seats like each other.
John Jane Mary Alice Bob Solution for the Example Problem To seat all guests at a round table, so people who sit an adjacent seats like each other.
Naive Algorithm • For each ordering of the guests around the table • Verify each guest likes the guest sitting in the next seat.
How Much Time Should This Take? (worse case) guests steps n (n-1)! 5 24 say our computer is capable of 1010 instructions per second, this will still take 3·10138 years! 15 87178291200 9·10155 100
Tours Problem Plan a trip that visits every site exactly once.
Solution for the Example Problem Plan a trip that visits every site exactly once.
Is a Problem Tractable? • YES! And here’s an efficient algorithm for it • NO! and I can prove it and what if neither is the case?
n! =2O(n lg n) 2n n2 10n Growth Rate: Sketch time input length
The World According to Complexity reasonable unreasonable polynomial nO(1) exponential 2nO(1)
Could one be Fundamentally Harder than the Other? ? Seating Tour
Relations Between Problems Assuming an efficient procedure for problem A, there is an efficient procedure for problem B B cannot be radically harder than A
Reductions B A p B cannot be radically harder than AIn other words: A is at least as hard as B
Which One is Harder? ? Seating Tour
guest site “directly reachable from…” “liked by…” Reduce Tour to SeatingFirst Observation: The problems aren’t so different
Reduce Tour to SeatingSecond Observation: Completing the circle • Let’s invite to our party a very popular guest, • i.e one who can sit next to everybody else.
Reduce Tour to Seating • If there is a tour, there is also a way to seat all the imagined guests around the table. popular guest . . . . . .
Reduce Tour to Seating • If there is a seating, we can easily find a tour path (no tour, no seating). popular guest . . . . . .
Bottom Line The seating problem is at least as hard as the tour problem
What have we shown? • Although we couldn’t come up with an efficient algorithm for the problems • Nor to prove they don’t have one, • We managed to show a very powerful claim regarding the relation between their hardness
Furthermore • Interestingly, we can also reduce the seating problem to the tour problem. • Moreover, there is a whole class of problems, which can be pair-wise efficiently reduced to each other.
NPC Contains thousands of distinct problem NPC each reducible to all others • exponential algorithms • efficient algorithms ?
How can Studying P vs NP Make You a Millionaire? • This is the most fundamental open question of computer science. • Resolving it would grant the solver a great honor • … as well as substantial fortune…www.claymath.org/prizeproblems/pvsnp.htm • Huge philosophical implications: • No need for human ingenuity! • No need for mathematicians!!!
Constraints Satisfaction DefConstraints Satisfaction Problem (CSP): • Instance: • Constraints: A set of constraints = { 1, …, l } over two sets of variables, X of range RXand Y of range RY • Determinate: each constraint determines the value of a variable yY according to the value of some xXxy : RX RY , satisfied ifxy(x)=y • Uniform: each xX appears in dX of, and each yYappears in dYof, for some global dXand dy • Optimize: • Define () = maximum, over all assignments to X and YA: X RX; Y RYof the fraction of satisfied
can be reduced to... Cook’s Characterization of NP Thm: It is NP-hard to distinguish between • () = 1 • () < 1 For any language L in NP CSP testing membership in L
Showing hardness From now on, to show a problem NP-hard, we merely need to reduce CSP to it. any NP problem can be reduced to... CSP can be reduced to... Cook’s Thm new, hard problem will imply the new problem is NP-hard
Max Independent-Set Instance: A graph G=(V,E) and a threshold k. Problem: To decide if there is a set of vertices I={v1,...,vk}V, s.t. for any u,vI: (u,v)E.
Max I.S. is NP-hard Proof: We’ll show CSPp Max I.S. ≤p k
k The reduction: Co-Partite Graph • G comprise k=|X| cliques of size |RX| - a vertex for each plausible assignment tox: An edge: two assignments that determine a different value to same y E {(<i,j1>, <i,j2>) | iM, j1≠j2RX}
k Proof of Correctness An I.S. of size k must contain exactly one vertex in every clique. A satisfying assignment implies an I.S. of size k An I.S. of size k corresponds to a consistent, satisfying assignment
Generalized Tour Problem • Add prices to the roads of the tour problem • Ask for the least costly tour $3 $17 $13 $8 $19 $10 $13 $12
Approximation • How about approximating the optimal tour? • I.e – finding a tour which costs, say, no more than twice as much as the least costly. $3 $17 $13 $8 $19 $10 $13 $12
Promise Problems • Sometimes you can promise something about the input • It doesn’t matter what you say for unfeasible inputs I know my graph has clique of size n/4! Does it have a clique of size n/2?
Promise Problems & Approximation • We’ll see promise problems of a certain type, called gap problems, can be utilized to prove hardness of approximation.
Gap Problems (Max Version) • Instance: … • Problem: to distinguish between the following two cases: The maximal solution B The maximal solution ≤ A YES NO
Idea • We’ve shown “standard” problems are NP-hard by reductions from CSP. • We want to prove gap-problems are NP-hard • Why won’t we prove some canonical gap-problem is NP-hard and reduce from it? • If a reduction reduces one gap-problem to another we refer to it as gap-preserving
Gap-CSP[] Instance: Same as CSP Problem:to distinguish between the following two cases: There exists an assignment that satisfies all constraints. No assignment can satisfy more than of the constraints. YES NO
PCP (Without Proof) Theorem [FGLSS, AS, ALMSS]: For any >0, Gap-CSP[] is NP-hard,as long as |RX|,|RY| ≥ -O(1)
x1 x5 yn-3 . . . x2 x6 yn-2 x3 x7 yn-1 x4 x8 yn Why Is It Called PCP? (Probabilistically Checkable Proofs) CSP has a polynomial membership proof checkable in polynomial time. Prove it! My formula is satisfiable! This assignment satisfies it!
Why Is It Called PCP? (Probabilistically Checkable Proofs) …Now our verifier has to check the assignment satisfies all constraints…
Why Is It Called PCP? (Probabilistically Checkable Proofs) In a NO instance of gap-CSP, 1-of the constraints are not satisfied! • While for gap-CSP the verifier would be right with high probability, even by: • pick at random a constant number of constraints and • check only those
Why Is It Called PCP? (Probabilistically Checkable Proofs) • Since gap-CSP is NP-hard, All NP problems have probabilistically checkable proofs.
Hardness of Approximation • Do the reductions we’ve seen also work for the gap versions (i.e approximation preserving)? • We’ll revisit the Max I.S. example.
k The same Max I.S. Reduction An I.S. of size k must contain exactly one vertex in every part. A satisfying assignment implies an I.S. of size k An I.S. of size k corresponds to a consistent assignment satisfying of
Corollary Theorem: for any >0, Independent-set is hard to approximate to within any constant factor
Chromatic Number • Instance: a graph G=(V,E). • Problem: To minimize k, so that there exists a function f:V{1,…,k}, for which (u,v)E f(u)f(v) skip
Chromatic Number Observation: Each color class is an independent set
Clique Cover Number (CCN) • Instance: a graph G=(V,E). • Problem: To minimize k, so that there exists a function f:V{1,…,k}, for which (u,v)E f(u)=f(v)