0

I'm doing practice problems for an upcoming exam and I'm unsure if the following problem is NP-complete. If it is can you please give me a hint as to what problem I should reduce to it. I believe it's NP-Complete and maybe the knapsack problem can be reduced to it but I'm not sure.

WEIGHTED VERTEX COVER:
Input: A weighted graph $G$ with integer weight $Wv>1$ on each vertex $v$ and an integer $T$.
Question: Does $G$ have a vertex cover with total weight at most $T$?

Luke Mathieson
  • 18,373
  • 4
  • 60
  • 87

1 Answers1

2

Expanding on Pål GD's hint, you can reduced from the normal, unweighted version of VERTEX COVER.

VERTEX COVER
Input: A graph $G$ and an integer $k$.
Question: Does $G$ have a vertex cover of size at most $k$?

So in this case, you're just counting the number of vertices in the cover. Now to transform this to the weighted version, we just need to add weights to all the vertices such that we can recover the size of the vertex cover from the weight of the vertex cover.

Bigger hint under the spoiler tag, don't mouse over unless you're really stuck.

What happens if we assign each vertex the same weight (doesn't really matter what it is, as long as they're all the same)? If each vertex has weight $c>1$, what's the weight of a vertex cover of size $k$? What's the size of a vertex cover of weight $T$?

Luke Mathieson
  • 18,373
  • 4
  • 60
  • 87