a leaf on every vertex

VC ≤p MODEST

Call a graph modest if its maximum degree is at most 11. The problem "can at most kk vertices be removed so the remainder is modest" is NP-complete, via VC≤pMODEST\mathrm{VC}\le_p\mathrm{MODEST}.

The construction

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

  1. For every vertex v∈Vv\in V add a new vertex ℓv\ell_v (a leaf) and the single edge {v,ℓv}\{v,\ell_v\}.
  2. Return the resulting graph G′G' and the same kk.

What the leaf does. Without leaves, a surviving vertex with a single neighbour would itself be "modest" and the problem would weaken. The leaf ensures every surviving original vertex is already spending its full degree allowance: its degree is at least 11 thanks to the leaf. So if two adjacent original vertices both survive, at least one reaches degree 22 — and the graph is not modest. In other words: the removed set must hit every original edge, i.e. be a vertex cover.

Visualization

Guided construction

Vertex Cover → Modest Graph

Step 1 of 7
⟨G, k = 3⟩ ∈ VC ?modest ⇔ every degree ≤ 1
Vertex Cover to modest graph: a pendant leaf on every original vertexThe source graph G, a triangle a, b, c with a pendant vertex d on c, is shown on one side. On the other side the graph G prime hangs a small leaf vertex on each of a, b, c and d. Degree badges appear next to every surviving vertex, deleted vertices are struck through, and highlights show the cover U reused as a deletion set, a deletion set that wastes a unit on a leaf, and the repair map that swaps that leaf for the vertex it hangs from.G — the source graphabcd
original vertex of V (large circle)original edge of E

Correctness — both directions

VC ∈ ⟹ MODEST ∈

Suppose ⟨G,k⟩∈VC\langle G,k\rangle\in\mathrm{VC}; take a cover U⊆VU\subseteq V with ∣U∣≤k|U|\le k. Remove exactly UU from G′G' and check the remainder is modest.

Let ww be a surviving vertex and compute its degree in the remainder.

  • If w=ℓvw=\ell_v is a leaf: its only neighbour anywhere is vv, so its degree is ≤1\le1. ✓
  • If w=v∈V∖Uw=v\in V\setminus U: its neighbours in the remainder are the leaf ℓv\ell_v and any u∈V∖Uu\in V\setminus U with uv∈Euv\in E. But UU is a cover, so every edge uv∈Euv\in E has u∈Uu\in U or v∈Uv\in U; since v∉Uv\notin U we get u∈Uu\in U, i.e. uu was removed. So vv retains no original neighbour and its degree is exactly 11 (the leaf alone). ✓

So every degree in the remainder is ≤1\le1 — the graph is modest — and ∣U∣≤k|U|\le k vertices were removed.

MODEST ∈ ⟹ VC ∈

Suppose some S⊆V′S\subseteq V' with ∣S∣≤k|S|\le k leaves a modest graph when removed. Build a cover of GG from it.

Replace leaves by their vertices. Define U=(S∩V) ∪ { v ∣ ℓv∈S }.U=\bigl(S\cap V\bigr)\ \cup\ \{\,v\ \mid\ \ell_v\in S\,\}. Each leaf in SS is swapped for the original vertex it hangs from. Then U⊆VU\subseteq V and ∣U∣≤∣S∣≤k|U|\le|S|\le k (the map does not grow: each element of SS contributes at most one).

UU covers GG. Let uv∈Euv\in E and suppose for contradiction u∉Uu\notin U and v∉Uv\notin U. By the definition of UU, u∉S,ℓu∉S,v∉S,ℓv∉S.u\notin S,\quad \ell_u\notin S,\quad v\notin S,\quad \ell_v\notin S . So all four vertices u,ℓu,v,ℓvu,\ell_u,v,\ell_v survived, and so did the edges {u,ℓu}\{u,\ell_u\}, {v,ℓv}\{v,\ell_v\} and {u,v}\{u,v\} (an edge survives when both endpoints do). Then the degree of uu in the remainder is at least 22 — neighbours ℓu\ell_u and vv — contradicting modesty.

Hence u∈Uu\in U or v∈Uv\in U, i.e. UU is a vertex cover of GG of size ≤k\le k, so ⟨G,k⟩∈VC\langle G,k\rangle\in\mathrm{VC}.

Cost of the reduction

TimeO(|V| + |E|)
SpaceO(|V| + |E|)
Output size2|V| vertices, |E| + |V| edges

A single pass over the vertices, one vertex and one edge each. The output is linear in the input size.

What it buys

The problem is NP-hard, and lies in NP\mathrm{NP} (witness SS; the verifier removes and checks degrees), hence NP-complete. Its minimization version admits a 33-approximation.

Pitfalls

  • Without the leaves the reduction fails. The identity does not work: on a single-edge graph, removing 00 vertices already leaves a modest graph (degree 11), while a vertex cover needs 11. The leaf is exactly what closes that gap.

  • SS may contain leaves. One must not assume S⊆VS\subseteq V — it arrived "from the sky". Swapping a leaf for its vertex is what returns us to VV, and exactly as in VC≤pDS\mathrm{VC}\le_p\mathrm{DS} the size only shrinks in the swap.

The chain

Rests on

Where this was read from

  • 2025"Prove the following decision problem is NP-complete… Hint: reduce from VC and add a leaf to every vertex."
  • This problem appears in no lesson; it came up in a 2025 paper together with the explicit hint. The construction above follows that hint, and the proof here is its full working out.