plant k−1 vertices joined to every old one

co-IS ≤p MaxIS

IS‾≤pMaxIS\overline{\mathrm{IS}}\le_p\mathrm{MaxIS}, so MaxIS\mathrm{MaxIS} is coNP-hard.

The construction

The complement lemma (from lesson 21). Let ff be polynomial-time computable. Then ff is a reduction from AA to BB iff it is a reduction from A‾\overline A to B‾\overline B — since x∈A  ⟺  f(x)∈Bx\in A\iff f(x)\in B is logically equivalent to x∉A  ⟺  f(x)∉Bx\notin A\iff f(x)\notin B. That is what licenses starting from IS‾\overline{\mathrm{IS}}.

The reduction. On input ⟨G,k⟩\langle G,k\rangle with G=(V,E)G=(V,E):

  1. Add k−1k-1 new vertices to GG; write V^=V∪(the new ones)\hat V=V\cup(\text{the new ones}), so ∣V^∖V∣=k−1|\hat V\setminus V|=k-1.
  2. Add edges from every new vertex to every vertex of VV. Among the new vertices there are no edges, and among the vertices of VV nothing was added or removed.
  3. Return ⟨G^,k−1⟩\langle\hat G,k-1\rangle.

The intuition. We want "GG has no independent set of size kk" to become a question about a maximum. If there is none, the maximum in GG is at most k−1k-1 — but nothing guarantees it is exactly k−1k-1. So we plant an independent set of size exactly k−1k-1. Isolated vertices would not do: they would join the old sets and raise the maximum. Joining each new vertex to every old one lets the new set exist without mixing.

Visualization

Guided construction

co-IS → MaxIS

Step 1 of 7
⟨G, k⟩ = ⟨C₅, 4⟩co-IS: does G have no independent set of size 4?
Complement lemmaf reduces A to B ⇔ f reduces Ā to B̄ — so a reduction may start from co-IS.
A five-cycle with three planted vertices joined to every original vertexThe original graph is a pentagon of five vertices. Three planted vertices stand in a column to its right, with no edges among themselves and one thin edge to each of the five original vertices. In the comparison step the same graph is shown twice, once with those join edges and once without.G = C₅ — the input graphv₁v₂v₃v₄v₅α(G) = 2 ≤ k − 1 = 3, but not necessarily equal
Original vertex of VSolid: original edge of GIndependent set under discussion, ✓ ringed

Correctness — both directions

co-IS ∈ ⟹ MaxIS ∈

Suppose ⟨G,k⟩∈IS‾\langle G,k\rangle\in\overline{\mathrm{IS}} — that is, GG has no independent set of size kk. Both halves of the MaxIS\mathrm{MaxIS} conjunction must be proved:

(a) Existence. The set V^∖V\hat V\setminus V (the new vertices) is independent in G^\hat G: no edge was added between two new vertices. Its size is exactly k−1k-1. ✓

(b) The "for all" half. Let U⊆V^U\subseteq\hat V be independent in G^\hat G. In G^\hat G there is an edge between every new vertex and every old one, so UU cannot hold both a new and an old vertex; hence U⊆V^∖VU\subseteq\hat V\setminus V or U⊆VU\subseteq V.

  • If U⊆V^∖VU\subseteq\hat V\setminus V: then ∣U∣≤k−1|U|\le k-1.
  • Otherwise U⊆VU\subseteq V: since no edge among VV's vertices was added or removed, a set independent in G^\hat G and contained in VV is independent in GG too. As GG has no independent set of size kk, and by heredity none of size greater than kk either (else drop vertices to get one of size exactly kk), we get ∣U∣≤k−1|U|\le k-1.

Either way ∣U∣≤k−1|U|\le k-1. ✓

From both halves: the maximum in G^\hat G is exactly k−1k-1, i.e. ⟨G^,k−1⟩∈MaxIS\langle\hat G,k-1\rangle\in\mathrm{MaxIS}.

MaxIS ∈ ⟹ co-IS ∈

Suppose ⟨G^,k−1⟩∈MaxIS\langle\hat G,k-1\rangle\in\mathrm{MaxIS}. We must show ⟨G,k⟩∈IS‾\langle G,k\rangle\in\overline{\mathrm{IS}}, i.e. every independent set UU in GG has ∣U∣≠k|U|\ne k. This is a "for all" claim, so it opens with "let".

Let U⊆VU\subseteq V be independent in GG.

  1. The reduction added no edge among the vertices of VV — the only edges added leave the new vertices. So UU, as a subset of V^\hat V, is independent in G^\hat G too.
  2. By assumption α(G^)=k−1\alpha(\hat G)=k-1, so every independent set in G^\hat G has size ≤k−1\le k-1. In particular ∣U∣≤k−1|U|\le k-1.
  3. Hence in particular ∣U∣≠k|U|\ne k.

As this holds for every independent UU in GG, there is no independent set of size kk, i.e. ⟨G,k⟩∈IS‾\langle G,k\rangle\in\overline{\mathrm{IS}}.

Cost of the reduction

TimeO(|⟨G,k⟩|²)
SpaceO(|V|²)
Output size|V| + k − 1 vertices, |E| + (k−1)|V| edges

A subtle point: in the input encoding the number kk occupies only log⁡k\log k bits, so nothing may be bounded "in terms of kk". But w.l.o.g. k≤∣V∣k\le|V| — if k>∣V∣k>|V| then GG certainly has no independent set of size kk (it has no kk vertices at all), and the reduction returns a fixed string belonging to MaxIS\mathrm{MaxIS}. So k−1<∣V∣k-1<|V|, adding the vertices costs O(∣V∣)O(|V|), and adding the edges costs (k−1)⋅∣V∣=O(∣V∣2)(k-1)\cdot|V|=O(|V|^2).

Note: each new vertex gets an edge to each old vertex, i.e. ∣V∣|V| edges — not kk edges.

What it buys

MaxIS\mathrm{MaxIS} is coNP-hard. With SAT≤pMaxIS\mathrm{SAT}\le_p\mathrm{MaxIS} it is NP-hard as well, and the two together produce the situation where MaxIS∈NP∪coNP\mathrm{MaxIS}\in\mathrm{NP}\cup\mathrm{coNP} if and only if NP=coNP\mathrm{NP}=\mathrm{coNP}.

Pitfalls

  • Isolated vertices do not work. "Add k−1k-1 isolated vertices" is nearly right — but isolated vertices join any existing independent set and raise the maximum by k−1k-1, so the "for all" half breaks.

  • "No set of size kk" implies "none of size >k>k" — by heredity: drop a vertex from an independent set of size k+1k+1 to get one of size kk. That is an argument of the proof, not of the algorithm: the algorithm never touches independent sets, only the graph.

  • k=0k=0 needs separate handling. For every graph ⟨G,0⟩∈IS\langle G,0\rangle\in\mathrm{IS} (the empty set), so ⟨G,0⟩∉IS‾\langle G,0\rangle\notin\overline{\mathrm{IS}}; on such input the reduction returns a fixed string outside MaxIS\mathrm{MaxIS}.

The chain

Where this was read from

  • Lesson 22משפט 3: IS‾≤pMaxIS\overline{\mathrm{IS}}\le_p\mathrm{MaxIS}, ולכן MaxIS\mathrm{MaxIS} היא coNP-קשה
  • The k=0k=0 case appears in none of the lesson's sources — it is a completion written into the lesson file itself so the construction is defined on every input.