Approx Lecture03-4 VC
Approx Lecture03-4 VC
4.1 Overview
This lecture introduced Fixed Parameter Tractable (FPT) problems. An example of an FPT
problem is the Vertex Cover problem. The Vertex Cover problem can be seen in two ways:
as an optimization problem and as a decision problem. Both these problems were discussed.
Later on, the lecture also dealt with approximating the Vertex Cover problem and computing
a connected vertex cover.
a vertex cover ‘covers’ all edges of the network. You could look at this in the following way:
Placing a guard in every node of the vertex cover guarantees that all edges are guarded. There
is another reason why vertex covers are important as well:
Proof: (⇒) Suppose S is a vertex cover. Consider any two nodes u, v ∈ V − S. If there
would be an edge between u and v, then (because S is a vertex cover) u or v must be in S.
Contradiction! Thus there can be no edge between u and v and V − S is an independent set.
(⇐) Suppose V − S is an independent set. Consider any edge (u, v). Since V − S is an
independent set, u and v cannot both be elements of V − S. Thus at least one of the nodes
u and v must be an element of S. Thus S is a vertex cover.
Given their interpretation, our objective will be to find vertex covers of small size. One can
distinguish between two types of problems.
4-1
Lecture 4: September 11, 2003 4-2
• decision problem: given k, decide whether the network has a vertex cover of size ≤ k.
(And perhaps: construct one if the answer is yes.)
In many cases the optimization and decision versions of a problem are related in an efficient
manner. We show this for vertex cover.
Lemma 4.3 The optimization version of the Vertex Cover problem is solvable in polynomial
time if and only if the decision version of the Vertex Cover problem is solvable/decidable in
polynomial time.
Proof: (⇒) Proof by computing the (size of the) minimum vertex cover.
(⇐) By searching down from k = n and calling on the decision algorithm, we can determine
in at most n steps the size k of the minimum vertex cover of G. We can compute a concrete
minimum size vertex cover recursively as follows starting with an initially empty set.
Assume E 6= ∅. Pick any edge (u, v) ∈ E. We know that at least one of the nodes u and v
must belong to the vertex cover. Determine two subgraphs:
Let G =< V, E > be a network, OP T the minimum size of any vertex cover of G. How to
compute a minimum size vertex cover:
We give a branching algorithm that operates on instances (G, S) with G the original network
and S ⊆ V initially empty. We want to break down G and accumulate nodes of a (possibly
minimum) vertex cover in S.
In a branching algorithm a problem instance is repeatedly split into smaller problem instances,
leading to a tree of subproblems in which only the problems at the leaves matter. Typically,
we are after the best solution in any leaf (unless we decide to branch further).
Lecture 4: September 11, 2003 4-3
This branching algorithm will repeatedly pick leaves and carry out the following rule:
Branching rule. Given (H, S) and H 6= ∅. Pick an edge (u, v) ∈ H. Split the
problem into two subproblems:
- (Hu , S ∪ {u}) with Hu equal to H with all edges incident to u removed and
isolated nodes thrown away.
- (Hv , S ∪ {v}) with Hv equal to H with all edges incident to v removed and
isolated nodes thrown away.
Lemma 4.4 The first level k of the branching tree that contains a node with label (∅, S) gives
the size of the minimum vertex cover and S is such a minimum vertex cover.
(a) for at least one leaf (H, S): “S∪ a minimum vertex cover for H” is a minimum vertex
cover for G.
The proof of the invariant follows by inspecting the branching rule again. If (u, v) ∈ H, then
at least one of the nodes u and v will belong to a minimum vertex cover of H. Clearly “{u}∪
a minimum vertex cover of Hu ” and “{v}∪ a minimum vertex cover of Hv ” both are vertex
covers of H but only at least one of them will also be a minimum vertex cover of H. The
proof of the invariant property is now easily completed.
Consider the algorithm as it grows the branching tree level after level. After completing the
k’th level, all nodes (H, S) in the level will have |S| = k.
If level k contains a node that cannot be split further, i.e. a node (∅, S), then this node must
be a leaf corresponding to property (a). The lemma follows.
Theorem 4.5 Minimum vertex covers can be computed in O(2OP T · |G|) time.
Proof: The branching algorithm will continue precisely to level OP T . This involves branch-
ing in 1 + 2 + 4 + . . . + 2OP T −1 = 2OP T − 1 nodes and each call of the branching rule takes
O(|G|) time.
Exercise. Show how to implement the branching algorithm efficiently using a queue.
A problem ‘with a parameter k’ is called fixed parameter tractable (FPT) if it can be solved
or decided by an algorithm within a running time O(f (k).poly(n)), for some function f . For
fixed k, this is polynomial time. The class of fixed parameter tractable problems is denoted
as: F P T [3].
Lecture 4: September 11, 2003 4-4
Proof: Do the branching algorithm for k levels and see if any node labelled (∅, S) is en-
countered. If so, the answer is yes. If not, the answer is no. Running time: O(2k · |G|) =
O(2k · (n + m).
The decision version of the Vertex Cover problem can be decided within better bounds than
we derived. The following table shows very recent progress.
The Dominating Set problem is not known to be ∈ FPT, but the dominating set problem
restricted to planar networks is in FPT.
Theorem 4.7 (Downey and Fellows, 1995) The Dominating Set problem is solvable in
O(11k ∗ (n + m)) time.
There is a variety of algorithms for computing ‘approximately minimum’ vertex covers effi-
ciently but the best result is still the following.
Theorem 4.8 The Vertex Cover problem can be approximated in polynomial time within the
performance ratio of 2 (thus leading to vertex covers of size at most 2 · OP T ).
Algorithm G1
S := ∅
return(S)
Lecture 4: September 11, 2003 4-5
Proof: (a) S is a vertex cover. Edges can be removed only if (at least) one of their end
points has been put in S.
(b) |S| ≤ 2 · OP T . When we choose an edge, the optimum would have to include at least one
node. The algorithm includes two.
Observation: The edges (u, v) picked by the algorithm form a matching (i.e. a set of edges
M ⊆ E such that no two edges of M are incident.)
Exercise. Argue that the edges picked form a maximal matching.
Another algorithm, due to Gavril (≤ 1979).
Algorithm G2
Proof: The algorithm returns a vertex cover, because an edge (u, v) is either:
- part of the matching and thus has both its nodes in the vertex cover, or
- has no endpoints that are in the vertex cover, but this isn’t possible, because then (u, v)
could be added to the matching, contradicting that it was maximal.
Note that any edge ∈ M must contain at least one node of the optimum cover. Thus
|M | ≤ OP T ≤ |vertex cover| = 2 · |M | ≤ 2 · OP T
Håstad (1997) proved that the Vertex Cover problem cannot be approximated in polynomial
time within a performance ratio ≤ 1.1666 unless some big open problems in complexity theory
are solved.
Lecture 4: September 11, 2003 4-6
Assume without loss of generality that G is connected. It turns out that a stronger result can
be obtained for the vertex cover problem. Let OP T again denote the minimum size of any
vertex cover in G.
Theorem 4.12 (Savage, 1982) In polynomial time, one can compute a connected vertex
cover of size ≤ 2 · OP T .
The algorithm turns out to be very simple, but it will be harder to actually show that it does
the job.
Algorithm S
Return I(T )
I(T ) is obviously connected. We now show that it is a vertex cover and that it must have
size ≤ 2 · OP T .
Proof: Any edge is either a tree edge or a back-edge. In both cases, it is incident to at least
one internal node.
Exercise. Show that the leaves of depth-first search tree form an independent set.
Proof:
Consider T . Then |I(T )| = #nodes − #leaves.
P
It is easy to show by induction that #leaves = 1 + v∈I(T ) (sons(v) − 1), where sons(v) is the
number of sons of v in T . In order to estimate this expression we use a maximum matching M
of the depth-first search tree T . We show that M can be changed into a maximum matching
with a special property.
Let r be the root of T .
Definition 4.16 A free node w with w 6= r is called free+ if the father v of w has at least
one other son, say u, and moreover (u, v) ∈ M .
Claim 4.17 Every tree T has a maximum matching M with the property that every free node
6= r is free+ .
Proof: Let M be a maximum matching in T . Suppose M does not have the stated property. We show that
M can be transformed into a maximum matching that does.
Let a lowest free node w that is not free+ occur at level k in T . Assume w.l.o.g. that k > 0, i.e. level k is not
the root level. We show that we can modify M and establish the property in level k, by at best creating more
free nodes w that are not free+ in levels < k. For any free node w in level k that is not free+ , there can be
the following cases. In all cases, let v = f ather(w).
Case 1: deg(v) = 1. If v were free, then we could add (w, v) to M , contradicting that M is maximum. Thus v
is not free, which implies that it has a father z and that (v, z) ∈ M . Now delete (v, z) from M but add (w, v)
to it. We maintain a maximum matching, but w is no longer free in it.
Case 2: deg(v) ≥ 2 but for no son u of v we have (v, u) ∈ M . As in case 1 one argues that v is not free.
Because w is assumed not to be free+ , this implies that v must have a father z and is matched by the edge
(v, z) ∈ M . Again delete (v, z) from M but add (w, v) to it: because no sons of v were matched this switch
keeps a matching. We maintain a maximum matching, but w is no longer free in it. All other free sons of v
have become free+ .
By modifying M inductively from level k upward towards the root, we ‘push out’ all free nodes that aren’t
free+ .
Thus assume, as we may, that the chosen maximum matching M of T has the property that
every free node w with w 6= r is free+ . Let F be the set of free nodes.
X k
X
#leaves = 1 + (sons(v) − 1) ≥ 1 + (sons(vi ) − 1),
v∈I(T ) i=1
where v1 , . . . , vk are the nodes ∈ I(T ) that have at least one son that is free.
P As free sons are
free+ , it means that every vi also has at least one non-free son. Thus vvk1 (sons(v) − 1) is
greater than or equal to the collective number of free sons of the vi ’s and there are at least
|F | − 1 of these. (Observe that the root might be in F and it has to be excluded in the count.)
Hence:
vk
X
#leaves ≥ 1 + (sons(v) − 1) ≥ 1 + (|F | − 1) = |F |
v1
where |F | = n − 2|M |.
Consequently |I(T )| = n − #leaves ≤ n − |F | = 2|M |.
Letting M (G) be any maximum matching of G we can conclude :
|M | ≤ |M (G)| ≤ OP T ≤ |I(T )| ≤ 2 · |M |,
References
[1] R. Bar-Yehuda, S. Even. A local-ratio theorem for approximating the weighted vertex
cover problem. Annals of Discr. Mathematics 25 (1985) 27-44.
[2] J. Chen, I.A. Kanj, and W. Jia. Vertex cover: Further observations and further improve-
ments. J. of Algorithms 41 (2001) 280-301.
[3] R.G. Downey, M.R. Fellows. Parameterized complexity. Springer-Verlag, New York, 1999.
[4] J. Håstad, Some optimal inapproximability results. Proc. 29th Ann. ACM Symposium
on Theory of Computing, 1997, pp 1-10.
[5] C. Savage. Depth-first search and the vertex cover problem. Information Processing Let-
ters 14 (1982) 233-235.