a vertex per satisfying assignment, an edge per conflict

3SAT ≤p IS

3SAT≤pIS\mathrm{3SAT}\le_p\mathrm{IS}, hence IS\mathrm{IS} is NP-complete.

The construction

On a 3CNF formula φ\varphi with mm clauses:

  1. Vertices. For each clause CjC_j, create one vertex for every partial assignment satisfying it. A clause of three literals over three distinct variables is satisfied by 77 of the 88 partial assignments, so it contributes 77 vertices.
  2. Edges. Join two vertices whenever their partial assignments conflict — some variable is set True\mathrm{True} by one and False\mathrm{False} by the other. In particular any two vertices of the same clause are joined, since two distinct satisfying assignments of one clause must differ on some variable; so each clause's vertices form a clique.
  3. Return ⟨G,m⟩\langle G,m\rangle.

The intuition: an independent set of size mm must take exactly one vertex per clause (each clause is a clique), and the absence of edges among the chosen vertices says exactly that the chosen partial assignments are consistent — so they glue into a single assignment satisfying every clause.

Visualization

Guided construction

3SAT → Independent Set

Step 1 of 7
φ =(x ∨ y ∨ z)∧(¬x ∨ y ∨ w)∧(¬y ∨ z ∨ w)
3SAT to Independent Set constructionThree clause panels become triangle gadgets. Solid edges join literals in one clause, dashed edges join complementary literals, and the final step selects x, y, and z as an independent set of size three.C1x ∨ y ∨ zsource clauseC2¬x ∨ y ∨ wsource clauseC3¬y ∨ z ∨ wsource clause
Same-clause edgeComplement conflict

Correctness — both directions

3SAT ∈ ⟹ IS ∈

Suppose φ∈3SAT\varphi\in\mathrm{3SAT}, with satisfying assignment vv. For each clause CjC_j, the restriction of vv to the variables of CjC_j is a partial assignment satisfying CjC_j, so the graph holds a vertex uju_j for it. Set U={u1,…,um}U=\{u_1,\dots,u_m\}.

∣U∣=m|U|=m: the vertices belong to different clauses, so they are distinct objects.

UU is independent: let uj,uj′∈Uu_j,u_{j'}\in U be distinct. Both partial assignments are restrictions of the same vv, so on any variable occurring in both they agree — they do not conflict. By construction edges join only conflicting assignments, so ujuj′∉Eu_ju_{j'}\notin E.

Hence ⟨G,m⟩∈IS\langle G,m\rangle\in\mathrm{IS}.

IS ∈ ⟹ 3SAT ∈

Suppose ⟨G,m⟩∈IS\langle G,m\rangle\in\mathrm{IS}, with independent set UU of size mm.

Step 1 — exactly one vertex per clause. Each clause's vertices form a clique, so UU holds at most one vertex per clause. There are mm clauses and ∣U∣=m|U|=m, so UU holds exactly one per clause. Call it uju_j, with partial assignment σj\sigma_j.

Step 2 — the assignments are consistent. For j≠j′j\ne j' the vertices uj,uj′u_j,u_{j'} are non-adjacent (as UU is independent), so by construction σj\sigma_j and σj′\sigma_{j'} do not conflict: every variable occurring in both gets the same value.

Step 3 — glue the assignment. Define a total assignment vv: if a variable xx occurs in some σj\sigma_j, set v(x)=σj(x)v(x)=\sigma_j(x) — by Step 2 this does not depend on which jj, so it is well defined; if xx occurs in no σj\sigma_j, set v(x)=0v(x)=0 arbitrarily.

Step 4 — vv satisfies φ\varphi. Let CjC_j be a clause. By construction σj\sigma_j satisfies it, and vv agrees with σj\sigma_j on every variable of CjC_j, so vv satisfies CjC_j. As jj was arbitrary, vv satisfies φ\varphi, i.e. φ∈3SAT\varphi\in\mathrm{3SAT}.

Cost of the reduction

TimeO(|φ|²)
SpaceO(|φ|²)
Output sizeO(m²) vertices-pairs, O(m) vertices

Each clause contributes at most 23−1=72^3-1=7 vertices — a constant, because the clause is 3CNF. So ∣V∣≤7m=O(∣φ∣)|V|\le 7m=O(|\varphi|). Edges are decided by testing every pair, O(∣V∣2)=O(∣φ∣2)O(|V|^2)=O(|\varphi|^2) tests, each constant time (comparing at most three assignments). Running time O(∣φ∣2)O(|\varphi|^2).

The critical point: the bound of 77 vertices per clause holds only because clause length is bounded. For a general CNF, a clause of length kk has 2k−12^k-1 satisfying assignments — exponential, and the construction would not be polynomial. That is why one starts from 3SAT\mathrm{3SAT}, not SAT\mathrm{SAT}.

What it buys

IS\mathrm{IS} is NP-complete, and hence — through IS≤pCLIQUE\mathrm{IS}\le_p\mathrm{CLIQUE} and IS≤pVC\mathrm{IS}\le_p\mathrm{VC} — so are CLIQUE\mathrm{CLIQUE} and VC\mathrm{VC}.

Pitfalls

  • The returned threshold is mm — the number of clauses, not of variables and not of vertices. That threshold is what forces "one per clause", and without it Step 1 of the backward direction collapses.

  • The within-clause edges are not an extra rule — they follow from the same rule (conflicting assignments), since two distinct satisfying assignments of one clause must differ on some variable. The construction can be stated as one rule, not two.

The chain

Used later by

Where this was read from

  • Guided exercisesat-to-independent-set
  • 2024 '1 מועד 1Counting the edges in the reduction's output on (x1∨x2∨x3)∧(x1∨x4)(x_1\vee x_2\vee x_3)\wedge(x_1\vee x_4).
  • 2024 '1 מועד 2The same construction, counted on a different formula.
  • 2025"Prove the construction correct and analyse its running time. Is it polynomial?"
  • This construction does not appear in the 2026B lessons — there IS\mathrm{IS} is introduced in lesson 7 and its hardness arrives later by a different route. It is recorded here in the form the exam papers themselves give it (2024 and 2025 both describe it as "the reduction we saw"), so it is mapped to the exam sources and the guided exercise rather than to a lesson.