NP, NP-Completeness & Reductions

a reduction gadget

When you reduce one problem to another, you are translating, and a gadget is a reusable phrase in that translation: a small, self-contained piece of the target structure that simulates one feature of the source. Think of building a contraption out of standard parts: one part represents a variable, another represents a clause, and you snap them together. Gadgets are the LEGO bricks of NP-hardness proofs.

Concretely, a typical reduction from 3-SAT to a graph problem uses two kinds of gadget. A VARIABLE gadget is a little subgraph with two stable configurations, one read as 'true' and one as 'false', so choosing the configuration mimics setting the variable. A CLAUSE gadget is a subgraph that can be completed (coloured, covered, traversed) if and only if at least one of its literals is set true. You build one copy of the right gadget for each variable and each clause of the formula, then wire them together with connector edges so that a valid solution to the target problem exists exactly when a satisfying assignment exists. The whole construction must be doable in polynomial time and produce only polynomial-size output.

The art of a gadget reduction is making the local pieces force the global behaviour you want, no cheating allowed. Two correctness obligations must both hold: every satisfying assignment yields a valid solution of the target (completeness), and every valid solution of the target encodes a satisfying assignment (soundness). Get one direction without the other and the reduction is wrong. The classic gadget constructions, 3-SAT to CLIQUE, to vertex cover, to 3-coloring, to Hamiltonian cycle, are worth studying not because you memorise them, but because they teach you how to coerce one problem's rules into another's.

In the 3-SAT to CLIQUE reduction, the clause gadget is simply three vertices, one per literal of the clause. Edges connect literals in different clauses that are mutually consistent. A clique of size m (the number of clauses) must pick exactly one true literal from each clause gadget, which reads off a satisfying assignment.

A gadget is a small target-structure piece encoding one source feature (a variable or clause); wired copies build the whole reduction.

A gadget reduction is correct only if BOTH directions hold: yes-maps-to-yes and no-maps-to-no. Verifying just one direction is the most common way a reduction proof goes wrong.

Also called
gadgetgadget construction小工具構件