To prove language B is NP-complete given known NP-complete language A:
The 3 Mandatory Verification Steps
Definition: CLIQUE Problem
Given an undirected graph G = (V, E) and integer k:
Does G contain a subset S \subseteq V of size |S| = k such that every pair of vertices in S has an edge?
Prove \text{CLIQUE} is \mathbf{NP}-hard by reducing: \text{3-SAT} \le_p \text{CLIQUE} Once proved, \text{CLIQUE} is established as NP-complete.
Let formula \phi have m clauses: \phi = C_1 \land C_2 \land \dots \land C_m, where C_r = (l_{r, 1} \lor l_{r, 2} \lor l_{r, 3}).
Cross-Cluster Edge Rule
Connect literal u \in C_r to literal v \in C_s iff: 1. They come from different clauses (r \ne s), AND 2. They are consistent (not contradictory: u \ne \overline{v}).
. . .
Set target clique size k = m (the number of clauses).
\phi = (x_1 \lor x_2 \lor x_3) \land (\bar{x}_1 \lor \bar{x}_2 \lor x_3) \land (x_1 \lor \bar{x}_2 \lor \bar{x}_3)
| Clause 1 | Clause 2 | Clause 3 |
|---|---|---|
| x_1 | \bar{x}_1 | x_1 |
| x_2 | \bar{x}_2 | \bar{x}_2 |
| x_3 | x_3 | \bar{x}_3 |
. . .
Three foundational graph problems linked by geometric and set dualities:
Definition: INDEPENDENT SET Problem
Given an undirected graph G = (V, E) and integer k:
Does G contain a subset S \subseteq V of size |S| = k such that no two vertices in S share an edge?
Duality Lemma
S \text{ is a Clique in } G \iff S \text{ is an Independent Set in } \overline{G}
f(\langle G, k \rangle) = \langle \overline{G}, k \rangle Computing \overline{G} takes O(|V|^2) time. Immediate NP-completeness of INDEPENDENT SET!
Definition: VERTEX COVER Problem
Given G = (V, E) and integer k':
Find subset C \subseteq V of size |C| \le k' such that every edge e \in E has at least one endpoint in C.
The Partition Theorem
For any graph G = (V, E) and any subset S \subseteq V: S \text{ is an Independent Set} \iff V \setminus S \text{ is a Vertex Cover}
\text{Let } C = V \setminus S.
\text{Reduction: } \quad f(\langle G, k \rangle) = \langle G, \ |V| - k \rangle Parameter conversion takes O(1) time! VERTEX COVER is NP-complete. \checkmark
By combining graph complementation and set partitioning, we obtain a direct reduction:
S \subseteq V \text{ is a } k\text{-clique in } G \iff V \setminus S \text{ is a } (|V|-k)\text{-vertex cover in } \overline{G}
The Direct Recipe
| Reduction | Construction | Key Invariant |
|---|---|---|
| 3-SAT \le_p CLIQUE | Clause \to cluster of 3 nodes; connect non-conflicting cross-literals | k-clique selects 1 consistent true literal per clause |
| CLIQUE \le_p INDEP-SET | Same vertex set; complement edge set \overline{E} | All pairs adjacent \iff no pairs adjacent |
| INDEP-SET \le_p VERTEX-COVER | Same graph; target cover size k' = |V| - k | No edge within S \iff every edge touches V \setminus S |
| CLIQUE \le_p VERTEX-COVER | Complement graph \overline{G}; target cover k' = |V| - k | S is clique in G \iff V \setminus S is VC in \overline{G} |
Takeaway
Reductions bridge fundamentally distinct conceptual worlds: \text{Boolean Logic (CNF)} \quad \xrightarrow{\text{Gadgets}} \quad \text{Dense Graphs (Clique)} \quad \xrightarrow{\text{Duality}} \quad \text{Sparse Covers (VC)}
CS G526: Advanced Algorithms & ComplexityTulasimohan Molli