Proving NP-Completeness by Reduction
Context: FIT2014_MOC · the exam hand skill of Week 11 — once SAT is NP-complete, condition (b) of NP-Completeness is discharged by one [[Polynomial-Time Reductions| reduction]] instead of an argument over all of
Quick Revision
- 🎯 Objective: to prove NP-complete ➔ (a) show (a verifier + certificate), (b) pick a known NP-complete and show . Just one reduction.
- 📦 Core Components: the inheritance theorem (transitivity of ) | by clause splitting | by the gadget graph, .
- ⚡ Key Constraint: the reduction runs from the known-hard language into yours — . Writing proves is easy enough, which is the opposite of what is claimed and the single commonest zero.
🧮 Proof Blueprint — the inheritance theorem
Theorem. If is NP-complete, , and , then is NP-complete.
Strategy ➔ condition (a) is given; condition (b) is manufactured by composing an arbitrary language’s reduction into with the given reduction , using transitivity of .
Derivation
Let be any language in .
- Key move: transitivity is what makes the method finite — it silently reuses Cook-Levin’s infinite family of reductions. Historically this is R. Karp (1972).
- Why it did not help for SAT ➔ at that point no NP-complete language was known, so there was nothing to play the role of . That is the whole reason Cook-Levin Theorem had to be generic.
- Do not skip (a) ➔ the theorem assumes . Without it you have proved NP-hard only.
📝 The two standard reductions
1. — resize every clause to exactly 3 literals
Each clause of is replaced by clause(s) of size 3 doing the same job, using fresh variables (, ) that appear nowhere else:
| Clause size | Replacement | Why it preserves satisfiability |
|---|---|---|
| : | all four sign patterns of appear, so some clause loses both paddings whatever they are set to ⟹ must hold | |
| : | one of the two loses its padding literal ⟹ pair satisfiable iff is | |
| itself | already the right size | |
| : | is a chaining literal: setting True discharges the first clause but forces the second to be met by | |
| : | same chain continued — bring literals in one at a time |
- Two different tricks ➔ short clauses are padded with all sign patterns of throwaway variables; long clauses are chained with links. Both need every auxiliary variable to be fresh per clause.
- Cost ➔ a clause of length becomes clauses with new variables ⟹ linear in .
- Same padding idea as W10 ➔ the size-2 row is exactly the construction in Polynomial-Time Reductions.
2. — the gadget graph
(a) ➔ easy; certificate is the cover , checked in (see Standard NP Problems and Certificates).
(b) The construction. Given in CNF with exactly 3 literals per clause, variables and clauses , build :
| Piece | Vertices | Edges |
|---|---|---|
| variable-edges | — each literal joined to its partner | |
| clause-triangles | for each clause | all three pairs, so each clause is a separate triangle |
| connector edges | — | for the literal in position of clause : if that literal is , else |
Why that budget is forced ➔ every variable-edge needs vertex; every triangle needs ; all these pieces are disjoint, so any vertex cover has size . Setting to the minimum forces exactly one vertex per variable-edge and exactly two per triangle — no slack anywhere.
The dictionary ➔ choosing which end of variable-edge enters the cover assigning a truth value to ; vertex chosen literal True.
The iff chain
A chosen (True) literal already covers every connector edge running up from it to its clause positions. So if literal is True and sits at position of clause , the edge is covered from below and need not join the cover — leaving the triangle for coverable by its other two vertices. Conversely, if a clause-triangle contributes only two vertices, the omitted vertex marks a position whose connector edge must have been covered from the literal end — i.e. that literal is True.
- Key move: the budget is what converts a counting fact into a logical one — with one spare vertex the third triangle vertex could be bought and the correspondence with satisfaction would break.
Cost ➔ vertices and edges, all readable off in one pass ⟹ polynomial (fairly routine).
3. The inheritance chain
- The last two legs are already proved ➔ built in Polynomial-Time Reductions as and . Each is in , so INDEPENDENT SET and CLIQUE are NP-complete for free.
- Five NP-complete languages from one theorem ➔ this is the leverage the inheritance theorem provides.
- Set as exercises ➔ 3-COLOURABILITY NP-complete by reduction from INDEPENDENT SET · 4-SAT NP-complete · the complexity of VACCINATION (input : can vertices be “vaccinated” so every connected unvaccinated subgraph has vertices?).
⚠️ Common Mistakes
- 💡 Reducing the wrong way ➔ you need with known hard. is true for every and proves nothing about hardness.
- 💡 Omitting part (a) ➔ without the inheritance theorem does not apply and the result is only NP-hard. It is usually two lines — write them.
- 💡 Re-using an auxiliary variable across clauses ➔ in each and must be fresh; sharing couples independent clauses and destroys the iff.
- 💡 Choosing loosely ➔ any lets a cover buy the third triangle vertex without satisfying the clause, so satisfiability is no longer forced. The value must be the exact lower bound.
- 💡 Forgetting the connector edges ➔ with only variable-edges and triangles the graph is disconnected from ‘s content and every maps to a Yes-instance.
- 💡 Skipping the time bound ➔ “fairly routine” still has to be asserted; the three marked parts of a proof are the function, the iff chain, and the cost.
🧠 Active Recall
Why does have to be exactly the minimum possible cover size?
Answer
- Short answer: because the correspondence “clause satisfied triangle covered by only two vertices” only holds when the budget leaves zero slack.
- Why: the variable-edges and triangles are pairwise disjoint ➔ they independently demand and vertices, so is a hard floor. At exactly that value every triangle gets exactly two vertices, forcing each clause’s third connector edge to be covered from the literal end — which is precisely the statement that the clause contains a true literal. Give one extra vertex and an unsatisfied clause can be patched, breaking the () direction.
You must prove a new language NP-complete. Write the checklist.
Answer
- Short answer: ① — state certificate, verifier, iff, polynomial time. ② choose a known NP-complete whose structure resembles . ③ give mapping instances of to instances of . ④ prove the iff chain both ways. ⑤ bound the time to compute . ⑥ cite the inheritance theorem.
- Why: steps ①–⑤ are the marked parts; ⑥ is the one-line justification that they suffice ➔ the theorem converts ‘s condition (b) into ‘s by transitivity of , which is exactly why one reduction replaces an argument about all of .
Given VERTEX COVER is NP-complete, how do INDEPENDENT SET and CLIQUE come along free?
Answer
- Short answer: both are in , and were built in Lecture 26 — apply the inheritance theorem twice.
- Why: the reductions are parameter arithmetic, not new gadgets ➔ is a cover of iff is independent, giving ; and an independent set of is a clique of , giving . Both are , so NP-completeness propagates along the chain (details in Polynomial-Time Reductions).