=========================================================================== CSC 363H Lecture Summary for Week 11 Spring 2007 =========================================================================== More examples of reductions to SAT, showing that the problem we reduced from is NPC. - INDEPENDENT-SET is NPc: Already know in NP. For NP-hardness, use reduction from VERTEX-COVER: Given , construct as follows: G' = G, k' = n-k. Clearly this can be done in polytime. Also, if G contains a vertex cover of size k, the vertices outside the cover form an independent set of size n-k. Finally, if G' contains an independent set of size n-k, the vertices outside the independent set form a vertex cover of size k. - CLIQUE is NPc: Already known in NP. For NP-hardness, use reduction from INDEPENDENT-SET covered last week. Note: textbook uses different reduction from 3SAT. - SUBSET-SUM is NPc: (see textbook) Example of reduction for F = (x1 \/ ~x2 \/ ~x4) /\ (x2 \/ ~x3 \/ x1) /\ (~x3 \/ x4 \/ ~x2): S = { 1000110, (corresponding to x1) 1000000, (corresponding to ~x1) 0100010, (corresponding to x2) 0100101, (corresponding to ~x2) 0010000, (corresponding to x3) 0010011, (corresponding to ~x3) 0001001, (corresponding to x4) 0001100, (corresponding to ~x4) 0000100, (corresponding to C1) 0000200, (corresponding to C1) 0000010, (corresponding to C2) 0000020, (corresponding to C2) 0000001, (corresponding to C3) 0000002 } (corresponding to C3) t = 1111444 Note: slightly different from book to ensure S contains all distinct numbers (book's reduction constructs S with duplicated numbers).