np complete – Concrete example for reducing vertex cover to subset sum

In computer-aided infectivity, we often come across the need to reduce the vertex cover (VC) problem to a subset sum problem …

We do

… mainly to prove that Subset Sum is NP-Complete.

There is no particular reason to go this way. Karp (1) defined the Knapsack problem as: $ a_1, dots, a_r, b in mathbb {Z} $is there a sentence $ S subseteq {1, dots, r } $ so that $ sum_ {i in S} a_i = b $? This is a variant of the sum now called subset. If you prefer to define the subset Sum so that $ b $ is always zero, we'll come back to it soon.

Karp shows that Subset is Sum NPcompletely through the chain of reductions
$$ text {SAT} leq text {3SAT} leq text {Chromatic Number} leq text {Exact Coverage} leq text {Subset} ,. $$
In particular, reducing Exact Cover to Subset Sum creates an instance where the $ a_i $and $ b $ If all are positive, you can specify whether the subset "Is there a subset whose sum is zero?" should be defined $ a_ {r + 1} = – b $,

Because Subset Sum and Vertex Cover are both NPIn full, there is clearly a reduction between them. However, you should not expect that there will be a "nice" reduction in which a small VC instance naturally transforms into a small subset-sum instance where you say, "Aha, now I understand." And that goes for most pairs of NP-complete problems. In complexity theory classes, we teach simple, intuitive reductions, usually between problems that somehow resemble each other, or between SAT or 3SAT and a problem that is not Boolean formulas. This can give the impression that there is a natural reduction between each pair of NP-complete problems; In fact, there is usually no.

(1) Richard M. Karp, Reducibility in combinatorial problems, in the Complexity of computer calculations, Plenary Press, 1972. (PDF)