0% found this document useful (0 votes)
53 views4 pages

1.3 A Branching Algorithm For Independent Set: Aximum Ndependent ET

This document describes a branching algorithm for solving the maximum independent set problem on graphs. It works by recursively considering subproblems where each neighbor of the current vertex is either included or excluded from the independent set. This results in a search tree where each path from a leaf to the root corresponds to a maximal independent set. The running time of the algorithm is analyzed and shown to be O*(3n/3) due to the branching on vertices of minimum degree at each step.

Uploaded by

Tamim Hossain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views4 pages

1.3 A Branching Algorithm For Independent Set: Aximum Ndependent ET

This document describes a branching algorithm for solving the maximum independent set problem on graphs. It works by recursively considering subproblems where each neighbor of the current vertex is either included or excluded from the independent set. This results in a search tree where each path from a leaf to the root corresponds to a maximal independent set. The running time of the algorithm is analyzed and shown to be O*(3n/3) due to the branching on vertices of minimum degree at each step.

Uploaded by

Tamim Hossain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

1.

3 A Branching Algorithm for Independent Set 7

1.3 A Branching Algorithm for Independent Set

A fundamental and powerful technique to design fast exponential time algorithms


is Branch & Reduce. It actually comes with many different names: branching al-
gorithm, search tree algorithm, backtracking algorithm, Davis-Putnam type algo-
rithm etc. We shall introduce some of the underlying ideas of the Branch & Reduce
paradigm by means of a simple example.
Maximum Independent Set. In the M AXIMUM I NDEPENDENT S ET problem (MIS),
we are given an undirected graph G = (V, E). The task is to find an independent
set I ⊆ V , i.e. any pair of vertices of I is non-adjacent, of maximum cardinality. For
readers unfamiliar with terms from Graph Theory, we provide the most fundamental
graph notions in Appendix .
A trivial algorithm for this problem would be to try all possible vertex subsets
of G, and for each subset to check (which can be easily done in polynomial time),
whether this subset is an independent set. At the end this algorithm outputs the size
of the maximum independent set or a maximum independent set found. Since the
number of vertex subsets in a graph on n vertices is 2n , the naive approach here
requires time Ω (2n ).
Here we present a simple branching algorithm for MIS to introduce some of the
major ideas. The algorithm is based on the following observations. If a vertex v is
in an independent set I, then none of its neighbors can be in I. On the other hand,
if I is a maximum (and thus maximal) independent set, and thus if v is not in I then
at least one of its neighbors is in I. This is because otherwise I ∪ {v} would be an
independent set, which contradicts the maximality of I. Thus for every vertex v and
every maximal independent set I, there is a vertex y from the closed neighborhood
N[v] of v, which is the set consisting of v and vertices adjacent to v, such that y is
in I, and no other vertex from N[y] is in I. Therefore to solve the problem on G,
we solve problems on different reduced instances, and then pick up the best of the
obtained solutions. We will refer to this process as branching.
The algorithm in Fig. 1.2 exploits this idea. We pick a vertex of minimum degree
and for each vertex from its closed neighborhood we consider a subproblem, where
we assume that this vertex belongs to a maximum independent set.

Algorithm mis1(G).
Input: Graph G = (V, E).
Output: The maximum cardinality of an independent set of G.
if |V | = 0 then
return 0
choose a vertex v of minimum degree in G
return 1 + max{mis1(G \ N[y]) : y ∈ N[v]}

Fig. 1.2 Algorithm mis1 for M AXIMUM I NDEPENDENT S ET


8 1 Introduction

b e

a c d

G\N[a] G\N[b]

e
c d

G\N[c] G\N[d] G\N[e]

G\N[e]

Fig. 1.3 Example of a minimum degree branching algorithm. We branch on vertex a. Then in one
subproblem we branch on c, and in the other on e, etc.

The correctness of branching algorithms is usually easy to verify. The algorithm


