Polynomial-Time Reductions and the Foundations of NP-Completeness

中文 | English

Polynomial-Time Reduction

In complexity theory, "reduction" is the most important tool for studying the difficulty of a problem.

First, let's clarify what reduction means.

We often say:

If problem X is at least as hard as problem Y, it means that if we can solve X, we can incidentally solve Y.

This is easy to understand.

Formally, it's defined as polynomial reduction:

YpX \

Y can be solved using a polynomial-time algorithm, plus a black box that calls X several times.

Intuitive Understanding:

Reduction helps us compare the difficulty of problems.

Understanding Method:

Independent Set vs. Vertex Cover: The Classic Mutual Reduction

To intuitively understand reduction, we'll start with two simple and closely related problems.

Independent Set Problem and Vertex Cover Set Problem

The descriptions of these two problems have been covered in the previous two chapters and will not be repeated here.

Important FACT

Very Important:

In a graph G=(V,E): S is an independent set ⇔ VS is a vertex cover

Intuition:

and vice versa.

This complement relationship naturally leads to reduction.

Mutual Reduction

Independent SetpVertex Cover

Question: Does G have an independent set ≥ k?

Transformed into:

Question: Does G have a vertex cover ≤ n − k?

Reason:

Therefore, we only need to ask the black box:

“Does the vertex cover size ≤ n−k?”

If the black box answers YES, then the Independent Set answer is also YES.


Vertex CoverpIndependent Set

Similarly:

Judging “VC ≤ k” is equivalent to judging “IS ≥ n−k”.

These two reductions are known conclusions and can be used directly. **

Set Cover: A More General Form of Vertex Cover

Definition of Set Cover:

Given a set of elements U and several "subsets" S1,...,Sm, is it possible to choose k sets to cover all elements?

Vertex Cover can be reduced to Set Cover:

Therefore:

Vertex CoverpSet Cover

So Set Cover is at least as difficult as Vertex Cover.

Reduction Using Gadgets (From SAT to Graph)

Next, we move on to "gadget construction" in complexity theory.

A gadget is a small structure used to simulate logical relationships.

This section aims to:

This part is the core technique for NP-completeness.

Clause and Literal

This concept was actually discussed earlier when the SAT problem was mentioned.

x1¬x3x4

When does an assignment satisfy a clause? The clause is satisfied as long as at least one literal is true.

SAT and 3-SAT

SAT Problem:

Does an assignment to a variable make all clauses true?

For example, given several clauses: C1,C2,...,Ck

We need to find an assignment to a variable that makes all clauses true.

3-SAT is a special case: each clause has exactly 3 literals.

Reduction: 3-SATpIndependent Set

This is one of the most classic reductions in NP-complete theory. **

(1) Create a triangle gadget for each clause

For example, clause: xy¬z

The triangle guarantees:

This means:

"At least one point in a clause is true"

(2) Prohibit x and ¬x from being selected at the same time (add conflict edges)

If literal a means "x = true", literal b means "x = false"

→ You cannot select both into the independent set

→ Connect them with an edge

Prove the correctness of the reduction in two directions

A. If 3-SAT satisfies → There exists an independent set of size = number of clauses

Select one true for each clause Literal:

B. If there exists an independent set of size = number of clauses → a satisfying assignment can be constructed

Because:

→ Each clause chooses one literal

→ Assigning the chosen literal to true → a satisfying assignment is obtained

NP-hard and NP-complete

NP-hard definition (at least this difficult)

A problem X is NP-hard if:

All problems Y in NP can be reduced to X (YpX).

NP-hard does not require:

Example: Halting Problem

NP-complete Definition

(Important Definition) A problem X is NP-complete if and only if:

  1. X ∈ NP (verifiable)

  2. For all Y ∈ NP, Y ≤ ₚ X (hardest)

Properties:

then all NP problems can be solved polytime,

and P = NP

Transitivity of Reduction

Very crucial:

If Z ≤ ₚ Y and Y ≤ ₚ X, then Z ≤ ₚ X.

Therefore:

**SAT is the first problem to be proven NP-complete (Cook-Levin theorem),

therefore SAT becomes the "starting point" for all NP-complete proofs.**

How to prove that a problem X is NP-complete?

The classic three-step method:

Step 1: Prove X ∈ NP

Give a certificate and certifier.

Step 2: Choose a known NP-complete problem Y

For example:

Step 3: Prove Y ≤ ₚ X

That is:

Encode instance Y into instance X

and prove the correctness in both directions (YES→YES, NO→NO)

After completing the above three steps → X is NP-complete.

Collection of Proof Examples

This section compiles a series of proof problems, including commonly used construction methods.