A set of nodes where every edge is adjacent to at least one of the nodes.
Dynamic Programming Solution
Optimal substructure
Consider the subproblems:
- the size of the vertex cover, if it is uncovered. - the size of the vertex cover, if it is covered.
Solving subproblems
Given
Since is not covered, would have to be covered, thus: Since is covered, we can just take the minimum of the vertex covers of :