a vertex per edge, same k

VC ≤p DS

VC≤pDS\mathrm{VC}\le_p\mathrm{DS}, so DS\mathrm{DS} (dominating set) is NP-complete.

The construction

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

  1. For every edge xy∈Exy\in E: add a new vertex vxyv_{xy} and join it to xx and to yy.
  2. Remove all isolated vertices from the resulting graph, and return G^=(V^,E^)\hat G=(\hat V,\hat E) with the same kk.

What vxyv_{xy} does, in one line: it forces one of x,yx,y to be inside. That is the whole reduction — translating "every edge is touched" into "every vertex is dominated", by turning each edge into a vertex that demands domination.

Why step 2 is needed. An isolated vertex of GG touches no edge and is therefore never required in a cover; in a dominating set, by contrast, an isolated vertex must join the set, since it has no neighbour to cover it. Without step 2 we would force DS\mathrm{DS} to add vertices with no counterpart on the VC\mathrm{VC} side, breaking answer preservation. Since removing isolated vertices does not change the VC\mathrm{VC} answer (the edges are untouched), we may assume from here on that GG has none.

The structural property used repeatedly: every new vertex vxyv_{xy} has exactly two neighbours in G^\hat G, namely xx and yy, both in VV.

Visualization

Guided construction

Vertex Cover → Dominating Set

Step 1 of 7
⟨G, k = 2⟩ ∈ VC ?
Vertex Cover to Dominating Set: an edge vertex for every edge, isolated vertices deletedThe source graph G with vertices a, b, c, d and an isolated vertex z sits on the left. On the right the graph Ĝ adds one vertex per edge joined to both endpoints, deletes z, and carries the same threshold k. Highlights show the cover U reused as a dominating set, a dominating set containing a new vertex, and the repair map that sends that new vertex back to an original one.G — the source graphabcdzisolated
original vertex of V

Correctness — both directions

VC ∈ ⟹ DS ∈

Suppose ⟨G,k⟩∈VC\langle G,k\rangle\in\mathrm{VC}. Then some U⊆VU\subseteq V has ∀e∈E: e∩U≠∅\forall e\in E:\ e\cap U\ne\emptyset and ∣U∣≤k|U|\le k.

Consider the same UU as a subset of V^\hat V (legitimate, since V⊆V^V\subseteq\hat V). We show it dominates G^\hat G. Let x∈V^x\in\hat V and suppose x∉Ux\notin U (if x∈Ux\in U there is nothing to prove).

Case 1: x∈Vx\in V. Since GG has no isolated vertices, some y∈Vy\in V has xy∈Exy\in E. As UU is a cover, x∈Ux\in U or y∈Uy\in U; we assumed x∉Ux\notin U, so y∈Uy\in U. And xy∈E⊆E^xy\in E\subseteq\hat E. So xx has a neighbour in UU.

Case 2: x∉Vx\notin V. Then xx was created in step 1, so there are a,b∈Va,b\in V with ab∈Eab\in E and x=vabx=v_{ab}. As UU is a cover, a∈Ua\in U or b∈Ub\in U; and by construction ax∈E^ax\in\hat E and bx∈E^bx\in\hat E. So some y∈{a,b}∩Uy\in\{a,b\}\cap U has xy∈E^xy\in\hat E — xx has a neighbour in UU.

Either way x∈Ux\in U or xx has a neighbour in UU; so UU dominates G^\hat G, and its size ∣U∣≤k|U|\le k is unchanged. Hence ⟨G^,k⟩∈DS\langle\hat G,k\rangle\in\mathrm{DS}.

DS ∈ ⟹ VC ∈

Suppose some U^⊆V^\hat U\subseteq\hat V dominates G^\hat G with ∣U^∣≤k|\hat U|\le k.

Here U^\hat U cannot be taken as it stands — it may contain new vertices, so it is not a subset of VV and certainly not a cover of GG. Build U⊆VU\subseteq V from it:

> For each x∈U^x\in\hat U: if x∈Vx\in V — put xx into UU; if x∉Vx\notin V — put in one of its neighbours (by a fixed arbitrary rule; the choice does not matter).

U⊆VU\subseteq V: for x∈U^∖Vx\in\hat U\setminus V both neighbours lie in VV, and in the first case we inserted x∈Vx\in V itself.

Size: each element of U^\hat U contributed at most one element, so ∣U∣≤∣U^∣≤k|U|\le|\hat U|\le k. (The same vertex may be inserted twice, making ∣U∣|U| strictly smaller — which only helps, since an upper bound is what is needed.)

UU is a vertex cover of GG: let xy∈Exy\in E and suppose x∉Ux\notin U; we show y∈Uy\in U.

First, x∉Ux\notin U together with x∈Vx\in V forces x∉U^x\notin\hat U — had xx been in U^\hat U, the construction would have put it into UU.

Now consider vxy∈V^v_{xy}\in\hat V; it exists, since xy∈Exy\in E so step 1 created it. As U^\hat U dominates, either vxy∈U^v_{xy}\in\hat U or some neighbour of it lies in U^\hat U.

Case 1: vxy∈U^v_{xy}\in\hat U. Then building UU we inserted one of its neighbours — xx or yy. Since x∉Ux\notin U, it must have been yy, so y∈Uy\in U.

Case 2: a neighbour of vxyv_{xy} lies in U^\hat U. Its neighbours are exactly xx and yy, both in VV. Since x∉U^x\notin\hat U, necessarily y∈U^y\in\hat U; and as y∈Vy\in V, the construction inserted yy itself into UU.

Either way y∈Uy\in U, so xy∩U≠∅xy\cap U\ne\emptyset. As xyxy was arbitrary, UU is a cover of size ≤k\le k, i.e. ⟨G,k⟩∈VC\langle G,k\rangle\in\mathrm{VC}.

Cost of the reduction

TimeO(|V| + |E|)
SpaceO(|V| + |E|)
Output size|V̂| ≤ |V| + |E|, |Ê| ≤ 3|E|

The loop runs ∣E∣|E| times, adding one vertex and two edges per iteration — constant time (or O(log⁡)O(\log) in a sensible representation). Spotting isolated vertices is a single pass over the adjacency lists, O(∣V∣+∣E∣)O(|V|+|E|). The output is polynomial too, which is necessary — otherwise it could not be written in polynomial time.

What it buys

DS\mathrm{DS} is NP-hard, and being in NP\mathrm{NP} as well, NP-complete.

Pitfalls

  • The identity reduction fails. A dominating set need not cover edges: the two notions come apart as soon as a vertex can be dominated by a neighbour without any incident edge being covered by it. The direction that breaks is the one requiring a translation between "touching an edge" and "dominating a vertex" — which is precisely the job of the edge vertex vxyv_{xy}.

  • A reduction does not solve. The algorithm RR knows neither UU nor U^\hat U — those appear only in the correctness proof, where a solution may be assumed and turned into one for the other side.

The chain

Rests on

Where this was read from

  • Lesson 19משפט 4: VC≤pDS\mathrm{VC}\le_p\mathrm{DS}, ולכן DS\mathrm{DS} היא NP-שלמה
  • 2025Defining DS\mathrm{DS} and proving it hard.