Short Cycles Make W - Hard Problems Hard: FPT Algorithms For W - Hard Problems in Graphs With No Short Cycles
Short Cycles Make W - Hard Problems Hard: FPT Algorithms For W - Hard Problems in Graphs With No Short Cycles
Short Cycles Make W - Hard Problems Hard: FPT Algorithms For W - Hard Problems in Graphs With No Short Cycles
DOI 10.1007/s00453-007-9148-9
Received: 15 November 2006 / Accepted: 26 November 2007 / Published online: 3 January 2008
© Springer Science+Business Media, LLC 2007
Abstract We show that several problems that are hard for various parameterized
complexity classes on general graphs, become fixed parameter tractable on graphs
with no small cycles.
More specifically, we give fixed parameter tractable algorithms for D OMINATING
S ET, t -V ERTEX C OVER (where we need to cover at least t edges) and several of their
variants on graphs with girth at least five. These problems are known to be W [i]-hard
for some i ≥ 1 in general graphs. We also show that the D OMINATING S ET problem
is W [2]-hard for bipartite graphs and hence for triangle free graphs.
In the case of I NDEPENDENT S ET and several of its variants, we show these prob-
lems to be fixed parameter tractable even in triangle free graphs. In contrast, we show
that the D ENSE S UBGRAPH problem where one is interested in finding an induced
subgraph on k vertices having at least l edges, parameterized by k, is W [1]-hard even
on graphs with girth at least six.
Finally, we give an O(log p) ratio approximation algorithm for the D OMINATING
S ET problem for graphs with girth at least 5, where p is the size of an optimum dom-
inating set of the graph. This improves the previous O(log n) factor approximation
algorithm for the problem, where n is the number of vertices of the input graph.
A preliminary version of this paper appeared in the Proceedings of 10th Scandinavian Workshop on
Algorithm Theory (SWAT), Lecture Notes in Computer Science, vol. 4059, pp. 304–315, 2006.
V. Raman · S. Saurabh ()
The Institute of Mathematical Sciences, Chennai 600 113, India
e-mail: [email protected]
V. Raman
e-mail: [email protected]
204 Algorithmica (2008) 52: 203–225
1 Introduction
In Sect. 2, we look at the D OMINATING S ET problem and show that the problem
is W [2]-complete even in bipartite graphs and split graphs (a graph in which the
vertices can be partitioned into a clique and an independent set). Though variations
of D OMINATING S ET like R ED -B LUE D OMINATING S ET [8] and C ONSTRAINED
D OMINATING S ET [13] have been studied before and shown to be W [2]-complete,
to the best of our knowledge the standard D OMINATING S ET problem (which we
consider here) in bipartite graphs has not been studied before. Our observation means
that the dominating set problem is W [2]-complete in triangle free graphs. Then we
show that the problem is FPT if the input graph has girth at least 5. It turns out that
Algorithmica (2008) 52: 203–225 205
Since every bipartite graph is also triangle free, we have the following corollary.
Proof We again prove this by giving a reduction from the D OMINATING S ET prob-
lem in general undirected graphs. Given an instance (G = (V , E), k) of D OMINAT-
ING S ET , we construct a split graph H = (V , E ). We create two copies of V namely
V1 = {u1 | u ∈ V } and V2 = {u2 | u ∈ V }. If there is an edge (u, v) in E then we draw
the edges (u1 , v2 ) and (v1 , u2 ). We also draw edges of the form (u1 , u2 ) for every
Algorithmica (2008) 52: 203–225 207
u ∈ V . Now we make H [V1 ] a complete graph by adding all arcs of the form (u1 , v1 )
for every pair of vertex u1 , v1 ∈ V1 . This completes the construction of H . It is easy
to see that H is a split graph with H [V1 ] as a clique and H [V2 ] as an independent
set.
As in the proof of Theorem 1, it is easy to see that G has a dominating set of size k
if and only if H has a dominating set of size k.
An undirected graph is chordal if every cycle of length greater than three possesses
a chord, that is, an edge joining two non consecutive vertices of the cycle. It is well
known that every split graph is also a chordal graph and hence Theorem 2 implies
that the D OMINATING S ET is W [2]-complete in chordal graphs. As a corollary of
Theorem 2 we get the following.
It is easy to verify that if we start with a general G5 graph with all vertices colored
black, and color all vertices we want to include in the dominating set as red, and their
neighbors as white, the graph we obtain at every intermediate step is a rwb-graph,
and the problem we will have at the intermediate steps is the RWB-D OMINATING
S ET problem.
The following lemma essentially shows that if the rwb-graph has a black or white
vertex dominating more than k black vertices, then such a vertex must be part of every
solution of size at most k, if one exists.
Proof Let D be a set of size k − |R| that dominates all black vertices in G, and
suppose v ∈/ D. Let X be the set of black neighbors of v which are not in D and Y
be the set of black neighbors of v in D. So |X| + |Y | > k − |R|. Observe that for
every vx ∈ X we have a neighbor ux ∈ D which is not in Y (otherwise v, vx , ux is
a 3 length cycle). Similarly, for x, y ∈ X, x = y ⇒ ux = uy . Otherwise v, x, ux , y
will form a cycle of length 4. This means that |D| ≥ |X| + |Y | > k − |R| which is a
contradiction.
Proof Let R , B and W be the set of vertices colored red, black and white respec-
tively in G . We argue that each of |R |, |B | and |W | is bounded by a function of k.
Because of (R4) (and the fact that G is a yes instance), |R | ≤ k.
Because of (R1), every vertex colored white or black has at most k − |R | black
neighbors. Also we know that no red vertex has a black neighbor. Since G is a yes
instance, there are at most k (k − |R | to be more precise) black or white vertices dom-
inating all black vertices. Since each of them can dominate at most k black vertices,
we conclude that |B | can be at most k 2 .
We argue that |W | ≤ k 3 . Towards this end, we just show that every black vertex
has at most k white neighbors. Since |B | ≤ k 2 , and every white vertex is adjacent to
some black neighbor (because of (R2) and (R3)), the conclusion will follow.
Note that every white vertex has a red neighbor. Observe that the white neighbors
of any black vertex (any vertex for that matter) will have all distinct red neighbors.
I.e. if w1 and w2 are white neighbors of a black vertex b, then there is no overlap
between the red neighbors of w1 and the red neighbors of w2 . This is because if w1
and w2 have a common red neighbor r, then we will have a 4-cycle b, w1 , r, w2 , b.
Since |R | ≤ k, it follows that a black vertex can have at most k white neighbors.
This proves the required claim.
Proof It is easy to see that the reduction rules (R1) to (R4) take polynomial time to
execute. When none of these rules can be executed, by Lemma 3, we have that the
number of vertices in the resulting graph is O(k 3 ), and each vertex has at most k
black neighbors. We can just try all possible subsets of size at most k of the vertex
set of the reduced graph, to see whether that subset dominates all the black vertices.
If any of them does, then we say YES and NO otherwise. This will take O(k 3k+O(1) )
time.
Alternatively, we can apply a branching technique on the black vertices, by select-
ing a black vertex or any of its neighbors in the dominating set. More precisely, let
v be a black vertex. Then we branch on N [v] by including w ∈ N [v] in the possible
dominating set D we are constructing and look for a solution of size k − 1 in G − {w}
where w is colored red and all its neighbors are colored white for every w ∈ N[v].
This results in an O((k + 1)k+O(1) ) time algorithm.
A number of other variants of dominating set problem which are W [2]-hard can be
shown to be fixed parameter tractable in a similar way for G5 graphs though not using
kernelization. We give necessary details for a few of them in the next subsections.
Proof Any two vertices in Vred have at most one common neighbor in Vblue as other-
wise there will be a four cycle in G. Hence, the following reduction rule is justified.
(R1 ) If x ∈ Vred has degree more than k then include x ∈ D.
The correctness of (R1 ) follows from the fact that if we do not select x in D then
we need more than k vertices from Vred to dominate N (x) as any vertex y ∈ Vred ,
y = x, can dominate at most one vertex of N (x). Hence after exhaustively applying
reduction rule (R1 ) if the size of D is more than k we answer NO.
Remove N[D] from G, i.e., set Vred = Vred \ D and Vblue = Vblue \ N (D). Now
the degree of every vertex in Vred is at most k and we are looking for a set of size
at most k − |D| in Vred such that it dominates all the vertices of Vblue . Since every
vertex in Vred has degree at most k, the size of the set Vblue is bounded above by k 2
Algorithmica (2008) 52: 203–225 211
((k − |S|)k to be precise) else the answer is NO. We can not bound the size of the set
Vred anymore, as we do not have any bound on the degree of the vertices in Vblue . So
to find the desired dominating set in Vred (dominating all the vertices in Vblue ) we do
as follows:
– For all partitions P of Vblue into at most k − |D| parts, say P = {P1 , P2 , . . . , Pj },
1 ≤ j ≤ k − |D|, for each Pi , 1 ≤ i ≤ j , check whether there exists a vertex ui ∈
Vred such that Pi ⊆ N (ui ). Call the partition P valid if for all 1 ≤ i ≤ j , there
exists ui ∈ Vblue such that Pi ⊆ N (ui ) and the set {ui | 1 ≤ i ≤ j } is called the
witness set. If any partition P is valid then return YES with the corresponding
witness set else return NO.
It is easy to see that there exists a subset of Vred of size at most k − |D| dominating all
vertices of Vblue if and only if there exists a valid partition. Number
of ways in which
n indistinguishable objects can be partitioned into r ways is n+r−1 r−1 [18]. Hence the
total number of partitions P considered for our case is upper bounded by
k 2
k−|D|
+i −1
.
i −1
i=1
Since the total number of partitions is upper bounded by O(k 2k+O(1) ), the result that
R ED -B LUE D OMINATING S ET is FPT for G5 graphs follows.
Proof To solve this problem we just need to solve two instances of R ED -B LUE D OM -
INATING S ET problem. The instances of R ED -B LUE D OMINATING S ET problem we
solve are:
1. Vred = V1 , Vblue = V2 and parameter is k1 .
2. Vred = V2 , Vblue = V1 and parameter is k2 .
We return YES for CBDS problem if both the instances return YES and as D1 the
red-blue dominating set returned by instance 1 and as D2 the red-blue dominating set
returned by instance 2. If either of the instances of R ED -B LUE D OMINATING S ET
problem returns NO, then we return NO for the CBDS problem.
Proof First we observe that if k < r, then the answer is NO. We assume that r ≤ log n,
as otherwise k ≥ log n and we have a kernel of size at most 2k . Now we can solve the
problem by checking all subsets of size at most k for the desired threshold dominating
set.
Our algorithm is again based on the following simple reduction rule whose cor-
rectness follows from Lemma 1.
(R1 ) If x ∈ V has degree more than k then include x ∈ V .
So basically we select all the vertices of degree more than k of V in V and hence if
the size of V is more than k then we answer NO.
Next we assign a color to all the vertices. We assign white color to all the vertices
(including vertices in V ) which have enough (at least r) neighbors in V and black
to the rest. Let B and W , as usual, represent the set of black and white vertices
respectively and set B = B \ V and W = W \ V . Apply reduction rules (R2) and
(R3) of Lemma 2 exhaustively. The rule (R3) makes G[W ] an independent set. Now
the problem reduces to finding a set S of size at most k − |V | in V \ V such that
V ∪ S is a desired threshold dominating set for G, in particular for the vertices of B.
Since every vertex in V \ V has degree at most k and we are looking for S of size
at most k in V \ V , the size of |B| is bounded above by k 2 , as otherwise we answer
NO.
Now what we have is a generalized version of T HRESHOLD D OMINATING S ET
problem where we have a set of j ≤ k 2 black vertices B = {u1 , . . . , uj }, each with
a positive integer ri (ri = r − |N[vi ] ∩ V |), 1 ≤ i ≤ j . We are looking for a set
S ⊆ (W ∪ B ) of size at most k − |V | such that for every ui ∈ B, |N (ui ) ∩ S | ≥ ri
in G where the vertex set of G is V (G ) = B ∪ W and the edge set of G is E(G ) =
{(u, v) ∈ E | u ∈ W , v ∈ B or u ∈ B, v ∈ B}.
To solve this generalized version of T HRESHOLD D OMINATING S ET problem, we
need to generalize our partition arguments used in the Theorem 5 suitably. The major
differences are that G is no more bipartite and that there are vertices which need more
than 1 (possibly r) vertices in the desired threshold dominating set. To overcome this
difficulty, we make a multiset M from B by having ri copies for each vertex ui ∈ B.
Clearly the size of |M| is bounded above by rk 2 . Now if we apply the partition idea
of Theorem 5 it is possible that the same vertex may dominate multiple copies of the
same vertex. To deal with this call a partition P = {P1 , P2 , . . . , Pα } valid if (a) there
exists a subset S ⊆ B ∪ W forming a system of distinct representatives; that is for
all 1 ≤ i ≤ α, there exists a distinct ui ∈ S such that Pi ⊆ N (ui ) and (b) each Pi
contains at most one copy of any vertex of B. The set S is a witness set. So to find
the desired threshold dominating set in B ∪ W we proceed as follows.
Algorithmica (2008) 52: 203–225 213
Ii = {u ∈ (B ∪ W ) | Pi ⊆ NG (u)},
where NG (u) denotes the neighbors of u in G . Now we make the bipartite incidence
bipartite graph G∗ = (X ∪ Y, E ), where X
graph for the sets {I1 , . . . , Iα }, that is a
has a vertex xi for every set Ii and Y = αl=1 Il and there is an edge between (xi , u)
if u ∈ Ii . Now finding a valid system of distinct representatives reduces to finding
a maximum bipartite matching in G∗ saturating X, for which there is a classical
polynomial time algorithm of Edmonds [11].
The total number of partitions P considered for our case is upper bounded by
|
k−|V
rk 2 + i − 1
,
i−1
i=1
which is at most O((rk 2 )k+O(1) ). Since r ≤ log n and (log n)k ≤ n + (2k log k)k for
all n and k ≤ n, we have the desired result that T HRESHOLD D OMINATING S ET
problem is FPT for G5 graphs.
Observe that if the input graph G of the dominating set problem is a G5 graph
then the sets in its corresponding set cover instance satisfies a property that for any
pair of sets Su and Sv in S, |Su ∩ Sv | ≤ 2.
Proof If there is a set Si ∈ S such that |Si | > ck then Si must be in every k-sized
set cover. Otherwise, we need more than k sets to cover all the elements of U since
every other set can cover at most c elements of Si . So this gives us a following simple
reduction rule:
Rule 1 Given a set cover instance, (U, S, k), if there exists Si ∈ S such that |Si | > ck
then obtain a new reduced instance of set cover as following:
– U ← U − Si .
– S ← {S − Si | S ∈ S}. If there are multiple copies of some set, then remove all but
one copy of the same.
– k ← k − 1.
If k becomes 0 and U is non-empty then this is a no instance for the problem and
we stop. We apply the Rule 1 until all the sets in S is of size at most ck , where k ≤ k.
As k sets of size ck can only cover at most ck 2 ≤ ck 2 elements of U , if |U| > ck 2
then it is a no instance of the problem. The reduction rule also ensures that every set
in S is distinct. But then the number of distinct sets of size at most ck in S can be at
most the number of distinct subsets of U . This gives us that if |U| ≥ 2ck then
ck
ck
|U| |U| cek 2
|S| = ≤ ck ≤ ck = ceck k ck+1
i ck ck
i=1
Now it suffices to try each sub-collection S ⊆ S of size k and return YES if any of
them covers the set U and NO otherwise. This has following time complexity:
ck ck+1 k
ceck k ck+1 ce k e 2
≤ = (ce)k (ek)ck .
k k
Since c is a fixed constant, it follows that the running time results in a fixed parameter
tractable algorithm.
edges or to dominate at least t vertices with at most k vertices. More precisely they
are defined as follows:
t -V ERTEX C OVER : Given a graph G = (V , E) and positive integers k and t,
does there exist a set of at most k vertices C ⊆ V such that |{e = (u, v) ∈
E | C ∩ {u, v} = ∅}| ≥ t.
t -D OMINATING S ET: Given a graph G = (V , E) and positive integers k and t,
does there exist a set of at most k vertices D ⊆ V such that |N[D]| ≥ t.
The t -V ERTEX C OVER and t -D OMINATING S ET problems have been parame-
terized in two ways. They are either parameterized by k or by t and k. Both these
problems are FPT when parameterized by both k and t [5] and are hard for different
level of W -hierarchy when parameterized by k alone. t -V ERTEX C OVER is W [1]-
complete [16] and t -D OMINATING S ET is W [2]-complete when parameterized by k
alone.
Here, we first give a simple algorithm for the t -V ERTEX C OVER when parameter-
ized by both t and k and then show that this problem is FPT even when parameterized
by k alone in G5 graphs. We then extend this result to the t -D OMINATING S ET prob-
lem for G5 graphs when parameterized by k alone.
Our algorithms for the t -V ERTEX C OVER depend on the following lemma.
Proof Since G is a yes instance of the problem there exists a t-vertex cover C of
size at most k and covering at least t edges. If N[v] ∩ C = ∅ then choose C =
C − {u} + {v} where u is any vertex in C. Since v is a vertex of highest degree and
none of its neighbors is in C, C also covers at least t edges and is of size at most k.
Suppose that the given graph has maximum degree bounded by d. Since there
exists a t-vertex cover containing either a maximum degree vertex u or one of the
neighbors of u, we can branch on u and on each of the (at most) d neighbors of u
giving rise to a (d + 1)-way branching. The following theorem is immediate from
this.
Theorem 9 Let G be a graph with maximum degree d. Then t-V ERTEX C OVER can
be solved in O((d + 1)k n) time.
Suppose, instead of trying to cover at least t edges, we want to cover all but t
edges (where t is a parameter) using at most k vertices. That is, we want an induced
216 Algorithmica (2008) 52: 203–225
Theorem 10 (m − t)-V ERTEX C OVER can be solved in O(3t+k (n + m)) time. Thus
(m − t)-V ERTEX C OVER is fixed parameter tractable if parameterized by t and k.
Proof We give a reduction from W [1]-complete t-V ERTEX C OVER problem where
we need at most k vertices to cover at least t edges. Given (G = (V , E), k, t1 ), an
instance of t-V ERTEX C OVER problem, we map it to (G = (V , E), k, t2 ) where t2 =
|E| − t1 as an instance of (m − t)-V ERTEX C OVER problem. Now it is easy to see
that (G = (V , E), k, t1 ) is a yes instance of t-V ERTEX C OVER problem if and only if
(G = (V , E), k, t2 ) is a yes instance of (m − t)-V ERTEX C OVER problem.
Now we show that the t-V ERTEX C OVER problem is FPT for G5 graphs when
parameterized by k alone. We will see that this result also applies to (m − t)-V ERTEX
C OVER problem when parameterized by k alone.
Theorem 12 t-V ERTEX C OVER is fixed parameter tractable for G5 graphs when
parameterized by k alone. The algorithm runs in O((k + 1)k (n + m)) time.
Proof Without loss of generality we can assume that the maximum degree of this
graph is not bounded by a function of k, otherwise the problem is fixed parameter
tractable by Theorem 9. Let v0 be a vertex of highest degree and let v1 , v2 , . . . , vr be
its neighbors. Further assume that
Let A = {v0 , v1 , . . . , vk }. We show that if there exists any t-vertex cover then there is
one which contains either v0 or one of its k highest degree neighbors. More precisely,
we prove the following claim:
The claim says that if there exists any t-vertex cover then there exists a t-vertex
cover C containing at least one vertex of A. We then branch on the vertices of the
set A, and look for a solution of size k − 1, covering t-deg(vi ) edges in G − {vi },
where 0 ≤ i ≤ k and recursively use this claim on the respective subgraphs. Hence
the claim proves that t-vertex cover is fixed parameter tractable.
Now we are left with proving the claim. We show the claim by contradiction.
Assume to the contrary that no t-vertex cover intersects A. By Lemma 4 we know
that there exists a t-vertex cover C containing one of v0 ’s neighbors. Let vl be
a neighbor of v0 in C. Because of our assumption l > k. Suppose for some vi ,
1 ≤ i ≤ k, N (vi ) ∩ C = ∅. Then we can obtain a t-vertex cover C = C − {vl } + {vi }
of size at most k and covering at least t edges as deg(vi ) ≥ deg(vl ). So we now as-
sume that for each vi , 1 ≤ i ≤ k, N (vi ) ∩ C = ∅. Let Bi = N (vi ) ∩ C. Observe that
for each i, Bi does not contain vl otherwise that will imply v0 , vi , vl is a triangle.
Suppose for some i = j , u ∈ Bi ∩ Bj then v0 , vi , u, vj is a cycle of length 4. Hence
Bi ∩ Bj = ∅ for all i, j such that i = j . So this implies that
k
|Bi | ≥ k.
i=1
So we have Bi = ∅, Bi ⊆ C − {vl } and their pairwise intersections are empty. But this
implies
k
|Bi | ≤ |C − {vl }| ≤ k − 1
i=1
which contradicts that ki=1 |Bi | ≥ k. This in turn proves the claim.
Since we branch on the vertices of A whose size is bounded by k + 1, we get an
algorithm of time complexity O((k + 1)k n).
Theorem 13 (m − t)-V ERTEX C OVER can be solved in O((k + 1)k (n + m)) time
for G5 graphs when parameterized by k only.
By arguments similar to those used in Theorem 12, we can show the following.
Theorem 14 t-D OMINATING S ET can be solved in O((k + 1)k nO(1) ) time for G5
graphs when parameterized by k only.
218 Algorithmica (2008) 52: 203–225
Proof Given any two integers p and q, there exists a number R(p, q) such that any
graph on at least R(p, q) vertices contains an independent set of size p or a clique
of size q. R(p, q), for various values of p and q are known as Ramsey Numbers.
It is well known that R(p, q) ≤ p+q−2 q−1 [18]. And if n > R(p, q) then either an
independent set of size p or a clique of size q can be found in O((p + q)n) time by
transforming the inductive arguments used in the proof of Theorem 27.3 in [18] for
the upper bound of R(p, q) to a constructive algorithm.
If k ≤ 2, then we can check in linear time whether the graph has an independent
set of size 2 or not. So let us assume that k ≥ 3. If the number of vertices n > k 2 ≥
R(k, 3) then we know that this graph has either an independent set of size k or a
clique of size 3. But since the input graph is triangle free, we know that it must have
an independent set of size k and can be found in O(kn) time. Otherwise we know
that n ≤ k 2 . In this case, we try all possible subsets of size at most k to see whether
the graph has an independent set of size k or not. If any of them does, then we answer
YES and answer NO otherwise. This will take O(k O(k) ) time. This completes the
proof.
Theorem 16 (Khot and Raman [19]) Let Π be a hereditary property that includes
all independent sets but not all cliques (or vice versa). Then the problem P (G, k, Π)
is W [1] hard.
Algorithmica (2008) 52: 203–225 219
The proof of the following theorem is exactly as in the proof of Theorem 15, by
considering the Ramsey numbers R(k, c).
Theorem 17 Let Π be a hereditary property that includes all independent sets. Then
the problem P (G, k, Π) restricted to Gc graphs for any fixed constant c ≥ 3 is fixed
parameter tractable and can be solved in O(kn + k O(k) nO(1) ) time.
Corollary 5 shows that ACYCLIC and P LANAR S UBGRAPH problems are fixed
parameter tractable for bipartite graphs. In fact we can easily obtain much improved
FPT algorithms for these problems for bipartite graphs. Observe that a bipartite graph
has an independent set (and hence planar or acyclic induced subgraph) on n/2 ver-
tices. So, if k ≤ n/2 then for both these problems the answer is YES and otherwise
k > n/2 or n < 2k and hence we get a kernel of size at most 2k for both the ACYCLIC
and P LANAR S UBGRAPH problems for bipartite graphs. Now we check all k sized
subsets of the vertex set to see
whether the subset induces an acyclic subgraph or
planar subgraph. Since nk ≤ 2k k ≤ 2 2k = 4k , we get an O(4k nO(1) ) time algorithm
Another problem which can be shown to be FPT for Gc graphs for any fixed
constant c ≥ 3 is the I RREDUNDANT S ET problem, which is known to be W [1]-
complete [9] in general graphs.
I RREDUNDANT S ET: Given a graph G = (V , E) and a positive integer k. Is
there a set V ⊆ V of cardinality at least k having the property that each vertex
u ∈ V has a private neighbor? A private neighbor of a vertex u ∈ V is a vertex
u ∈ N [u] (possibly u = u) with the property that for every vertex v ∈ V \ {u},
u ∈
/ N[v].
220 Algorithmica (2008) 52: 203–225
This follows from a simple observation that every independent set is also an irredun-
dant set. Then the following theorem can be proved on the lines of Theorem 15, by
considering the Ramsey Numbers R(k, c).
In contrast to the results presented in the previous sections, here we show a problem
to be W [1]-hard even in bipartite graphs with girth at least 6 (G6 graphs). Observe
that in graphs with large girth the C LIQUE problem is trivial. We look at D ENSE
S UBGRAPH problem [20] which is a generalization of the C LIQUE problem.
D ENSE S UBGRAPH: Given a graph G = (V , E) and positive integers k and l,
determine whether there exists a set of at most k vertices C ⊆ V such that G[C]
has at least l edges,
i.e. the induced subgraph on C has at least l edges. (Note
that l is at most k2 .)
It is easy to observe that D ENSE S UBGRAPH problem is W [1]-hard when parameter-
ized by k, by a simple reduction from C LIQUE. But we give a reduction from C LIQUE
to D ENSE S UBGRAPH problem parameterized by k which shows that the problem is
W [1]-hard even in bipartite graphs with girth at least 6.
Proof We give a reduction from C LIQUE. Let (G, k) be an instance of C LIQUE with
k ≥ 3. We make the graph G = (V , E) bipartite by subdividing every edge. Let G =
(V , E ) be the resulting subgraph. Here, V = V ∪ W where W = {wuv | (u, v) ∈ E}
and E , the consists of (u, wuv ) and (v, wuv ) for every wuv ∈ W . Take
set of edges,
k = k + k2 and l = 2 k2 .
Observe that G is a bipartite graph as every cycle is of even length and the girth
is at least 6 as the girth of G is at least 3. We claim that G has a clique of size k
if and only if G has a subgraph on k vertices with at least l edges. Also note that
every vertex in W has degree 2 as they represent edges in the original graph. Now
suppose G has a clique of size k on vertex set C = {v1 , v2 , . . . , vk }. Then C = C ∪
{wuv | u, v ∈ C} is a vertex
set of dense subgraph in G having k vertices and l edges
as G[C] has at least k2 edges.
Conversely, let C be a set of k vertices such that G [C ] has at least l edges. Let
O = V ∩ C . Clearly G [C ] is bipartite with O and N = C − O as the two parts of
the vertex set, and every
vertex in N has degree at most 2. Since the number of edges
in G [C ] = l = 2 k2 , and since every vertex in N has degree at most 2, |N | ≥ k2
and hence |O| ≤ k. Let t = |O|. We claim that t = k. Suppose not. Then t ≤ k − 1.
Also, since k ≥ 3, t ≥ 1. Let n1 and n2 be the degree 1 and degree 2 vertices in N
respectively. Since G has no multiple edges, no pair of vertices in N with degree 2
Algorithmica (2008) 52: 203–225 221
t
can be adjacent to the same pair of vertices in O and hence n2 ≤ 2 . Then the number
of edges in G[C ] is:
k
2 ≤ |E(G[C ])| = 2n2 + n1
2
= k − t + n2
k
=k+ − t + n2
2
k t t
≤k+ −t + since n2 ≤ .
2 2 2
If t = 1 then
1 k
k+ =k<1+ ,
2 2
a contradiction to inequality (1). So let 2 ≤ t ≤ k − 1. But then
t k−1 k k
k+ ≤k+ = +1< + t,
2 2 2 2
again a contradiction
to inequality (1). This implies that |O| = k. As a result of this,
|N| = k2 and every vertex in N has degree 2. Every vertex of degree 2 in N repre-
sents an edge in G[O]. This shows that the vertices of O form a clique in the original
graph.
7 Approximation of D OMINATING S ET
graphs to get a dominating set D for H . We obtain a dominating set D for G from
the dominating set D for H as in the proof of Theorem 1. Let OPTG denote the size
of an optimum dominating set for the graph G. Now note that
|D | < |D|
≤ α · OPTH
≤ α · (OPTH − 1) + α
≤ α · OPTG + α · OPTG (since OPTH − 1 = OPTG )
= (2α) · OPTG .
Furthermore the result of Feige [12] together with Theorem 2 imply that the ap-
proximability of D OMINATING S ET problem has the same threshold of (1 − o(1)) ln n
even for split graphs. The above discussion results in the following theorem.
Proposition 1 ([17, 21]) Let (U, S) be a set cover instance such that |U
| = n. Then
we can find a set cover S ⊆ S of size at most Hn · (OPT) where Hn = ni=1 1/i and
OPT is the size of the optimum solution of the set cover instance Hn ≤ ln n + 1.
Proposition 2 ([10]) Let (U, S) be a set cover instance such that |U | = n and the
size of each set Si ∈ S is bounded by q, that is |Si | ≤ q. Then
qwe can find a set cover
S ⊆ S of size at most (Hq − 1/2) · (OPT) where Hq = i=1 1/i and OPT is the
size of the optimum solution of the set cover instance.
Observe that the reduction rules (R1)–(R4) depend on k whereas here we have an
optimization problem. Hence apply reduction rules for all values for k between 1 and
n and if the reduced instance as viewed as the S ET C OVER problem instance satisfies
the hypothesis of Proposition 2 then we obtain a dominating set for G by applying
Proposition 2. Finally we return the dominating set of smallest size among the ones
obtained for different k. Our detailed algorithm is described below. We outline our
algorithm in terms of rwb-graphs described in Sect. 2.2.
Algorithmica (2008) 52: 203–225 223
Algo-Dom-SET(G = (V , E))
(Input: A G5 graph. Output: A dominating set of G.)
Step 1: Given an undirected graph G = (V , E). Make it a rwb-graph by coloring all
vertices of V black; that is R = ∅, W = ∅ and B = V . I = ∅.
Step 2: For (j = 1 to n) do as follows:
Step 2a: Apply reduction rules (R1)–(R4) on (G = (R ∪ W ∪ B, E), j ) until no
longer possible and obtain an instance (Gj = (R j ∪ W j ∪ B j , E j ), j − |R j |).
Step 2b: If (|W j | + |B j | ≤ 2j 3 ) and the maximum degree of Gj is at most j then
I = I ∪ {(Gj = (R j ∪ W j ∪ B j , E j ), j − |R j |)}.
(In this step we obtain a set of instances which could possibly lead to an optimum
dominating set. So we have
I = {(Gk = (R k ∪ W k ∪ B k , E k ), k − |R k |) | |W k | + |B k | ≤ 2k 3
and maximum degree of Gk is at most k}.)
Step 3: We obtain a set cover instance (Uk , Sk ) from the reduced graph Gk by taking
U = B k and having sets Su for u ∈ (W k ∪ B k ). Su = N (u) ∩ B k if u ∈ W k and
Su = N[u] ∩ B k if u ∈ B k . Obtain P, the set of instances for the set cover problem,
by changing every instance in I to the set cover instance. That is:
Step 4: Apply Proposition 2 to every instance of the set cover problem in P and
obtain the following set of solutions
Let V(Sk ) represent the set of vertices in Gk corresponding to the sets in the collec-
tion Sk . Obtain the following set
of possible dominating sets for G and return the one with the minimum size in
DOM as a dominating set for G.
Proof It is clear that the algorithm Algo-Dom-SET takes polynomial time. Propo-
sition 2 ensures that the algorithm returns a dominating set for G. Now we show that
the algorithm is a factor of Hp+1 − 1/2 approximation algorithm for the dominating
set problem for G5 graphs which will complete the proof of the theorem.
224 Algorithmica (2008) 52: 203–225
Let l be the smallest positive integer in Step 2 of the algorithm such that (Gl =
(R l ∪ W l ∪ B l , E l ), l − |R l |) ∈ I. The reduction rules ensures that (G = (R ∪ W ∪
B, E), k) is a no instance for 1 ≤ k ≤ l − 1 and hence we have p ≥ l.
Consider the instance (Gp = (R p ∪ W p ∪ B p , E p ), p − |R p |) ∈ I. Observe that
the instance Gp has an optimum dominating set of size p − |R p | and the maximum
degree of the graph is bounded by p. When we apply the factor (Hq − 1/2) set cover
approximation algorithm in Step 4 on the instance (Up , Sp ), where each set in Sp
is bounded by p + 1, we obtain Sp ⊆ Sp of size at most |Sp | ≤ (Hp+1 − 1/2) ×
(p − |R p |). Now the size of the dominating set Rp ∪ V(Sp ) corresponding to this
instance for G is :
Since we return a dominating set of minimum size among the sets in DOM as a
dominating set for G it is clear that its size is also bounded by (Hp+1 − 1/2)p. This
completes the proof.
In this paper we showed that if the input graphs do not possess short cycles then the
neighborhood problems such as D OMINATING S ET, I NDEPENDENT S ET and several
of their variants are fixed parameter tractable. We have also shown that the restriction
on girth is optimal if we do not put further restriction on the graph classes. This is the
first time, to our knowledge, that the parameterized complexity of graph problems are
classified by girth.
Most of the algorithms given here are just parameterized complexity classification
algorithms. We believe that more efficient FPT algorithms should be possible. Ob-
taining a O(ck nO(1) ), c a constant, algorithm for all these problems remains an open
problem.
We also gave an improved approximation algorithm for D OMINATING S ET prob-
lem in graphs with girth at least 5. It would be interesting to explore the possibility
of improved approximation algorithms for other problems on graphs with no small
cycles.
Furthermore, it is worth exploring excluding structures as subgraphs other than
cycles to see whether some W -hard problems become FPT.
Acknowledgements We thank the referees for several useful comments. We would also like to thank
T. Erlebach and R.E. Tarjan for suggesting an investigation of approximation algorithms for the D OMI -
NATING S ET problem for graphs with no small cycles.
Algorithmica (2008) 52: 203–225 225
References
1. Alber, J., Fellows, M.R., Niedermeier, R.: Polynomial time data reduction for dominating set. J. ACM
51(3), 363–384 (2004)
2. Alber, J., Fan, H., Fellows, M.R., Fernau, H., Niedermeier, R., Rosamond, F., Stege, U.: A refined
search tree technique for dominating set on planar graphs. J. Comput. Syst. Sci. 71, 385–405 (2005)
3. Alekseev, V.E.: On easy and hard hereditary classes of graphs with respect to the independent set
problem. Discrete Appl. Math. 132(1–3), 17–26 (2003)
4. Alekseev, V.E., Korobitsyn, D.V., Lozin, V.V.: Boundary classes of graphs for the dominating set
problem. Discrete Math. 285(1–3), 1–6 (2004)
5. Bläser, M.: Computing small partial coverings. Inf. Process. Lett. 85(6), 327–331 (2003)
6. Downey, R.G., Fellows, M.R.: Threshold dominating sets and an improved characterization of W [2].
Theor. Comput. Sci. 209(1–2), 123–140 (1998)
7. Downey, R.G., Fellows, M.R.: Parameterized Complexity. Springer, Berlin (1999)
8. Downey, R.G., Fellows, M.R., Vardy, A., Whittle, G.: The parametrized complexity of some funda-
mental problems in coding theory. SIAM J. Comput. 29(2), 545–570 (1999)
9. Downey, R.G., Fellows, M.R., Raman, V.: The complexity of irredundant sets parameterized by size.
Discrete Appl. Math. 100(3), 155–167 (2000)
10. Duh, R., Fürer, M.: Approximation of k-set cover by semi-local optimization. In: Proceedings of the
29th Annual ACM Symposium on Theory of Computing (STOC), pp. 256–264 (1997)
11. Edmonds, J.: Paths, trees and flowers. Can. J. Math. 17, 449–467 (1965)
12. Feige, U.: A threshold of ln n for approximating set cover. J. ACM 45(4), 634–652 (1998)
13. Fernau, H.: Parameterized algorithms: a graph-theoretic approach. Habilitationsschrift, Universität
Tübingen, Tübingen, Germany (2005)
14. Flum, J., Grohe, M.: Parameterized Complexity Theory. Springer, Berlin (2006)
15. Fomin, F.V., Gaspers, S., Pyatkin, A.V.: Finding a minimum feedback vertex set in time O(1.7548n ).
In: Proceedings of the 2nd International Workshop on Parameterized and Exact Computation (IW-
PEC). Lecture Notes in Computer Science, vol. 4169, pp. 184–191. Springer, Berlin (2006)
16. Guo, J., Niedermeier, R., Wernicke, S.: Parameterized complexity of generalized vertex cover prob-
lems. In: Proceeding of the 9th International Workshop Algorithms and Data Structures (WADS).
Lecture Notes in Computer Science, vol. 3608, pp. 36–48. Springer, Berlin (2005)
17. Johnson, D.S.: Approximation algorithms for combinatorial problems. J. Comput. Syst. Sci. 9(3),
256–278 (1974)
18. Jukna, S.: Extremal Combinatorics. Springer, Berlin (2001)
19. Khot, S., Raman, V.: Parameterized complexity of finding subgraphs with hereditary properties. Theor.
Comput. Sci. 289(2), 997–1008 (2002)
20. Kortsarz, G., Peleg, D.: On choosing a dense subgraph. In: Proceeding of the 34th Annual Symposium
on Foundations of Computer Science (FOCS), pp. 692–701 (1993)
21. Lovàsz, L.: On the ratio of optimal fractional and integral covers. Discrete Math. 13, 383–390 (1975)
22. Niedermeier, R.: Invitation to Fixed-Parameter Algorithms. Oxford Lecture Series in Mathematics
and Its Applications. Oxford University Press, London (2006)
23. Raman, V., Saurabh, S.: Triangles, 4-cycles and parameterized (in-)tractability. In: Proceeding of the
10th Scandinavian Workshop on Algorithm Theory (SWAT). Lecture Notes in Computer Science, vol.
4059, pp. 304–315. Springer, Berlin (2006)
24. Vazirani, V.V.: Approximation Algorithms. Springer, Berlin (2001)