0

Okay, So I am given a rooted tree for which at each vertex v I have the values N(v) and M(v) where N(v) is the value of the minimum-size vertex cover of a subtree Tv that includes the node, and M(v) is the value of the minimum-size vertex cover of a subtree Tv.

If i understand correctly, this means the root node will actually contain the minimum size vertex of the tree T (since a sub-tree of the root node is the tree itself). Therefore that means I know how big the minimum-size vertex cover of the tree will be.

I was thinking of using a greedy-approach of picking verticies with the highest degree, and then deleting the edges adjacent to that node as well as the node from the tree, and continuing in this way until there are no edges left. Would this result in a linear-time algorithm considering that we know what N(v) and M(v) are?

user2713650
  • 99
  • 2
  • 8
  • Not sure how you define "Vertex Cover" for a *directed graph*, the common VC handles *undirected graphs*, and I personally have never seen a definition for directed graphs. – amit Jan 04 '15 at 17:32
  • If you know N(v) and M(v) for all v, you already know the answer(it is M(root)). So what is your question exactly? – kraskevich Jan 04 '15 at 17:59
  • It's not directed, it is undirected. – user2713650 Jan 04 '15 at 18:26
  • @ILoveCoding So what I said is correct? It's worth 8 marks on this past exam paper I'm looking at, so I thought it'd require more work :S – user2713650 Jan 04 '15 at 18:29
  • How can an undirected tree be rooted? Every node in an undirected tree is a root. – amit Jan 04 '15 at 20:21
  • Whilst that may be true, I am specifically given a rooted tree in the question @amit – user2713650 Jan 04 '15 at 21:41

0 Answers0