graph complement, the other way

CLIQUE ≤p IS

CLIQUE≤pIS\mathrm{CLIQUE}\le_p\mathrm{IS} — the very same reduction, passing to the complement, works in the reverse direction too.

The construction

On input ⟨H,K⟩\langle H,K\rangle with H=(V,F)H=(V,F) a graph: return ⟨Hˉ,K⟩\langle\bar H,K\rangle.

The key to correctness is that complementation is an involution: Hˉ‾=H,since(V2)∖((V2)∖F)=F.\overline{\bar H}=H,\qquad\text{since}\qquad \binom{V}{2}\setminus\left(\binom{V}{2}\setminus F\right)=F .

Visualization

Guided construction

Independent Set → Clique

Step 1 of 6
Independent Set to Clique via graph complementA path on four vertices is complemented; an independent pair becomes a clique while the threshold stays k.Source G1234Complement Ḡ1234
Original edge (removed)Complement edge (added)

Correctness — both directions

CLIQUE ∈ ⟹ IS ∈

Suppose ⟨H,K⟩∈CLIQUE\langle H,K\rangle\in\mathrm{CLIQUE}, i.e. some U⊆VU\subseteq V of size KK is a clique in HH. Let x,y∈Ux,y\in U be distinct; then xy∈Fxy\in F, hence xy∉Fˉxy\notin\bar F, so UU is independent in Hˉ\bar H. Thus ⟨Hˉ,K⟩∈IS\langle\bar H,K\rangle\in\mathrm{IS}.

IS ∈ ⟹ CLIQUE ∈

Suppose ⟨Hˉ,K⟩∈IS\langle\bar H,K\rangle\in\mathrm{IS}, i.e. some U⊆VU\subseteq V of size KK is independent in Hˉ\bar H. Let x,y∈Ux,y\in U be distinct; then xy∉Fˉxy\notin\bar F, hence xy∈Fxy\in F, so UU is a clique in HH. Thus ⟨H,K⟩∈CLIQUE\langle H,K\rangle\in\mathrm{CLIQUE}.

Cost of the reduction

TimeO(|V|²) with an adjacency matrix
SpaceO(|V|²)
Output sizeO(|V|²)

Identical to the other direction — it is the same construction.

What it buys

CLIQUE≡pIS\mathrm{CLIQUE}\equiv_p\mathrm{IS}. This is the cleanest case of two equivalent problems: not merely reductions in both directions, but literally the same function.

Pitfalls

  • A≤pBA\le_p B does not imply B≤pAB\le_p A. Here it happens to hold, thanks to the involution; that is a property of this particular construction, not a general rule.

The chain

Where this was read from

  • Lesson 7משפט 4: CLIQUE≤pIS\mathrm{CLIQUE} \le_p \mathrm{IS}
  • 2026 '1 מועד 2Polynomial equivalence between the "exactly kk", "at least kk", and "maximum is kk" versions of clique.