# Talk:TADM2E 5.13

From Algorithm Wiki

I think the answer for the third case does not work since in a weighted graph it might not be optimal to choose alternating nodes: 100 - 1 - 1 - 100 (a path with4 nodes, high weights on the leaves, low weights on the inner nodes).

---

The solution to 2) as I understand it ("do the same as for 1") is wrong. Take a tree where the root has 50 children, each having one child of its own. The algorithm results in the children of the root plus the root being selected for a total weight of 2*50 + 50 = 150, while an optimal cover would be the root plus all the leaves for a total weight of 50 + 50.