TCC28102005 The techniques used in proving NP-Completeness results vary almost as widely as the NP-Complete problems themselves, and therefore not all can be illustrated. However, there are several general types of proofs that occur frequently and that can provide a suggestive framework for deciding how to go about proving a new problem NPComplete. We call these a) restriction, b) local replacement, and c) component design. Restriction Proof by restriction is the simplest, and perhaps the most frequently applicable of the 3 types. It simply says the problem that we want to prove NP-Complete does contain as a subproblem which is already known NP-complete. We have already seen the example of EXACT COVER BY 3-SETS, that contains 3DM as a subproblem which was already shown to be NP-Complete. Similarly DIRECTED HAMILTONIAN CIRCUIT can be shown to be NP-Complete restricting to digraphs in which if (u, v) E so must (v, u ) E since then it becomes identical to HAMILTONIAN CIRCUIT problem. Here is a list of problems that can be proved NP-Complete by restriction. 1.MINIMUM COVER INSTANCE: Collection C of subsets of a set S, positive integer K. QUESTION: Does C contain a cover of S of size K or less, that is, a subset C C with | C | K and such that c S ? Proof: Restrict X3C by allowing only instances having |c|=3 for all c C and having k=|S|/3. 2. HITTING SUBSET INSTANCE: Collection C of subsets of S, positive integer K. QUESTION: Does S contain a hitting set for C of size K or less, that is a subset S S with | S | K and such that S contains at least one lement from each subset in C Proof: Restrict VC by allowing only instances having |c|=2 for all c C 3. SUBGRAPH ISOMORPHISM INSTANCE: Two graphs, G (V1 , E1 ) and H=(V2 , E2 ) QUESTION: Does G contain a subgraph isomorphic to H, that is, a subset V V1 and E E1 such that | V || V1 |,| E || E1 | and that there exists a 1-1 function f : V2 V satisfying {u, v} E2 iff {f(u),f(v)} E? Proof: Restrict CLIQUE by allowing only instances for which H is a complete graph, that is, E2 contains all possible edges joining 2 members of V2 ? 4. BOUNDED DEGREE SPANNING TREE INSTANCE: A graph G=(V,E) and a positive integer K | V | 1 QUESTION: Is there a spanning tree for G in which no vertex has degree exceeding K, E E such that | E || V | 1 , that is, a subset the graph G (V , E )is connected, and no vertex is included in more than K edges from E ? Proof: restrict to HP by allowing only instances in which K=2. 5. KNAPSACK INSTANCE: A finite set U, a “size” s(u ) Z and a value v(u) Z for each u U ,a size constraint B Z , and a value goal K Z QUESTION: Is there a subset U U such that s(u ) B and v(u) K? uU uU Local Replacement In proofs by local replacement, the transformations are sufficiently nontrivial to warrant spelling out in the standard proof format, but they still tend to be relatively uncomplicated. All we do is pick some aspect of the known NP-complete problem instance to make up a collection of basic units, an we obtain the corresponding instance of the target problem by replacing each basic unit, in a uniform way, with a different structure. The transformation from SAT to 3SAT was of this type. In that transformation, basic units of an instance of SAT were the clauses, and each clause was replaced by a collection of clauses according to the same general rule. The key point is that each replacement constituted only local modification of structure. The replacements were essentially independent of one another, except in so far as the reflected parts of the original instance that were not changed. Example PARTITION INTO TRIANGLES INSTANCE: A graph G=(V,E), with | V | 3q for a positive integer q. QUESTION: Is there a partition of V into q disjoint sets V1 ,V2 ,...,Vq of 3 vertices each such that, for each Vi {vi[1] , vi[2] ., vi[3]}, the three edges {vi[1] , vi[2] },{vi[1] , vi[3] }{vi[2] .vi[3] } all belong to E? Theorem 3.7 PARTITION INTO TRIANGLES is NP-Complete. Proof: We transform X3C to PARTITION INTO TRAINGLES. Let the set X with |X|=3q and the collection C of 3-element subsets of X be an arbitrary instance of X3C. we shall construct a graph G=(V,E), with |V|=3q’, such that the desired partition exists for G iff C contains an exact cover. The basic units of the X3C instance are the 3-element subsets in C. The local replacement substitutes for each subset ci {xi , yi , zi } C the collection Ei of 18 edges as shown in the figure. Thus G=(V,E) is defined by VX |C| i 1 {ai [ j ]:1 j 9} E |C| Ei i 1 Notice that the only vertices that appear in edges belonging to more than a single Ei are those that are in the set X. Notice also that | V || X | 9 | C | 3q 9 | C | so that q q 3 | C | . It is not hard to see that the construction can be performed in polynomial time. If c1,c2 ,..., cq are the 3-element subsets from C in any exact cover for X, then the corresponding partition V V1 V2 ... Vq of V is given by taking {ai [1], ai [2], xi },{ai [4], ai [5], yi },{ai [7], ai [8], zi },{ai [3], ai [6], ai [9]} from the vertices meeting Ei whenever ci {xi , yi , zi } is in the exact cover, and by taking {ai [1], ai [2], ai [3]},{ai [4], ai [5], ai [6]},{ai [7], ai [8], ai [9]} from the vertices meeting Ei whenever ci is not in the exact cover. This ensure that each element of X is included in exactly one 3-vertex subset in the partition. Conversely, if V V1 V2 ... Vq is any partition of G into triangles, the corresponding exact cover is given by choosing those ci C such that {ai [3], ai [6], ai [9]} V j , for some j ,1 j q . Example MINIMUM TEST COLLECTION INSTANCE: A finite set A of “possible diagnoses”, a collection C of subsets of A, representing binary “tests”, and a positive integer J | C | QUESTION: Is there a subcollection C C with | C | J such that for every pair ai , a j of possible diagnoses from A, there is some test c C for which |{ai , a j } c | 1? Proof: 3DM can be transformed to an instance of MINIMUM TEST COLLECTION. Component Design This appears to be the most complicated of all our proof techniques. The NP-Completeness proofs for 3DM, MATCHING, VC and HC all fall in this category. The basic idea is to use constituents of the target problem instance to design certain “components” that can be combined to “realize” instances of known NP-Complete problem.