consists of a single branching rule and its correctness follows from the discussions
above.
As an example, let us consider the performance of algorithm mis1 on the graph
G of Fig. 1.3. At the beginning the minimum vertex degree is 1, so we select one of
the vertices of degree 1, say a. We branch with 2 subproblems, the left branch corre-
sponding to G \ N[a] and the right branch to G \ N[b]. For the right branch there is a
unique choice and after branching on e we obtain an empty graph and do not branch
anymore. The value the algorithm outputs for this branch is 2 and this corresponds
to the maximal independent set {b, e}. For the left branch we pick a vertex of min-
imum degree (again 1), say c, and branch again with 2 subproblems. The maximal
independent sets found in the left branch are {e, c, a} and {d, a} and the algorithm
reports that the size of a maximum independent set is 3. Let us observe the interest-
ing fact that every maximal independent set can be constructed by following a path
from some leaf to the root of the search tree.
Analysing the worst case running time of a branching algorithm can be non-
trivial. The main idea is that such an algorithm is recursive and that each execution of
it can be seen as a search tree T , where a subproblem, here G′ = G\V ′ , is assigned to
a node of T . Furthermore when branching from a subproblem assigned to a node of
T then any subproblem obtained is assigned to a child of this node. Thus a solution
1.3 A Branching Algorithm for Independent Set 9

in a node can be obtained from its descendant branches, and this is why we use the
term branching for this type of algorithms and call the general approach Branch &
Reduce. The running time spent by the algorithm on computations corresponding
to each node is polynomial—we construct a new graph by removing some vertices,
and up to a polynomial multiplicative factor the running time of the algorithm is
upper bounded by the number of nodes in the search tree T . Thus to determine the
worst case running time of the algorithm, we have to determine the largest number
T (n) of nodes in a search tree obtained by any execution of the algorithm on an
input graph G having n vertices. To compute T (n) of a branching algorithm one
usually relies on the help of linear recurrences. We will discuss in more details how
to analyze the running time of such algorithms in Chap. 2.
Let us consider the branching algorithm mis1 for MIS of Fig. 1.2. Let G be
the input graph of a subproblem. Suppose the algorithm branches on a vertex v of
degree d(v) in G. Let v1 , v2 , . . . , vd(v) be the neighbors of v in G. Thus for solving
the subproblem G the algorithm recursively solves the subproblems G \ N[v], G \
N[v1 ], . . . , G \ N[vd(v) ] and we obtain the recurrence
d(v)
T (n) ≤ 1 + T (n − d(v) − 1) + ∑ T (n − d(vi ) − 1).
i=1

Since in step 3 the algorithm chooses a vertex v of minimum degree, we have that
for all i ∈ {1, 2, . . . , d(v)},

d(v) ≤ d(vi ),
n − d(vi ) − 1 ≤ n − d(v) − 1

and, by the monotonicity of T (n),

T (n − d(vi ) − 1) ≤ T (n − d(v) − 1).

We also assume that T (0) = 1. Consequently,

d(v)
T (n) ≤ 1 + T (n − d(v) − 1) + ∑ T (n − d(v) − 1)
i=1
≤ 1 + (d(v) + 1) · T (n − d(v) − 1).

By putting s = d(v) + 1, we obtain

T (n) ≤ 1 + s · T (n − s) ≤ 1 + s + s2 + · · · + sn/s
1 − sn/s+1
= = O∗ (sn/s ).
1−s

For s > 0, the function f (s) = s1/s has its maximum value for s = e and for integer
s the maximum value of f (s) = s1/s is when s = 3.
10 1 Introduction

1,25

1,0

0,75

0,5

0,25

0,0
0 2 4 6 8 10 12 14 16 18 20
x

Fig. 1.4 f (s) = s1/s

Thus we obtain

T (n) = O∗ (3n/3 ),
and hence the running time of the branching algorithm is O∗ (3n/3 ).
Branch & Reduce is one of the fundamental paradigms in the design and analy-
sis of exact exponential time algorithms. We provide a more detailed study of this
approach in Chaps 2 and 6.

Notes

As a mathematical problem, TSP was first formulated in 1930 but the history of
the problem dates back in the 1800s when Hamilton studied related problems. See
[115] for the history of the problem. The dynamic programming algorithm for TSP
is due to Bellman [16, 17] and to Held and Karp [111]. Surprisingly, for almost 50
years of developments in Algorithms, the running time O∗ (2n ) of an exact algo-
rithm for TSP has not been improved. Another interesting question is on the space
requirements of the algorithm. If the maximum distance between two cities is W ,
then by making use of inclusion-exclusion (we discuss this technique in Chap. 4), it
is possible to solve the problem in time O∗ (W 2n ) and space O∗ (W ) [127]. Recently,
Lokshtanov and Nederlof used the discrete Fourier transform to solve TSP in time
O∗ (W 2n ) and polynomial, i.e. nO(1) · (logW )O(1) space [154]. See also Chap. 10
for a O∗ (4n nO(log n) ) time and polynomial space algorithm.

You might also like