− 1/e)–Approximation, Fixed Parameter Tractability and a
Subexponential Algorithm
Leizhen Cai
1, Elad Verbin
2, and Lin Yang
11
Department of Computer Science and Engineering, The Chinese University of Hong Kong, Shatin, Hong Kong SAR, China
{lcai,lyang}@cse.cuhk.edu.hk
2
The Institute For Theoretical Computer Science, Tsinghua University, Beijing, China
[email protected]
Abstract. The firefighter problem is defined as follows. Initially, a fire breaks out at a vertex r of a graph G. In each subsequent time unit, a firefighter chooses a vertex not yet on fire and protects it, and the fire spreads to all unprotected neighbors of the vertices on fire. The objective is to choose a sequence of vertices for the firefighter to protect so as to save the maximum number of vertices. The firefighter problem can be used to model the spread of fire, diseases, computer viruses and suchlike in a macro-control level.
In this paper, we study algorithmic aspects of the firefighter problem on trees, which is NP-hard even for trees of maximum degree 3. We present a (1 − 1/e)-approximation algorithm based on LP relaxation and randomized rounding, and give several FPT algorithms using a random separation technique of Cai, Chan and Chan. Furthermore, we obtain an 2
O(√n log n)-time subexponential algorithm.
1 Introduction
The Firefighter problem is a one-person’s game on a graph G defined as follows.
At time t = 0, a fire breaks out at a vertex r of G. For each time step t ≥ 1, a firefighter protects one vertex not yet on fire (the vertex remains protected thereafter), and then the fire spreads from burning vertices (i.e., vertices on fire) to all unprotected neighbors of these vertices. The process ends when the fire can no longer spread, and then all vertices that are not burning are considered saved.
The objective is to choose a sequence of vertices for the firefighter to protect so as to save the maximum number of vertices in the graph. The Firefighter problem was introduced by Hartnell [Har95] in 1995 and can be used to model the spread of fire, diseases, computer viruses and suchlike in a macro-control level.
The Firefighter problem is NP-hard even for trees of maximum degree 3 as shown by Finbow et al. [FKMR07]. On the other hand, Hartnell and Li [HL00]
Partially supported by Earmarked Research Grant 410206 of the Research Grants Council of Hong Kong SAR, China.
S.-H. Hong, H. Nagamochi, and T. Fukunaga (Eds.): ISAAC 2008, LNCS 5369, pp. 258–269, 2008.
Springer-Verlag Berlin Heidelberg 2008
chave proved that a simple greedy method for trees is a 0.5-approximation algorithm, and MacGillivray and Wang [MW03] have solved the problem in polynomial time for some special trees. Various aspects of the problem have been considered by Develin and Hartke [DH07], Fogarty [Fog03], Wang and Moeller [WM02], and Cai and Wang [CW07], among others. We refer the reader to a recent survey of Finbow and MacGillivray [FM07] for more information on the Firefighter problem.
In this paper, we study algorithmic aspects of the Firefighter problem on trees.
Our main results are:
1. A (1 − 1/e)-approximation algorithm (Section 3) based on a LP-relaxation and randomized rounding. We also prove that 1 − 1/e is the best approxi- mation factor one can get using any LP-respecting rounding technique with the same LP (Section 3.1).
2. Several FPT algorithms and polynomial-size kernels (Section 4 and also a summary in Table 1) when we use several different choices for the parame- ter k: the number of saved vertices, the number of saved leaves, and the number of protected vertices. Our FPT algorithms are based on the random separation method of Cai, Chan and Chan [CCC06].
3. A subexponential algorithm (Section 5) that runs in time 2 O( √ n log n) . We note that an 2 O(n
0.33)-time algorithm would falsify a conjecture that there is no subexponential algorithm for SAT (see discussions in Section 5).
Table 1. Summary of FPT algorithms. The “randomized complexity” column indi- cates expected running time of algorithms with one-sided error, and the “deterministic complexity” column gives the worst-case running time of deterministic algorithms.
problems randomized deterministic kernel size
Saving k Vertices O(4
k+ n) O(n) + 2
O(k)O(k
2)
Saving All But k Vertices O(4
kn) 2
O(k)n log n open Saving k Leaves O(n) + 2
O(k)O(n) + 2
O(k)O(k
2) Saving All But k Leaves none unless N P ⊆ RP NP-complete for k = 0 no kernel Maximum k-Vertex Protection k
O(k)n k
O(k)n log n open
2 Definitions and Notation
We first define some terms. Let T be a rooted tree with root r which is the origin of the fire. A vertex is protected once it is protected by the firefighter, and saved if it is not burnt at the end of the game. A strategy for the Firefighter problem is a sequence v
1, v
2, . . . , v t of protected vertices of T such that vertex v i , 1 ≤ i ≤ t, is protected at time i and the fire can no longer spread to unprotected vertices at time t.
The following is the decision version of the problem we consider in the paper.
Firefighter on Trees
Instance A rooted tree T with root r and a positive integer k.
Question Is there a strategy for the firefighter to save at least k vertices
when a fire breaks out at the root r?
Without ambiguity, we abbreviate “the Firefighter problem on trees” as “the Firefighter problem” in the rest of the paper.
We denote the subtree of T rooted at vertex v by T (v), and assign the number of vertices in T (v) as the weight w v of v. For a strategy S, the value of S, denoted by S, equals the number of vertices saved by S.
Denote by L i the set of vertices of depth i (L
0contains only the root), and we refer to each L i as a level of T . Let d v denote the depth of v, and h denote the height of T , i.e., the depth of the deepest leaf. We write u v if u is an ancestor of v.
An instance of a parameterized problem consists of a pair (I, k) with I being the input and k the parameter, and a parameterized problem is fixed-parameter tractable (FPT in short) if it admits an FPT algorithm, i.e., an algorithm that runs in f (k) |I| O(1) time for some computable function f independent of the input size |I|. A kernelization for a parameterized problem is a polynomial-time reduction that maps an instance (I, k) onto (I , k ) such that (1) |I | ≤ g(k) for some computable function g, (2) k ≤ k, and (3) (I, k) is a “Yes”-instance iff (I , k ) is a “Yes”-instance. The pair (I , k ) is called a kernel of (I, k). The kernel is polynomial-size if g(k) = k O(1) . The existence of a kernel implies the existence of an FPT. The existence of an FPT implies the existence of a kernel, but not necessarily of a polynomial-size kernel.
3 A (1 − 1/e)–Approximation Algorithm
In this section we present a (1 −1/e)-approximation algorithm for the Firefighter problem on trees, which improves the 1/2-approximation of Hartnell and Li [HL00] (note (1 − 1/e) ≈ 0.6321). Our algorithm, proposed by B. Alspach (see [FM07]), uses randomized rounding of an LP relaxation of a 0-1 integer program formulated by MacGillivray and Wang [MW03]. It is asked in [FM07] to inves- tigate the performance of this algorithm, and in this section we determine the approximation ratio of the algorithm.
It is easy to see that an optimal strategy for a tree protects a vertex at level i at time i and has no need to protect descendants of a protected vertex. This observation translates into the following 0-1 integer program of MacGillivray and Wang [MW03] for a tree T = (V, E), where for vertex v, x v is a boolean decision variable such that x v = 1 iff v is protected, and w v is the number of descendants of v.
maximize
v ∈V
w v x v
subject to x r = 0
v ∈L
ix v ≤ 1 for every level L i with i ≥ 1
v u
x v ≤ 1 for every leaf u of T x v ∈ {0, 1} for every vertex v of T
(1)
By relaxing the constraint x v ∈ {0, 1} in the above integer program to 0 ≤ x v ≤ 1, we get a linear program, whose optimal solution will be denoted by OP T LP . The optimal solution to the LP can be interpreted as an optimal
“fractional” firefighting strategy
1.
Alspach’s rounding method uses the fact that in OP T LP , the values of x v in each level of the tree sum up to at most 1, and thus they can be treated as a probability distribution. The rounding scheme is to pick the vertex to protect at each level according to this distribution. It might be the case that the fractional values in a level sum up to less than 1. In this case, with the remaining probability we choose to protect no vertex at the level (this makes no difference in the analysis). Also, it might be the case that the rounding procedure chooses to protect both a vertex v and its ancestor u. In this case, we choose to protect u rather than v, and do not protect any vertex in v’s level. We call this situation an annihilation.
We note that the loss in rounding stems exactly from annihilations. If an- nihilations never occur, the expected value of the rounded strategy is at least
OP T LP and thus the approximation ratio would be 1. On the other hand, if annihilations occur, consider a vertex v which is fully saved by the fractional strategy and consider the path of length d v from the root r to v. In the worst case, the fractional strategy assigns a 1/d v -fraction of a firefighter to each vertex in this path. In this case, the probability that v is saved by the rounded strategy is equal to
1 − (1 − 1/d v ) d
v≥ 1 − 1/e .
To turn this intuition into a full analysis, we just need to show that the above case is indeed the worst case, and that a similar behavior occurs when v is not fully saved by the fractional strategy. We do this in the following lemma.
Lemma 1. Given any fractional strategy S F , let S I be the integer strategy pro- duced by applying the randomized rounding method to S F . Then,
E [ S I ] ≥
1 − 1
e
· S F .
Proof. Denote the value of the fractional strategy at v by ˜ x v and the value of the rounded strategy at v by x v . Thus, x v is an indicator random variable for whether v is protected by S I . Similarly, for each v, define ˜ y v =
u v x ˜ v to be the fraction of v that is saved by S F , and y v =
u v x v to indicate whether v is saved by S I .
1