1 / 9

probleem P 1 is reduceerbaar tot P 2 als  afbeelding  :P 1  P 2 zo dat:

algoritme in O(|I| qr ) time voor I in P: doe eerst A  P /* geeft I' in SAT van size O(| | r ) doe dan A. alg. A O(| | q ). yes/no.  P (I)  SAT. A  P O(| | r ). I  P. probleem P 1 is reduceerbaar tot P 2 als  afbeelding  :P 1  P 2 zo dat:

jael
Télécharger la présentation

probleem P 1 is reduceerbaar tot P 2 als  afbeelding  :P 1  P 2 zo dat:

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. algoritme in O(|I|qr) time voor I in P: doe eerst AP/* geeft I' in SAT van size O(| |r) doe dan A alg. A O(| |q) yes/no P(I)SAT AP O(| |r) IP probleem P1 is reduceerbaar tot P2 als  afbeelding :P1  P2zo dat: I yes-instantie van P1 (I) yes-instantie van P2 als ook:  polytime-algoritme, zeg A,met inputs IP1 en outputs (I)P2 dan P1 is 'polynomial‑reducable' tot P2 , notatie: P1 P2 TheoremCook (1971): SAT is -compleet, i.e.: each problemP of  is polynomial reducable to SAT Corollary If SAT can be solved by some polynomial algorithm A, then all problems P are polynomial solvable (=)Proof:

  2. YES for k=4 YES for k=3 CLIQUE Instance: graph G=(V, E) ; number k; Question: Is there a ‘clique’ subgraph HG with |V(H)|>=k NO for k=5

  3. Is there a clique of size >= 4 ?

  4. Is there a clique of size >= 4 ?

  5. Satisfiability (formeel) Instance:2n booleans in sets B={b1, b2, ..., bn}en B={b1, b2, ..., bn}, [n-tal B={b1,..., bn} is vrij, n-tal B={b1, b2, ..., bn} is negatie dwz: vrij te kiezen: b1, ..., bn{true,false} en bt = NOT bt voor t=1,2..n] m ‘or-expressies’ C1, C2, ..., Cm met 1 of meer elementen in BB Question:Kan menb1 t/m bn zo kiezen ( truth-assignment)datelke 'clause' C1, C2, ..., Cmtrue wordt. (satisfying all the clauses) bv n=3, m=4 met C1=b1 or b3 or b2 ; C2=b2or b1; C3=b3 or b1; C4=b2 assignment b1=b2=b3=true mislukt; assignment b1=true; b2=b3=false mislukt; assignment b2=true, b1=b3=false satisfies all clauses

  6. elke clause correspondeert met knopenregel, 1 knoop voor elke boolean • alle kanten bestaan behalve: • tussen knopen (booleans) van dezelfde clause • tusen booleans die elkaars negatie zijn Een probleem P zal NP-compleet zijn als: 1) P is in NP 2) voor een bekend NP-compleet P2 geldt: P2  P voorbeeld: we bewijzen Clique is NP-compleet 1) yes-certificaat is subset K met k knopen; O(n2) algoritme checkt kantexistentie 2) we tonen aan SAT CLIQUE : Zij B={b1,…,bn}; C1,C2, …,Cm, een SAT-instantie. bv: B={b1,b2,b3} en m=4 met C1=b1 or b3 or b2 ; C2=b2or b1; C3=b3 or b1; C4=b2

  7. YES:  V’ for k=5 YES:  V’ for k=3 NODE-COVER Instance: graph G=(V, E) ; number k ; Question:can one cover E with a subset V’ of k or less nodes

  8. G’s edges on upper-left node DEFINITION: The co-graphG=(V, co-E)of G=(V, E) has the same node set,but the complement set co-E as edge set: co-E ={(i,j): (i,j)E} Theorem: V’ is a node-cover of E(G) if and only if V\V’ forms a clique in G COROLLARY: CLIQUE  NODE-COVER map I=<(V, E), k> of CLIQUE to (I)=<((V), (E)), (k)> of NODE-COVER, given as (V)=V , (E)=co-E and (k)=|V|-k

  9. CLIQUE NODE-COVERmap I=<(V, E), k> of CLIQUE to (I) of NODECOVER, where  (V,E)=(V,co-E) and (k)=|V|-k to proof:<(V, E), k> is yes instantie clique  <(V,co-E),|V|-k> yes instantie node-cover proof:node set H forms a clique in (V,E) with |H|>=k/* dwz H is yes-certificate for I iff( i, j H: (i,j)  E ) and ( |H|>=k ) iff( i, j H: (i,j)Ïco-E) and ( |H|>=k ) ifffor each edge (i, j) of (V,co-E) node i is in V\H or node j is in V\Hand |V\H|<=|V|-k iff V\H is a node cover of (V, co-E)= (V,E) with |V\H|<=|V|-k/* V\H is yes-certificate for (I), (k)

More Related