Exercise

Reduce Independent Set to Clique

Turn an independent-set instance into a clique instance by complementing the edge set.

Problem

Given an undirected graph G=(V,E)G=(V,E) and integer kk, construct in polynomial time a graph G′G' and integer k′k' such that GG has an independent set of size kk if and only if G′G' has a clique of size k′k'. Prove both directions and argue that the construction is polynomial in the encoded input length.

Hint 1

The same vertex set can serve both instances. What edge relation turns non-adjacency into adjacency?

Hint 2

The parameter need not change if the vertex set is unchanged.

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)

Full solution

Let G′=G‾=(V,(V2)∖E)G'=\overline{G}=(V,\binom{V}{2}\setminus E) be the complement graph on the same vertex set, and set k′=kk'=k. Listing all non-edges of GG takes O(∣V∣2)O(|V|^2) time, which is polynomial in the standard adjacency-matrix or adjacency-list encoding.

A set S⊆VS\subseteq V is independent in GG exactly when no two vertices of SS are joined by an edge of EE. Equivalently, every pair of distinct vertices in SS is joined by an edge of G‾\overline{G}. Therefore SS is a clique in G′G'. The converse is identical: a clique in G‾\overline{G} has no GG-edge inside it, so it is independent in GG. Taking ∣S∣=k|S|=k yields the iff.

Membership of CLIQUE in NP is standard: a candidate vertex set of size kk is a certificate, and every pair can be checked for an edge in polynomial time. Combined with the NP-completeness of Independent Set (via 3SAT), this reduction proves NP-completeness of CLIQUE.

Checkpoint

Distinguish graph complement (flip edges, keep kk) from vertex-set complement (used for Vertex Cover, which changes the parameter).

Common mistakes

  • Changing kk unnecessarily, or forgetting that loops and self-pairs are never edges.
  • Building the complement incorrectly by deleting vertices instead of flipping edges.
  • Proving only one direction of the equivalence.

Provenance note

This is an independently written presentation of a standard identity used throughout the course reduction atlas. It is textbook-aligned (Sipser / Garey–Johnson) and reflected in course lecture notes on IS, CLIQUE, and VC; it is not a verbatim assignment transcript.

Sources and verification

  • Merged summary, pp. 55-57
  • Sipser 3e, sec. 7.5
  • Garey-Johnson, GT19 and GT20
  • Catalog mapping: data/exercises.json; statements and solutions are independently written.