New Approximation Algorithms for The Vertex Cover Problem and

New Approximation Algorithms for
The Vertex Cover Problem and
Variants
François Delbot Christian Laforest
Raksmey Phan
1
2
Research Report LIMOS/RR-13-02
4 avril 2013
1. Université Paris Ouest Nanterre / LIP6, CNRS UMR 7606.
2. Université Blaise Pascal / LIMOS, CNRS UMR 6158.
Abstract
The vertex cover is a classical NP-complete problem that has received great
attention these last decades. A conjecture states that there is no c-approximation
polynomial algorithm for it with
c
a
constant
strictly less than
2.
In this pa-
per we propose a new algorithm and we prove that (1) its approximation
ratio is strictly less than
tential to return
new
any
2
(but non constant) and that (2) it has the po-
optimal solution. We extend our algorithm to obtain a
2-approximation
algorithm for the
connected vertex cover
problem. In
the last part of the paper, we study and solve a new variant, namely the
vertex cover without conict. Given a graph G and a set of pairs C of vertices
representing conicts, the goals are to know whether there is a vertex cover
of
G containing no conicts of C
of minimum size. We reduce to
and if the answer is positive to construct one
2-SAT
and we show that the rst question
can be answered with a polynomial time algorithm; The second problem is
NP-complete but can be
2-approximated.
Keywords: vertex cover, approximation, lower bound, conicts, connected
Résumé
G = (V, E) ; une solution optimale au problème
∗
du vertex cover est un sous-ensemble V C de sommets de V de taille minimum tel que chaque arête de G ait au moins une extrémité dans V C ∗ . Dans
Soit un graphe non orienté
ce résumé, nous présentons un nouvel algorithme d'approximation pour ce
partitions en cliques. Nous montrons analytiquement
en pire cas strictement inférieur à 2 et
potentiellement capable de retourner n'importe quel vertex cover
problème utilisant des
qu'il a un rapport d'approximation
qu'il est
optimal. Nous étendons notre travail et obtenons un nouvel algorithme pour
le problème du connected vertex cover de rapport d'approximation 2. Enn
nous résolvons une nouvelle variante du problème du vertex cover appelée
vertex cover without conict.
2-SAT
Nous réduisons ce problème au problème du
et nous montrons que le problème de décision peut être résolu en
temps polynomial ; et le problème d'optimisation peut être approché avec un
rapport de
2.
Mots clés : vertex cover, approximation, borne inférieure, conits, connected
Acknowledgement / Remerciements
Research supported by the French Agency for Research under the DEFIS program
TODO, ANR-09-EMER-010.
1
1 Introduction
G = (V, E) be any undirected non weighted graph where V is the set
of vertices and E is the set of edges. A vertex cover V C is a subset of the
vertices (V C ⊆ V ) such that each edge uv has at least one extremity in V C
(u ∈ V C or v ∈ V C or both). The associated optimization problem (i.e. the
Let
vertex cover problem) is to construct a vertex cover of minimum size. This is
a classical optimization problem and many works have been devoted to this
problem or to its variations.
The vertex cover problem is known to be Fixed Parameter Tractable
(FPT), which means that it can be solved exactly in a time which is exponential, not in the size of the instance but in a variable
k,
(often) the
size of the optimal cover. This parametric complexity generated much interest (see [DF95]) and several exact algorithms have been proposed (see
+
[CDRC 03, CKX10]). These exact algorithms are quite ecient as for many
k
applications the parameter k is small and the best one runs in O(1.2738 +
kn) [CKX10], with n the number of vertices of the graph. However, these alk is too large and
gorithms are not used in practice as soon as the parameter
we should therefore use approximation algorithms. The vertex cover problem is shown to be not approximable within a factor of
1.166
[Hås97]. Some
very simple approximation algorithms give a tight approximation ratio of
2
[Vaz01] p.3 and [Sav82]. One of them, discovered independently by Gavril
and Yannakakis (see [PS82] p.432) which considers the
maximal matching
is
certainly the most famous and studied. Despite a lot of works, no polynomial
algorithm whose approximation ratio is bounded by a constant less than
has been found and it is conjectured that there is no smaller
unless
constant
2
ratio
P = NP
[KR08]. Bar-Yehuda and Even [BYE85] proposed algorithms
log log n
and Karakostas [Kar09] reduced
with an approximation ratio of 2 −
2 log n
1
√
this ratio to 2 − Θ(
). More recently [ACL11, ACL12, DL10] describe exlog n
perimental comparisons and give analytical results on the treatment of huge
graphs.
Notations and denitions.
size of an optimal vertex cover of
Given a graph
G.
G
we will note
A vertex cover
VC
of
G
G.
OP T
is
the
minimal
If H ⊆ V ,
G induced by H in G, ie. the graph whose
set of vertices is H and edges are the ones of G linking two vertices of H :
{uv : uv ∈ E, u ∈ H and v ∈ H}. We say that H ⊆ V is a clique of G if
G[H] contains all possible edges between each pair of vertices of H in G. We
say that H ⊆ V is an independent (or stable) if G[H] contains no edges. We
call a clique partition of a graph G, a partition of the set V of n vertices into
k
disjoint subsets C = {C1 , . . . , Ck } (∪i=1 Ci = V and if i 6= j , Ci ∩ Cj = ∅)
(for inclusion) if any subset of VC is not a vertex cover of
we note
G[H]
the subgraph of
2
such that each subgraph
G[Ci ] induced by Ci in G is a clique (its number of
ni (1 ≤ ni ≤ |V |)). A clique that contains only
vertices will be denoted by
minimal
i 6= j the graph G[Ci ∪ Cj ] induced by the cliques Ci and Cj is not
one vertex is called a
trivial clique.
Results of this paper.
A clique partition is
if for all
a clique.
In Section 2, we present a new lower bound
based on minimal clique partitions and prove its eciency compared to the
classical lower bound based on matchings. In Section 3 we give an algorithm
that computes a vertex cover with an approximation ratio of
2.
In Section 4
we rene the solution and propose an algorithm with approximation ratio
strictly smaller than 2. We also show that it has the potential to return any
optimal solution. In Section 5 we extend our approach with clique partitions
to the connected vertex cover. In Section 6 we study and solve a new variant,
namely the Vertex Cover with no Conicts.
2 Lower Bound
We remind the classical and well-known lower bound involving
A matching of
G
matchings.
is a set of edges without common vertices. It is maximal
if it is not a subset of any other matching. In Lemma 2.1 we remind this
basic lower bound of
OP T
based on maximal matching. Lemma 2.2 proves
that clique partition method gives also a lower bound and Lemma 2.3 shows
that for a graph
G our best lower bound is better (i.e. greater) than the best
lower bound obtained by matching.
Lemma 2.1 Let G be any graph and M be any maximal matching of G. We
have: |M | ≤ OP T . Thus |M | is a lower bound of OP T , the size of an optimal
vertex cover of G.
Lemma 2.2 Let G = (V, E) be any graph and C1 , . . . , Ck (ni = |Ci |) be any
k
X
clique partition of G. Then:
(ni − 1) = n − k ≤ OP T .
i=1
Proof. Let V C ∗ be an optimal solution of vertex cover problem (|V C ∗ | =
OP T ). V C ∗ must contain at least ni − 1 vertices of Ci to be able to cover all
k
X
edges of any clique Ci . Thus:
(ni − 1) = n − k ≤ OP T .
i=1
Kn the best lower bound of Lemma 2.1
is bn/2c while the best lower bound of Lemma 2.2 is n − 1, that is OP T here.
We can note that for complete graph
Moreover, the following Lemma shows that the largest lower bound given by
3
matching is always less than or equal to the best lower bound given by our
clique partition technique.
Lemma 2.3 Let M be a matching of maximum size. Let n − k be the largest
lower bound given by a clique partition of G. Then: |M | ≤ n − k ≤ OP T .
Proof. As M is a particular
most 2) we get the result.
clique partition of
G
(with cliques of size at
Unfortunately, in particular graphs, this new lower bound does not always
match the optimal. It is easy to see that in the cycle with
but our best lower bound is
5 vertices, OP T = 3
2.
3 A New Approximation Algorithm: CP
In Section 2 we used clique partition to produce lower bounds. In this
section we use them to construct solutions. We describe our (very simple)
method
CP
and we analyze it. We express its approximation ratio as a for-
mula function of sizes of the cliques. We show that it is less than
2
2
and that
is tight. However, the analytic expression of this formula helps us to make
more accurate analysis for some partitions.
3.1
Algorithm
CP
G = (V, E) be any graph. Let C1 , . . . , Ck be any minimal clique
partition of G. We suppose that cliques are sorted such that all trivial cliques
are at the end. Let l ≤ k be the number of non-trivial cliques, we have |Ci | ≥ 2
(i ≤ l ) and |Cl+1 | = . . . = |Ck | = 1. Algorithm CP takes as input any graph G
l
[
and a minimal clique partition and returns: S =
Ci (union of the vertices
Let
i=1
of non-trivial cliques). In the following, we suppose that
one edge (otherwise:
G
contains at least
|S| = OP T = 0).
Theorem 3.1 S is a vertex cover of G and:
l
l
|S|
≤ Pl
+1=
+1≤2
OP T
n−k
i=1 (ni − 1)
The bound of 2 is tight.
4
Proof. S
is a vertex cover of
of the vertex in
C1 , . . . , C l
G.
Indeed, all edges that are incident to one
are covered. Other possible edges are between
trivial cliques. Suppose there are 2 trivial cliques such that their vertices are
uv ∈ E .
adjacent:
Thus
{u, v}
is a clique and this contradicts the fact that
the clique partition is minimal.
Now we prove the approximation ratio. With Lemma 2.2, we know that:
k
X
OP T ≥
l
k
l
X
X
X
(ni − 1) =
(ni − 1) +
(ni − 1) =
(ni − 1)
i=1
Note that
i=1
i=1
i=l+1
ni = 1 (i = l + 1, . . . , k ).
By construction:
|S| =
l
X
ni .
Thus:
i=1
l
X
l
X
ni
l+
(ni − 1)
l
|S|
i=1
i=1
≤ l
=
= l
+1≤2
l
OP T
X
X
X
(ni − 1)
(ni − 1)
(ni − 1)
i=1
i=1
We can also note that:
l
X
i=1
(ni − 1) =
k
X
i=1
for
(ni − 1) = n − k
(because
ni = 1
i=1
i > l).
4 vertices a, b, c, d in this order on
the cycle and the clique partition {{a, b}, {c, d}}. In this graph OP T = 2 but
CP returns the 4 vertices, leading to an approximation ratio of exactly 2. To nish, let us consider a cycle with
From the previous theorem we can show that if all non-trivial cliques
have at least a ≥ 3 vertices then the approximation ratio of our method is at
a
. More generally, for all r ∈ [1, 2] we have a relation linking r and
most
a−1
Pl
1
the average size of the non trivial cliques that we note n̄: n̄ =
i=1 ni . We
l
have:
Pl
i=1
Pl
i=1 (ni
3.2
ni
− 1)
≤r⇔
ln̄
r
≤ r ⇔ 0 ≤ r(ln̄ − l) − ln̄ ⇔
≤ n̄.
ln̄ − l
r−1
An Algorithm to Construct Any Minimal Clique
Partition:
CPGathering
CP
G and a minimal clique partition of
G. In this part we describe an algorithm that takes any graph G as input and
is able to construct any minimal clique partition of G (proved by Lemma 3.1).
Algorithm
takes as input a graph
5
Let
G = (V, E) be any graph. At the beginning, each vertex u is consid{u}. Then two vertices linked by an edge can be merged to
ered as a clique
get a new clique. We keep this idea over all the algorithm. That is, at each
step we can merge two cliques
Ci
Cj
and
in a new clique if
clique.
We give now more details on our algorithm called
u
associate at each vertex
randomly chose one
to
w
uv .
the trivial clique
{u}.
G[Ci ∪ Cj ]
CPGathering. We rstly
While there is an edge, we
w. The clique
u and v . Vertices u
We create a new vertex
is the union of cliques associated to
is a
associated
v are
w and
step, w is
and
deleted (and all their incident edges). We create new edges between
all vertices that were adjacent to both
u
and
v.
Thus at the next
only adjacent to vertices with which it is allowed to be merged. At the end
there is no remaining edge and the nal clique partition of
G
is composed of
the cliques associated to the remaining vertices. This algorithm is polynomial.
Lemma 3.1
return
any
returns always
minimal clique partition of G.
CPGathering
minimal
clique partition and can
Proof. At each step the vertex created is associated to a clique of the original
graph G. By construction each vertex is in exactly one clique: CPGathering
produces a clique partition of G. This partition is minimal; otherwise 2 cliques
could be merged and this means that there would remain an edge between
the
2
vertices associated to these
algorithm.
Now, let
process of
2
cliques. This is in contradiction with the
P = {C1 , . . . , Ck } be any
CPGathering
minimal partition of
ni − 1 merging steps). Then it jumps to edges of C2
C2 etc. up to Ck .
At this step we have proved that
S
G. As the merging
C1 rst (in
is random, it is possible for it to construct
CP
gives a
from a minimal clique partition (given by
and iteratively construct
2-approximation
CPGathering
solution
for example). In
Section 4 we present a new approximation algorithm that takes benet of
the current solution to improve the approximation ratio.
4 A Renement of
CP for the Vertex Cover
In this section we improve the solution given by
applying the
ListRight
CP
(see Section 3) by
algorithm [BDL09, DL08]. We show how the new
algorithm reduces the solution domain by excluding non-minimal solutions.
We also show that any optimal vertex cover can be constructed (Theorem 4.2)
and that the approximation ratio of our method is
6
strictly
smaller than
2.
F. Delbot and Ch. Laforest [DL08] have proposed in 2008
ListRight, a list
heuristic for the vertex cover problem. The algorithm is simple: For a given
graph
G
and any list of all its vertices, read this list, vertex by vertex, from
right to left; For each current read vertex
G)
u, if u has at least one neighbor (in
V C (initially empty)
at its right in the list, not in the current solution
then
u is added to V C
(in all other cases
u is not added). It is shown in [DL08]
V C is a minimal vertex cover of G.
(and not dicult to see) that at the end
However,
ListRight
does not have a constant approximation ratio.
Now we describe how to combine
4.1
CP
and
ListRight.
Vertex Cover by Clique Partition (VCCP)
Let G be any graph and C be any sorted minimal clique partition C =
{C1 , . . . , Cl , Cl+1 , . . . , Ck } (|Ci | ≥ 2, ∀i ≤ l and |Ci | = 1, l < i ≤ k ) of G. Let
l
[
S =
Ci be the solution returned by CP. We construct a list L of the n
i=1
vertices of
G
from
C:
At the right of
from the trivial cliques
Cl+1 , . . . , Ck ;
L
we put all the vertices, in any order,
At the left of this part we put all the
ListRight
other vertices in any order. Then we apply
on this list L. We note
0
S the new solution. As
and
are all polynomial then
is
CP
ListRight
VCCP
polynomial.
Lemma 4.1 S 0 is a minimal vertex cover and S 0 ⊆ S .
Proof. It is proved in [DL08] that ListRight
returns a minimal vertex cover,
for any list. By construction, all vertices from trivial cliques
at the right of list
L
Cl+1 , . . . , Ck
are
and they are independent thus they have no neighbor
0
at their right. Therefore
builds S by selecting only vertices from
l
[
S=
Ci and then S 0 ⊆ S .
ListRight
i=1
The next result shows that
less than
VCCP
has an approximation ratio
strictly
2.
Theorem 4.1 Let G = (V, E) be any graph, with at least one edge. Then:
|S 0 | < 2OP T .
Proof. G contains at least one edge, thus OP T ≥ 1 (otherwise OP T =
|S| = |S 0 | = 0). As S 0 is a subset of S , Theorem 3.1 shows that VCCP is a
2-approximation algorithm:
|S|
l
|S 0 |
≤
≤
+1≤2
OP T
OP T
n−k
7
With this inequality, we will show that the approximation ratio is strictly
2. Suppose there is a graph G with a clique partition {C1 , . . . , Cl ,
Cl+1 , . . . , Ck } such that |S 0 | = 2OP T . As we have |S| ≤ 2OP T and |S 0 | ≤ |S|
l
+ 1 = 2, thus l = n − k . We show now that the
then |S| = 2OP T and
n−k
non-trivial cliques have exactly 2 vertices.
Suppose there is at least one clique that initially has 3 vertices. If in
each non-trivial clique we remove one vertex then it remains 2 vertices in
this clique. Considering these non-trivial cliques we have removed l = n − k
vertices and it remains at least l + 1 vertices in these cliques. Also there are
k − l vertices in trivial cliques. Thus the number of vertices n is at least
n ≥ l + (l + 1) + (k − l) = l + k + 1. With the previous equality (l = n − k ) we
have n ≥ n − k + k + 1 = n + 1: absurd. Thus we have |C1 | = . . . = |Cl | = 2
l
[
and these vertices ll the solution: S =
Ci .
smaller than
i=1
I = Cl+1 ∪ . . . ∪ Ck the set composed of the union of the trivial
∗
∗
cliques then I = V − S . An optimal vertex cover V C (|V C | = OP T ) must
cover the l cliques/edges Ci (i ≤ l ). As we suppose |S| = 2OP T and as these
∗
edges are independent, each Ci (i ≤ l ) has exactly one vertex in V C . Thus
∗
∗
V C ⊆ S and a consequence is that V C ∩ I = ∅.
0
As |S | = |S| = 2OP T , all vertices in non-trivial cliques are selected by
ListRight. Let us consider a clique Ci (i ≤ l) of two vertices u and v (uv ∈ E ).
∗
Suppose u ∈ V C and v ∈
/ V C ∗ . Vertex v has no neighbor w in I (otherwise,
∗
∗
edge vw would not be covered by V C since V C ∩I = ∅). Then all neighbors
0
0
of v are in S and S − {v} is also a vertex cover. But it is in contradiction
0
with the fact that S is minimal (Lemma 4.1).
We note
Theorem 4.2 proves that
VCCP
is able to nd any optimal vertex cover.
Before we need intermediate results.
Lemma 4.2 Let G = (V, E) be any graph and V C ∗ be any optimal vertex
cover of G. Let V CS∗ ⊆ V C ∗ (and V Cd∗ = V C ∗ − V CS∗ ). V CS∗ is an optimal
vertex cover of G0 = G[V − V Cd∗ ].
Proof. I = V − V C ∗
8
G.
V Cd∗
from G
∗
we also remove edges adjacent to vertices of V Cd . As there is no edge between
0
∗
∗
vertices in I , all edges in G are covered by V CS and V CS is a vertex cover
0
of G .
0
∗
Now suppose there is a vertex cover A of G such that |A| < |V CS |. A
0
∗
∗
covers edges of G and V Cd covers the other edges of G; thus A ∪ V Cd is a
∗
∗
∗
∗
vertex cover of G but |A| + |V Cd | < |V CS | + |V Cd | = |V C |: Contradiction
∗
with the optimality of V C .
is an independent set of
If we remove
Lemma 4.3 Let G = (V, E) be any graph and V C ∗ be any optimal vertex
cover of G. There is a minimal clique partition of G such that every vertices
of V C ∗ belong to the non-trivial cliques.
Proof. Let P = {C1 , . . . , Cl , Cl+1 , . . . , Ck } be a minimal clique partition of
G[V C ∗ ], the graph induced by V C ∗ in G. We call B (Big) the subset of
vertices of non-trivial cliques Ci (i ≤ l ) and U (Unit) the subset of vertices
∗
of trivial cliques Ci (l + 1 ≤ i ≤ k ). Then B ∪ U = V C and there is no edge
between vertices in U (otherwise P would not be minimal).
0
Let G = G[V − B] be the graph induced by V − B in G. By Lemma 4.2,
U is an optimal vertex cover of G0 .
∗
We now dene I = V − V C , an independent set of G. U and I are two
0
∗
0
independent sets of G and I ∩ U = ∅ (U ⊆ V C ) then G is a bipartite graph
with I and U the two sets of the bipartition. König Theorem (see [PL86] p.4)
shows that in bipartite graphs, the size of an optimal vertex cover is equal
to the size of a maximum matching. Thus, there is a maximum matching
∗
that covers all vertices of U . Now each vertex in V C belongs to a non-trivial
clique: some of them belong to (big) cliques in
(cliques of
in
P
and others belong to edges
2 vertices) of a matching. If this whole clique partition is minimal
G
then we get the nal result. Otherwise it is easy to gather cliques to
∗
get a minimal partition in which each vertex of V C is still in a non-trivial
clique.
Lemma 4.4 Let G = (V, E) be any graph and P be any minimal clique
partition of G. Suppose that V C is a minimal vertex cover of G in which
each vertex belongs to a non-trivial clique of P . Then VCCP can return V C
with G and P as input.
Proof. I = V − V C
in trivial cliques of
cliques of
P
G. Because V C is minimal,
I . By hypothesis, all vertices
is an independent set of
each of its vertex has at least one neighbor in
P
are also in
are in
I
I
and potentially some vertices in non-trivial
them, we gather in any order all vertices in
And at the right of
By applying
L,
ListRight
G
I
that are not in trivial cliques;
we gather in any order the vertices of trivial cliques.
on such list no vertex in
one of them has a right-neighbor. Thus
input the graph
L as
V C ; At the right of
(at most one vertex by clique). We build a list
follows: At the left, we gather in any order all vertices of
and the partition
P.
VC
I
will be taken because no
will be returned if
VCCP
has as
Theorem 4.2 VCCP can return any optimal vertex cover for any graph if
the clique partition is constructed by CPGathering.
9
Proof.
V C∗
be any optimal vertex cover of G. Lemma 4.3 proves that
∗
there is a minimal clique partition of G such that all vertices of V C belong
∗
to its non-trivial cliques. As V C is also minimal, Lemma 4.4 shows that
∗
can return V C if it has as input this minimal clique partition. To
Let
VCCP
nish, Lemma 3.1 shows that
CPGathering
can return any minimal clique
partition.
4.2
Limitations of
VCCP
Now we propose a family of graphs such that the approximation ratio of
solutions given by
k
VCCP
tends to the worst value.
r, x be two
vertices of G. The graph is composed by k vertices named ai (i ≤ k ) and k
vertices named bi (i ≤ k ). Each ai is linked with r and each bi is linked with
x. In addition ∀i ≤ k , ai and bi are linked. An optimal vertex cover is composed of the k vertices ai plus x. Let us consider now the particular following
minimal clique partition: P = {C1 , . . . , Ck+2 } with Ci = {ai , bi } (1 ≤ i ≤ k ),
Ck+1 = {x} and Ck+2 = {r}. Consider the list L = a1 , b1 , a2 , b2 , . . . , x, r constructed from P . By applying ListRight, the solution S returned is composed
of all the vertices except r and x. Thus the size of the solution is 2k whereas
2k
tends to 2 when k tends
the optimal is k + 1 (each ai and x). The ratio
k+1
Let
be an integer, parameter of our family of graphs. Let
to innity.
5 A New 2-approximation Algorithm for the
Connected Vertex Cover Problem
CP and CPGathering (see SecConnected Vertex Cover. A vertex cover
In this section we adapt our algorithm
tion 3) to a classical variant: the
S
of
G
is
connected if the graph G[S] induced by the vertices of S is conoptimal connected vertex cover CV C ∗ of G is a connected vertex
nected. An
cover of minimum size. Note that
of an optimal vertex cover of
G).
OP T ≤ |CV C ∗ |
(where
OP T
is the size
The problem is shown to be NP-hard in
4 [GJ77] and cannot be approxi√
10 5 − 21 [FM06]. Savage [Sav82] proposed a
planar graphs with maximum degree tree
mate with a better ratio than
2-approximation
algorithms in general graphs for the vertex cover problem
(then also for the connected variation), based on a depth rst search (DFS)
of the graph and [EGM10] proved that it is polynomial in chordal graphs, it
has a PTAS in planar graphs and it is APX-hard in bipartite graphs.
10
We describe our new algorithm,
CCPGathering,
to construct a con-
G. We use as a subroutine a polynomial algorithm
that greedily builds a maximal clique C (C is maximal for inclusion) from a
given vertex u by initially putting u in C and, while it is possible, adding at
each step any vertex v neighbor of all the vertices of C .
nected clique partition of
We start with an initial empty clique partition. Firstly we select any
u and we greedily build a maximal clique containing u. All the vertices
of this rst clique are marked (or suppressed form G). Then we select any
non marked vertex u, neighbor of at least one vertex of the clique. As in
the rst step, we greedily build a maximal clique containing u, among non
marked vertices of G. This gives a second maximal clique of G. For the
vertex
general case, we suppose that we already built several cliques and that their
vertices are marked. While there is a non marked vertex, we select one, called
u, neighbor of at least one vertex of a clique and we greedily build a maximal
clique containing u, among non marked vertices of G. Vertices of the new
clique are marked. Let us call C this last clique. If C is trivial, i.e. contains
0
only u, then u is neighbor of no other trivial clique C = {v}, otherwise when
C 0 was build it would have been possible to greedily extend it (by using the
edge uv ). Hence, at the end, the vertices of trivial cliques induce a stable in
G. At the opposite, if C is not trivial then u is connected to at least one other
non trivial clique (otherwise u would be connected to only trivial cliques but,
in this case, one of it would have been extendable with u as neighbor). This
means that we can prove that at each step the graph induced by vertices of
non trivial cliques is connected.
At the end, any vertex of
G
is exactly in one clique. Let
S
be the union
of all the vertices of the non trivial cliques. As we proved that the graph
induced by vertices of trivial cliques is a stable, S is clearly a vertex cover of
G. As we also shown that the graph G[S] induced by S in G is connected,
S is then a connected vertex cover of G. Moreover, as the clique partition is
minimal by construction, by using Theorem 3.1, we get: |S| ≤ 2OP T and as
OP T ≤ |CV C ∗ | we get:
Theorem 5.1 Let S be the set constructed by the (polynomial) algorithm
described above. S is a connected vertex cover of G and: |S| ≤ 2|CV C ∗ |. The
bound of 2 is tight.
The tightness is shown with the same instance than in the proof of Theorem 3.1.
11
6 A Variant: Vertex Cover With No Conicts
This section is devoted to another variant of the vertex cover in which
any pair of vertices cannot simultaneously be in a solution. Let us dene the
G = (V, E) be any graph and C be a set of pairs of vertices of
G. Such a pair {u, v} ∈ C is called a conict and C is a set of conicts. Given
G and C , the goal is to construct a vertex cover S of G containing no conict
(for all u and v in S , {u, v} 6∈ C ); Such set S is a Vertex Cover with no
problem: let
VCwnC ). Note that a VCwnC does not always exist. An optimal
VCwnC S is a VCwnC of minimum size. Given G and C , constructing an
optimal VCwnC is an NP-hard problem since even in the particular case of
Conicts (
∗
an empty set
cover in
C
of conicts it is equivalent to construct an optimal vertex
G.
In the following we will represent our problems of
VCwnC
in 2-SAT. We
X = {x1 , . . . , xn } be a
F = C1 ∧ ... ∧ Cl a formula composed of
clauses Ci = yi,1 ∨ yi,2 for which ∀(i, j), yi,j is a literal on a variable xk i.e.
whether xk or ¬xk . A truth assignment τ : X → {0, 1} satises F if and
only if for each clause Ci , τ (yi,1 ) = 1 or τ (yi,2 ) = 1 is true (where, by natural
extension on τ , if yi,j = ¬xk , τ (yi,j ) = ¬τ (xk )). A solution of 2-SAT is a
∗
truth assignment FS that satises F . A minimum truth assignment FS is
an assignment satisfying F with a minimum number of variables assigned to
1 (minimum number of FS∗ (xi ) = 1). We note |FS | the number of boolean
variables such that FS (xi ) = 1.
rst remind the denition of 2-SAT problem. Let
nite set of boolean variables and
The
decisional
problem of 2-SAT (i.e. knowing whether there exists an as-
signment satisfying the formula and constructing one if it is the case) is polynomial. Melven Robert Krom [Kro67] has proposed a polynomial algorithm
by transitive closure to solve the problem. Aspvall, Plass and Tarjan [APT79]
improved the eciency of the approach in 1979. In 1992, Dan Guseld and
Leonard Pitt [GP92] proved that nding a minimum assignment is NP-hard.
2-approximation algorithm for this problem.
transformations between the problems. Let G = (V, E) be
In the same paper they present a
Now we make the
any graph and
xi
C
be a
set of conicts. Each vertex is associated to a boolean
xi will denote the variable and the associated vertex).
For each edge xi xj of G, we add the positive clause (xi ∨ xj ) in F . For each
conict {xi , xj } ∈ C , we add the negative clause (¬xi ∨ ¬xj ) in F .
By construction, F is a 2-SAT formula. Let FS be a truth assignment
of F and S be the set of vertices xi of G such that FS (xi ) = 1 (note that
|S| = |FS |). We prove now that S is a VCwnC of G if and only if FS satises
F.
Indeed, suppose FS satises F ; then positive clauses (xi ∨ xj ) are satised
variable
(to simplify
12
E
and consequently all edges of
(¬xi ∨ ¬xj )
are covered by
S.
Similarly, negative clauses
C there is at
most one of these two vertices in S . Thus S is a VCwnC of G. Conversely
if S is a VCwnC of G then all edges of E have at least one vertex in S and
then positive clauses (xi ∨ xj ) are satised. Moreover, as each conict of C
has at most one vertex in S then negative clauses (¬xi ∨ ¬xj ) are satised.
Hence truth assignment FS satises F .
are satised and consequently for each conict in
By the previous polynomial transformations and by using algorithms of
[Kro67] or [APT79], given
contains a
VCwnC
G
and
C
it is polynomial to determine whether
It is easy to prove that
S
is an
optimal VCwnC
is a minimum assignment, since by construction
ing an optimal
G
and in the positive case to construct one.
VCwnC
of G if and only
|S| = |FS |. Hence,
if
FS
nd-
is equivalent to construct a minimum truth assign-
ment. Using our previously described polynomial transformation and the
2-
approximation of [GP92] for the minimum assignment problem we naturally
get a
2-approximation
for our minimum
VCwnC
problem.
To nish we can mention that we have extended our results to the more
general weighted cases.
7 Conclusion
We proposed a new approximation algorithm for the classical vertex cover
problem. We proved that its approximation ratio is
and that it has the potential to return
any
strictly
smaller than
2
optimal solution. This tends to
show that it can be of practical interest.
We also modied our method to propose a new
2-approximation algorithm
for the connected vertex cover problem. This can be notice since there exists
very few approximation algorithms for this problem. A perspective is to get
(analytical and/or experimental) comparison results between our method and
the classical one based on DFS [Sav82].
In the last part we proposed and solved a new variant, namely the vertex
cover with no conict. We shown that any instance of this problem can be
transformed in an instance of a 2-SAT problem in polynomial time and that
known algorithms for 2-SAT can be used here.
References
[ACL11]
Eric Angel, Romain Campigotto, and Christian Laforest. Analysis and comparison of three algorithms for the vertex cover
13
problem on large graphs with low memory capacities.
mic Operations Research, 6(1):5667, 2011.
[ACL12]
Algorith-
Eric Angel, Romain Campigotto, and Christian Laforest.
Im-
plementation and comparison of heuristics for the vertex cover
problem on huge graphs. In SEA, volume 7276 of Lecture Notes
in Computer Science, pages 3950. Springer, 2012.
[APT79]
Bengt Aspvall, Michael F. Plass, and Robert Endre Tarjan. A
linear-time algorithm for testing the truth of certain quantied
boolean formulas.
[BDL09]
Inf. Process. Lett., 8(3):121123, 1979.
Etienne Birmelé, François Delbot, and Christian Laforest. Mean
analysis of an online algorithm for the vertex cover problem.
Information Processing Letters, 109(9):436439, 2009.
[BYE85]
R. Bar-Yehuda and S. Even. A local ratio theorem for approximating the weighted vertex cover problem.
Mathematics, 25, 1985.
Annals of Discrete
+
[CDRC 03] James Cheetham, Frank Dehne, Andrew Rau-Chaplin, Ulrike
Stege, and Peter J. Taillon. Solving large fpt problems on coarsegrained parallel machines.
Journal of Computer and System
Sciences, 67(4):691706, 2003.
[CKX10]
Jianer Chen, Iyad A. Kanj, and Ge Xia. Improved upper bounds
for vertex cover.
Theoretical Computer Science, 411(40-42):3736
3756, 2010.
[DF95]
Rod G. Downey and Michael R. Fellows.
Fixed-parameter
tractability and completeness II: On completeness for
Theoretical Computer Science, 141(12):109131, 1995.
[DL08]
W [1].
François Delbot and Christian Laforest. A better list heuristic
for vertex cover.
Information Processing Letters, 107(3-4):125 127, 2008.
[DL10]
François Delbot and Christian Laforest. Analytical and experimental comparison of six algorithms for the vertex cover problem.
ACM, Journal of Experimental Algorithmics,
15:1.4:1.1
1.4:1.27, November 2010.
[EGM10]
Bruno Escoer, Laurent Gourvès, and Jérôme Monnot. Complexity and approximation results for the connected vertex cover
problem in graphs and hypergraphs.
J. Discrete Algorithms,
8(1):3649, 2010.
[FM06]
Henning Fernau and David Manlove.
Vertex and edge cov-
ers with clustering properties: Complexity and algorithms.
ACiD, pages 6984, 2006.
14
In
[GJ77]
M. R. Garey and David S. Johnson. The rectilinear steiner tree
problem is np-complete.
SIAM Journal of Applied Mathematics,
32:826834, 1977.
[GP92]
Dan Guseld and Leonard Pitt. A bounded approximation for
the minimum cost 2-sat problem.
Algorithmica,
8(2):103117,
1992.
[Hås97]
[Kar09]
Johan Håstad.
Some optimal inapproximability results.
In
STOC, pages 110, 1997.
George Karakostas. A better approximation ratio for the vertex
cover problem.
ACM Transactions on Algorithms,
5:41:141:8,
November 2009.
[KR08]
Subhash Khot and Oded Regev. Vertex cover might be hard to
approximate to within
2 − . Journal of Computer and System
Sciences, 74(3):335349, 2008.
[Kro67]
M. R. Krom. The decision problem for a class of rst-order formulas in which all disjunctions are binary.
[PL86]
Mathematical Logic
Quarterly, 13(1-2):1520, 1967.
D. Plummer and L. Lovász. Matching Theory.
o
Number n 121
in Annals of discrete mathematics. Elsevier Science, 1986.
[PS82]
Christos H. Papadimitriou and Kenneth Steiglitz.
rial Optimization: Algorithms and Complexity.
Combinato-
Prentice-Hall,
1982.
[Sav82]
[Vaz01]
Carla Savage. Depth-rst search and the vertex cover problem.
Information Processing Letters, 14(5):233235, July 1982.
Vijay V. Vazirani. Approximation algorithms. Springer, 2001.
15