textbook) in your solutions. Each problem is worth 10 points. civen a graph G (V
ID: 3601664 • Letter: T
Question
textbook) in your solutions. Each problem is worth 10 points. civen a graph G (V,E) a subset U S V of nodes is called a node coner if each edge in E is an efficient manner. But if we restrict the minimum node cover for a tree. Analyze its correctness and running time. at least one node in U. Given a graph, we do not know how to find the minimum node cover in G to be a tree, then it is possible. Give a greedy algorithm that finds A tree f a connected graph with no cycles, i.e. where any pair of nodes is connected by a simple path t thn Incal eumermarket and vou have to make changeExplanation / Answer
We start from the root(Node n). At each step there is a posssibility that the node under consideration is either in the min cover or not.
A) If the node is in min cover then overall min cover =
1 + min ( Cover(i))
where Cover(i) = Min cover set for each child i of n
B) If the node is not in min cover then overall min cover=
total number of children of n + sum(Cover(j))
where Cover(j)=min cover for each grandchild of n
Running time is same as running DFS on the tree- O(V+E)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.