Slash and burn on graphs — Firefighting with general weights

Slash and burn on graphs — Firefighting with general weights

Discrete Applied Mathematics ( ) – Contents lists available at ScienceDirect Discrete Applied Mathematics journal homepage: www.elsevier.com/locat...

368KB Sizes 0 Downloads 76 Views

Discrete Applied Mathematics (

)



Contents lists available at ScienceDirect

Discrete Applied Mathematics journal homepage: www.elsevier.com/locate/dam

Slash and burn on graphs — Firefighting with general weights Vitor Costa a , Simone Dantas a , Mitre C. Dourado b , Lucia Penso c , Dieter Rautenbach c,∗ a

Instituto de Matemática e Estatística, Universidade Federal Fluminense, Niterói, RJ, Brazil

b

Instituto de Matemática, Universidade Federal do Rio de Janeiro, Rio de Janeiro, RJ, Brazil

c

Institute of Optimization and Operations Research, University of Ulm, Ulm, Germany

article

info

Article history: Received 10 September 2013 Received in revised form 15 September 2014 Accepted 24 November 2014 Available online xxxx Keywords: Firefighter game Surviving rate

abstract In Hartnell’s firefighter game a player tries to contain a fire breaking out at some vertex of a graph and spreading in rounds from burned vertices to their neighbors, by defending one vertex in each round, which will remain protected from the fire throughout the rest of the game. The objective of the player is to save as many vertices as possible from burning. Here we study a generalization for weighted graphs, where the weights can be positive as well as negative. The objective of the player is to maximize the total weight of the saved vertices of positive weight minus the total weight of the burned vertices of negative weight, that is, the player should save vertices of positive weight and let vertices of negative weight burn. We prove that this maximization problem is already hard for binary trees and describe two greedy approximation algorithms for trees. Furthermore, we discuss a weighted version of the surviving rate. © 2014 Elsevier B.V. All rights reserved.

1. Introduction At the 25th Manitoba Conference on Combinatorial Mathematics and Computing in Winnipeg 1995 Hartnell introduced the firefighter game modeling the containment of the spreading of an undesired property within a network. An initial configuration of the game consists of a pair (G, r ) where G is a finite, simple, and undirected graph and r is a burned vertex of G. The game proceeds in rounds. In each round, first at most one vertex of G that is not burned is defended and then all vertices of G that

• are neither burned nor defended and • have a burned neighbor are burned. Once a vertex is burned or defended, it remains so for the rest of the game. The game ends with the first round in which no further vertex is burned. All vertices of G that are not burned at the end of the game are saved. A strategy for the firefighter game is a sequence σ = (d1 , d2 , . . .) of vertices of G where di denotes the vertex defended in round i. If σ is a strategy for the game with initial configuration (G, r ), then let Saved(G,r ) (σ ) denote the set of vertices of G that are saved adopting strategy σ .



Corresponding author. E-mail addresses: [email protected] (V. Costa), [email protected] (S. Dantas), [email protected] (M.C. Dourado), [email protected] (L. Penso), [email protected] (D. Rautenbach). http://dx.doi.org/10.1016/j.dam.2014.11.019 0166-218X/© 2014 Elsevier B.V. All rights reserved.

2

V. Costa et al. / Discrete Applied Mathematics (

)



Here we consider the following maximization problem. Weighted Firefighter Instance: ((G, ω), r ) where G is a graph, ω : V (G) → R is a weight function on the vertex set of G, and r is a vertex of G. Task: Determine a strategy σ = (d1 , d2 , . . .) for the firefighter game with initial configuration (G, r ) that maximizes f((G,ω),r ) (σ ) defined as the total weight of the saved vertices with positive weight minus the total weight of the burned vertices with negative weight, that is,  f((G,ω),r ) (σ ) = max {0, ω(u)} − min {0, ω(u)} . u∈Saved(G,r ) (σ )

u∈V (G)\Saved(G,r ) (σ )

The restriction of Weighted Firefighter to instances ((G, ω), r ) with ω ≡ 1 is called Firefighter and the corresponding instances are simply denoted by (G, r ). Finbow et al. [7] showed that Firefighter is NP-hard even restricted to instances (T , r ) where T is a tree of maximum degree at most 3. For Firefighter on trees, Hartnell and Li [9] proved that a simple greedy strategy is a 21 -approximation algorithm and Cai et al. [3] described a polynomial (1 − 1/e)-approximation algorithm based on an integer linear program formulation by McGillivray and Wang [11]. Finbow et al. [7] also presented an interesting tractable case showing that an optimal strategy for Firefighter on an instance (G, r ) can be determined in polynomial time if G is a graph of maximum degree at most 3 and r is a vertex of degree at most 2. While Duffy [6] showed that this last result cannot be extended to Weighted Firefighter even for weight functions only using 0 and 1 as weights, we described an efficient approximation algorithm with additive approximation guarantee ωmax − ωmin for such degree-restricted instances with non-negative weights between ωmin and ωmax [5]. Allowing negative weights drastically changes the character of the game. Now the player should try to save vertices of positive weight, ignore vertices of zero weight, and let vertices of negative weight burn. In fact, the vertices of negative weight indicate some area to which one wants the fire to spread. Since it is not possible to control the fire completely with limited firefighting power, the objective function of Weighted Firefighter appears to be natural in this context. The setting is a little similar to the so-called slash and burn, the agricultural technique that consists in cutting and burning a selected part of a forest in order to create fields. For more background, we refer to [1,5,8]. Our contributions are two hardness results and two greedy approximation algorithms for trees. Furthermore, we discuss a weighted version of the so-called surviving rate. We prove that Weighted Firefighter is hard already for binary trees, which stands in contrast to the fact that unweighted Firefighter is easy for binary trees [7]. Furthermore, we show that Weighted Firefighter remains hard even if we allow arbitrarily many defended vertices per round. Our two greedy algorithms achieve approximation factors of 31 and 21 . 2. Two hardness results In our first hardness result we use a simple observation concerning Firefighter on a full and complete binary tree T with root r and p leaves. If σ is a strategy for Firefighter on the instance (T , r ) that does not defend a vertex in the first round and saves the maximum possible number of vertices subject to this condition, then σ defends exactly one vertex at distance i from r for i from 2 to log p. It follows that for i ∈ [log p], exactly 2i−1 + 1 vertices at distance i from r are burned at the end of the game. That is, 1+

log p  (2i−1 + 1) = p + log p i =1

vertices of T are burned. Theorem 2.1. For a given integer k and a given instance ((G, ω), r ) of Weighted Firefighter where G is a binary tree with root r and ω : V (G) → {−1, 1}, it is NP-complete to decide whether there is a strategy σ with f((G,ω),r ) (σ ) ≥ k. Proof. Note that a strategy σ can be efficiently encoded as the sequence of defended vertices and that each vertex is defended at most once by an optimal strategy. Since f((G,ω),r ) (σ ) can be efficiently determined, the stated decision problem is clearly in NP. In order to show NP-completeness, we rely on the hardness result by Finbow et al. [7] concerning unweighted Firefighter. Therefore, let k0 be an integer and let (T0 , r0 ) be an instance of Firefighter where T0 is a tree of maximum degree 3. We will construct an integer k and an instance ((T , ω), r ) of Weighted Firefighter where T is a binary tree with root r and ω : V (T ) → {−1, 1}, such that (i) n(T ) is polynomially bounded in n(T0 ) and (ii) there is a strategy σ0 for the instance (T0 , r0 ) which saves all but at most k0 vertices if and only if there is a strategy σ for the instance ((T , ω), r ) with f((T ,ω),r ) (σ ) ≥ k. If the degree of r0 in T0 is at most 2, then an optimal strategy can be found in polynomial time [7]. Hence we may assume that r0 has three neighbors in T0 , that is, T0 − r0 consists of three subtrees T1 , T2 , and T3 rooted in the three children r1 , r2 , and r3 of r0 in T0 , respectively. Clearly, we may assume that k0 < n0 . Let p be the smallest power of 2 with p ≥ n(T0 ) and 2(p − log p − 4) ≥ n(T0 ). Let T− arise from the full and complete binary tree with p leaves by attaching a path of order p − log p − 4 to each of p − 3 of these leaves and by attaching a path of order p − log p − 3 to each of the remaining three

V. Costa et al. / Discrete Applied Mathematics (

)



3

Fig. 1. The construction of T for p = 8.

leaves. Note that T− is a binary tree with p − 3 leaves ℓ1 , . . . , ℓp−3 at depth p − 4 and three leaves ℓp−2 , ℓp−1 , and ℓp at depth p − 3. Let T arise from T− by attaching a full and complete binary tree Tic with root ric and p leaves to the leaf ℓi for i ∈ [p − 3], by attaching T1 to ℓp−2 , by attaching T2 to ℓp−1 , and by attaching T3 to ℓp . See Fig. 1 for an illustration. Let k = n(T ) − k0 . Finally, let

ω(u) =



−1, 1,

u ∈ V (T− ) and u ∈ V (T ) \ V (T− ).

Note that n(T− ) = 2p − 1 + p(p − log p − 4) + 3 and that n(T ) = n(T− ) + (p − 3)(2p − 1) + n(T0 ), which implies (i). It remains to prove (ii). First, let σ0 = (d01 , . . . , d0s ) be a strategy for (T0 , r0 ) such that all but at most k0 vertices of T0 are saved. Defending in round i, the root ric of Tic for i ∈ [p − 3] and defending in round i + (p − 3), the vertex d0i for i ∈ [s], results in a strategy σ for ((T , ω), r ), for which all vertices of negative weight are burned and all but at most k0 vertices of positive weight are saved, that is, f((T ,ω),r ) (σ ) ≥ n(T ) − k0 = k. Second, let σ = (d1 , . . . , dt ) be a strategy for ((T , ω), r ) with f((T ,ω),r ) (σ ) ≥ k. Clearly, we may assume that σ is an optimal strategy for ((T , ω), r ), which implies that σ does not defend a vertex of weight −1 that has just one child. Furthermore, we may assume that {d1 , . . . , dt } contains no two vertices d and d′ such that d is an ancestor of d′ in T . If σ defends a vertex, say d, of negative weight, then d has two children. In this case at least 1 + 2(p − log p − 4) vertices of T of negative weight are saved. Hence f((T ,ω),r ) (σ ) ≤ n(T )−(1+2(p−log p−4)) and thus k0 ≥ 1+2(p−log p−4), which contradicts the choice of p. Hence σ defends only vertices of positive weight and all but at most k0 vertices in V (T1 ) ∪ V (T2 ) ∪ V (T3 ) are saved. If σ defends no vertex of V (T1 ) ∪ V (T2 ) ∪ V (T3 ) during the first p − 3 rounds, then defending the vertices in V (T0 ) ∩ {d1 , . . . , dt } in an order of non-decreasing depth results in a strategy for (T0 , r0 ), which saves all but at most k0 vertices of T0 . If σ defends exactly one vertex of V (T1 ) ∪ V (T2 ) ∪ V (T3 ) during the first p − 3 rounds, then the root ric of some tree Tic is burned at the end of round p − 3 such that no vertex of Tic has been defended during the first p − 3 rounds. If σ does not defend one of the two children of ric in round p − 2, then more than p vertices of Tic are not saved, that is, f((T ,ω),r ) (σ ) < n(T )− p, which implies a similar contradiction as above. Hence σ defends no vertex of V (T1 ) ∪ V (T2 ) ∪ V (T3 ) in round p − 2. Again this implies that defending the vertices in V (T0 ) ∩ {d1 , . . . , dt } in an order of non-decreasing depth, results in a strategy for (T0 , r0 ), which saves all but at most k0 vertices of T0 . If σ defends at least two vertices of V (T1 ) ∪ V (T2 ) ∪ V (T3 ) during the first p − 3 rounds, then the roots of two of the trees Tic are burned at the end of round p − 3 such that no vertex of these two trees has been defended during the first p − 3 rounds. Arguing as above, more than p vertices of one of the trees Tic are not saved, and we obtain a contradiction as above. This completes the proof.  Theorem 2.2. For a given integer k and a given pair ((G, ω), r ) where G is a bipartite graph and ω : V (G) → {−1, 1}, it is NP-complete to decide whether there is a strategy σ with arbitrarily many defended vertices per round for the firefighter game with initial configuration (G, r ) such that f((G,ω),r ) (σ ) ≥ k. Proof. Since every vertex is defended at most once by an optimal strategy, the stated problem is clearly in NP. In order to show NP-completeness, we rely on the hardness of the dominating set problem [10]. Therefore, let G0 be a graph and let k0 be an integer. We will construct an integer k, a bipartite graph G with vertex r and a weight function ω : V (G) → {−1, 1} such that (i) n(G) is polynomially bounded in n(G0 ) and (ii) G0 has a dominating set of order at most k0 if and only if there is a strategy σ for the firefighter game with initial configuration (G, r ) and arbitrarily many defended vertices per round such that f((G,ω),r ) (σ ) ≥ k. Let k = 2n(G0 ) − k0 .

4

V. Costa et al. / Discrete Applied Mathematics (

)



The vertex set of the graph G contains a vertex r, and, for every vertex u of G0 , two distinct vertices u1 and u2 , that is, V (G) = {r } ∪ {u1 : u ∈ V (G0 )} ∪ {u2 : u ∈ V (G0 )}, where |V (G)| = 1 + 2|V (G0 )|. The weight function ω and the edge set of G are as follows.

ω(x) =

 −1, 1,

x ∈ {u2 : u ∈ V (G0 )} x ∈ {r } ∪ {u1 : u ∈ V (G0 )}, and

E (G) = {ru1 : u ∈ V (G0 )} ∪ {u1 v2 : u, v ∈ V (G0 ) and v ∈ NG0 [u]}. Clearly, G is bipartite and (i) holds. It remains to prove (ii). First, if D0 is a dominating set of G0 of order at most k0 , then defending all vertices in {u1 : u ∈ V (G0 )\ D0 } yields a strategy σ with f((G,ω),r ) (σ ) ≥ 2n(G0 ) − |D0 | ≥ k. Second, let σ be a strategy for the firefighter game with initial configuration (G, r ) and arbitrarily many defended vertices per round such that f((G,ω),r ) (σ ) ≥ k. Let D denote the set of vertices defended by σ . Clearly, we may assume that D ⊆ {u1 : u ∈ V (G0 )}. If D′0 = {u ∈ V (G0 ) : u1 ̸∈ D} and D′′0 = V (G0 ) \ NG0 [D′0 ], then D′0 ∪ D′′0 is a dominating set of G0 and f((G,ω),r ) (σ ) = 2n(G0 ) − (|D′0 | + |D′′0 |). Hence D′0 ∪ D′′0 is a dominating set of G0 of order at most k0 , which completes the proof.  3. Two greedy algorithms We describe two greedy approximation algorithms for Weighted Firefighter restricted to trees. Let ((T , ω), r ) be an instance of Weighted Firefighter where T is a tree. We root T in r. For every vertex u of T , let T (u) denote the subtree of T rooted in u that contains u and all descendants of u in T . For simplicity, we write f instead of f((T ,ω),r ) . Let



pos(u) =

max{0, ω(v)},

v∈V (T (u))



neg(u) =

max{0, −ω(v)},

and

v∈V (T (u))

diff(u) = pos(u) − neg(u). For a set U of vertices and func ∈ {pos, neg, diff}, let func(U ) = u∈U func(u). Clearly, we may restrict ourselves to strategies σ for which the set D of defended vertices does not contain two vertices d and d′ such that d is an ancestor of d′ in T . We call such strategies and sets of vertices ancestor-free. Every ancestor-free strategy σ for the instance ((T , ω), r ) corresponds to an ancestor-free subset D = {d1 , d2 , . . . , ds } of vertices of T with the property that distT (r , di ) ≥ i for i ∈ [s], where di is the vertex defended by σ in round i. Furthermore, every such set of vertices can be turned into a strategy for the instance ((T , ω), r ).  If σ is an ancestor-freestrategy and D is the set of vertices defended by σ , then all vertices in d∈D V (T (d)) are saved and all vertices in V (T ) \ d∈D V (T (d)) are burned. This implies



f (σ ) = neg(r ) +



diff(d).

d∈D

3.1. Pos-Greedy Here is the first greedy algorithm. Input: An instance ((T , ω), r ) of Weighted Firefighter where T is a tree. Output: A strategy σ for ((T , ω), r ). V ← V (T ) \ {r }; i ← 1; while V ̸= ∅ and max{pos(u) : u ∈ V } > 0 do choose gi ∈ V such that pos(gi ) = max{pos(u) : u ∈ V }; defend gi in round i; remove from V all vertices in V (T (gi )); remove from V all vertices at distance i from r; i ← i + 1; end Algorithm 1: Pos-Greedy

(1)

V. Costa et al. / Discrete Applied Mathematics (

)



5

Fig. 2. The vertices of weight 1 are shown as filled circles and the vertices of weight −1 as empty circles.

Pos-Greedy essentially ignores the vertices of negative weight. In fact, this algorithm corresponds to Hartnell and Li’s [9] greedy algorithm adapted to the weighted setting. Therefore, it is also not a surprise that the extremal example shown in Fig. 2 and discussed below corresponds to the extremal example in [9]. Clearly, the set of vertices gi defended by Pos-Greedy is ancestor-free. Theorem 3.1. For an instance ((T , ω), r ) of Weighted Firefighter where T is a tree, let

• σopt be an optimal strategy, • σpos-greedy be a strategy produced by Pos-Greedy, and • σ∅ be the empty strategy not defending any vertex at all. We have f (σopt ) ≤ 3 max f (σ∅ ), f (σpos-greedy ) ,





that is, returning the better of the two strategies σ∅ and σpos-greedy is a 31 -approximation algorithm. Proof. Clearly, f (σ∅ ) = neg(r ). Let {g1 , . . . , gq } denote the set of vertices defended by σpos-greedy . Clearly, we may assume that σopt is ancestor-free. Let O = {o1 , . . . , op } denote the set of vertices defended by σopt , where oi is defended in round i. Since σopt  is optimal, we may assume  pos(oi ) ≥ diff(oi ) > 0 for i ∈ [p]. For j ∈ [q], let Oj = {o ∈ O : o ∈ V (T (gj ))} and let O0 = O \ j∈[q] Oj . Clearly, pos(gj ) ≥ o∈Oj pos(o). If oi ∈ O0 , then σpos-greedy does not defend oi or any ancestor of oi . Since pos(oi ) > 0, this implies that i ≤ q and that pos(gi ) ≥ pos(oi ). Since O = O0 ∪





pos(oi ) =

i∈[p]

pos(oi ) +

i∈[p]:oi ∈O0







pos(gi ) +

j∈[q]

Oj is a partition of O, we obtain

pos(oi )



pos(gj )

j∈[q]

pos(gi ) +



pos(gj )

j∈[q]

i∈[q]

=2



j∈[q] i∈[p]:oi ∈Oj

i∈[p]:oi ∈O0









pos(gj ).

j∈[q]

Since σpos-greedy is ancestor-free, this implies f (σpos-greedy ) = neg(r ) +



diff(gj )

j∈[q]

 =



pos(gj ) +

j∈[q]





 neg(r ) −



neg(gj )

j∈[q]

pos(gj )

j∈[q]



1 2 i∈[p]

Note that x + y ≤ 3 max x, – that



f (σopt ) = neg(r ) +

y 2

pos(oi ).





for x, y ∈ R≥0 . Since σopt is ancestor-free, we obtain – using x = neg(r ) and y = diff(oi )

i∈[p]

≤ neg(r ) +

 i∈[p]

pos(oi )



i∈[p]

pos(oi )

6

V. Costa et al. / Discrete Applied Mathematics (

 ≤ 3 max neg(r ),

1 2 i∈[p]

)



 pos(oi )

  ≤ 3 max f (σ∅ ), f (σpos-greedy ) , which completes the proof.



For k ∈ N, let Tk arise from the disjoint union of

• • • •

an isolated vertex r, a star K1,k−2 of order k − 1, a path u1 u2 . . . uk of order k, and k isolated vertices v1 , . . . , vk ,

by joining r to the center of the star as well as u1 and joining ui to vi for every i ∈ [k]. Let ωk : V (Tk ) → {−1, 1} be such that ωk (u) = −1 exactly if u ∈ {u1 , . . . , uk }. See Fig. 2 for an illustration of T6 . An optimal strategy σopt for the instance ((Tk , ωk ), r ) of Weighted Firefighter would defend the center of the star K1,k−2 in round 1 and the vertex vi in round i + 1 for every i ∈ [k]. Thus f (σopt ) = 3k − 1. The strategy σpos-greedy produced by Pos-Greedy would defend vertex u1 in round 1, one of the endvertices of the star K1,k−2 in round 2, and no further vertex. Hence f (σpos-greedy ) = k + 1. Since f (σ∅ ) = k, we have f (σopt )

3k − 1 4  = =3− , k+1 k+1 max f (σ∅ ), f (σpos-greedy )



which implies that the analysis in Theorem 3.1 is best possible. 3.2. Diff-Greedy Here is the second greedy algorithm. Input: An instance ((T , ω), r ) of Weighted Firefighter where T is a tree. Output: A strategy σ for ((T , ω), r ). V ← V (T ) \ {r }; i ← 1; while V ̸= ∅ and max{diff(u) : u ∈ V } > 0 do choose gi ∈ V such that diff(gi ) = max{diff(u) : u ∈ V }; defend gi in round i; remove from V all vertices in V (T (gi )); remove from V all vertices at distance i from r; i ← i + 1; end Algorithm 2: Diff-Greedy Clearly, the set of vertices gi defended by Diff-Greedy is ancestor-free. Theorem 3.2. For an instance ((T , ω), r ) of Weighted Firefighter where T is a tree, let

• σopt be an optimal strategy and • σdiff-greedy be a strategy produced by Diff-Greedy. We have f (σopt ) ≤ 2f (σdiff-greedy ), that is, returning the strategy σdiff-greedy is a 12 -approximation algorithm. Proof. Let {g1 , . . . , gq } denote the set of vertices defended by σdiff-greedy . Clearly, we may assume that σopt is ancestor-free. Let O = {o1 , . . . , op } denote the set of  vertices defended  by σopt , where oi is defended in round i. For j ∈ [q], let Oj = {o ∈ O : o ∈ V (T (gj ))} and let O0 = O \ j∈[q] Oj . Since i∈[p]:oi ∈Oj V (T (oi )) ⊆ V (T (gj )) for every j ∈ [q], we have diff(gj ) ≥

 i∈[p]:oi ∈Oj

diff(oi ) − neg(gj ).

V. Costa et al. / Discrete Applied Mathematics (

)



7

Fig. 3. The vertices of weight 1 are shown as filled circles and the vertices of weight −1 as empty circles.

If oi ∈ O0 , then σdiff-greedy does not defend oi or any ancestor of oi . Since we may assume that diff(oi ) > 0, this implies that i ≤ q and that diff(gi ) ≥ diff(oi ). Altogether we obtain f (σopt ) − f (σdiff-greedy ) =



diff(oi ) −



diff(gj )

j∈[q]

i∈[p]



 =



diff(oi ) +

i∈[p]:oi ∈O0





diff(gj ) +

j∈[q]

≤ neg(r ) +

 j∈[q]







diff(oi ) − diff(gj )

i∈[p]:oi ∈Oj

neg(gj )

j∈[q]



diff(gj )

j∈[q]

= f (σdiff-greedy ), which completes the proof.



For k ∈ N, let Tk′ arise from the disjoint union of

• • • •

an isolated vertex r, a vertex g1 , k + 1 paths P1 , . . . , Pk+1 of order k, and k + 1 stars K1,1 , . . . , K1,k+1 of order k + 1,

by joining r to g1 , joining g1 to one end in the path Pi for i ∈ [k + 1], and joining the other end of the path Pi to the center of Ki for i ∈ [k + 1]. Let ωk′ : V (Tk′ ) → {−1, 1} be such that ωk′ (u) = −1 exactly if u ∈ V (P1 ) ∪ · · · ∪ V (pk+1 ). See Fig. 3 for an illustration of T3′ . An optimal strategy σopt for the instance ((Tk′ , ωk′ ), r ) of Weighted Firefighter would defend the centers o1 , . . . , ok+1 of the stars K1 , . . . , Kk+1 . Thus f (σopt ) = (2k + 1)(k + 1). The strategy σdiff-greedy produced by Diff-Greedy would only defend vertex g1 in round 1. Hence f (σdiff-greedy ) = (k + 1)2 + 1 and f (σopt ) f (σdiff-greedy )

=

(2k + 1)(k + 1) k+3 =2− 2 , 2 (k + 1) + 1 k + 2k + 2

which implies that the analysis in Theorem 3.2 is best possible. 4. A weighted version of the surviving rate We close with an observation and an open problem concerning a weighted version of the so-called surviving rate ρ(G) of a graph G of order n [4,8] defined as

ρ(G) =

f(G,r ) (σ ) 1  max σ n r ∈V (G)

n

where the maximum extends over all strategies σ for the firefighter game with initial configuration (G, r ) and  log at  most one n defended vertex per round. In [2] Cai et al. gave an elegant proof of the surprising result that ρ(T ) ≥ 1 − O n for every tree T of order n, that is, averaging over all vertices where the fire can break out, it is possible to save essentially all vertices of the tree.

8

V. Costa et al. / Discrete Applied Mathematics (

)



For a weighted version of the surviving rate, we propose to average

• over all vertices where the fire can break out and • over all 2n weight functions ω : V (G) → {−1, 1}, that is, we propose to study the following weighted surviving rate max f((G,ω),r ) (σ )  1  1 σ ρ±1 (G) = n n r ∈V (G) 2 n V (G) ω∈{−1,1}

where the maximum extends again over all strategies σ for the firefighter game with initial configuration (G, r ) and at most one defended vertex per round. Considering the empty strategy not defending any vertex, we obtain 1  1

ρ±1 (G) ≥

|ω−1 (−1)|



n r ∈V (G) 2n ω∈{−1,1}V (G)

n

n

1  1  i n

=

n r ∈V (G) 2n i=0 n 1

=

i

.

2 Our next result shows that this trivial estimate is actually best possible up to terms of lower order. The reason for this is our random choice of the weight functions. Since we consider each weight function ω : V (G) → {−1, 1} to be equally likely, the vertices of positive and negative weights are typically very well mixed. This makes it almost impossible to save a substantial number of vertices of positive weight without saving at the same time a similar number of vertices of negative weight. In view of this observation, it might be interesting to consider different probability distributions on the weight functions. Theorem 4.1. If Pn is a path of order n, then 1 2

+Ω





1



n

≤ ρ±1 (Pn ) ≤

1 2

 +O

log n



n

.

Proof. If (x1 , . . . , xn ) is a random sequence where each entry xi is −1 or 1 independently with probability Chernoff bound implies that



P xi + · · · + xj >



2n ln (n(2n − 1))



<

1 n(2n − 1)

for each i, j ∈ [n] with i ≤ j. This implies that with probability more than 1 − 1n , we have xi + · · · + xj ≤



2n ln (n(2n − 1))

for all 2n − 1 choices of i, j ∈ [n] with i ≤ j and i = 1 or j = n. For ω = (x1 , . . . , xn ) ∈ {−1, 1}n , let maxdiff(ω) = max xi + · · · + xj : (i, j ∈ [n]) ∧ (i ≤ j) ∧ ((i = 1) ∨ (j = n)) .





In view of (1) from the beginning of Section 3, we obtain for the path Pn of order n that

ρ±1 (Pn ) ≤

1

|ω−1 (−1)| + 2maxdiff(ω)



2n

n

ω∈{−1,1}V (G)

 =

1 2n

 |ω−1 (−1)| 



n

ω∈{−1,1}V (G)

 = ≤ =

1 2 1 2 1 2

+ +

2



2



2n



n



2n

 ω∈{−1,1}V (G)

maxdiff(ω)

ω∈{−1,1}V (G)

1−

 +O

+

 1

 1

n

n

 2

1



n

log n

2n ln (n(2n − 1)) +



n

which completes the proof of the upper bound.

1 n

 n

maxdiff(ω)

1 , 2

then the

V. Costa et al. / Discrete Applied Mathematics (

)



9

For the proof of the lower bound, we describe a simple strategy σ (ω, r ) for Weighted Firefighter on ((Pn , ω), r ) defending at most one vertex. Again we consider ω ∈ {−1, 1}V (Pn ) to be selected uniformly at random, that is, every value of ω is −1 or 1 independently with probability 12 . Let V1 and V2 denote the vertex sets of the components of Pn − r such that

|V1 | ≥ |V2 | where we allow V2 to be empty. Clearly, |V1 | ≥ n−2 1 . Let v1 denote the neighbor of r in V1 . Let n1 = |V1 |. If diff(v1 ) ≥ 0, then σ (ω, r ) defends v1 in the first round and defends no further vertex in later rounds. Otherwise, σ (ω, r ) does not defend any vertex at all. Since diff(v1 ) is the sum of n1 independent uniformly distributed random ±1 variables, we have P [diff(v1 ) = k] ≤



1



n1 n 1 +k 2

2n1



1





P [diff(v1 ) = k] ≤ (1 + o(n))



n1 2

2n1

Using Stirling’s formula n! = (1 + o(n)) 2π n



n1

 n n e

. 1 and n1 ≥ n− , this implies 2

4

πn

and hence 

 P

diff(v1 ) ≥

1



πn

4



1



4

2 1



2 1

=

2

1 4



√ πn  4

P [diff(v1 ) = k]

k=0





− (1 + o(n)) − (1 + o(n))

4

  

πn

1

πn

4

4



 +1

1 4

1

= (1 + o(n)) . 4

Hence,

ρ±1 (Pn ) = ≥

=

=



≥ =

1 

1

n r ∈V (P ) n

2n

1 

1

n r ∈V (P ) n

2n

1 

1

max f((Pn ,ω),r ) (σ ) σ



n

ω∈{−1,1}V (Pn )

f((Pn ,ω),r ) (σ (ω, r ))



n

ω∈{−1,1}V (Pn )

|ω−1 (−1)| + max{0, diff(v1 )}



n r ∈V (P ) 2n n ω∈{−1,1}V (Pn ) 1 2 1 2 1 2 1 2

+

1 

1

n r ∈V (P ) n

2n

n max{0, diff(v1 )}



n

ω∈{−1,1}V (Pn )

 + P diff(v1 ) ≥ 1

+ (1 + o(n))  4 1 +Ω √ ,

1 4

1



πn

4



 1  πn

4

4

4

n

πn 4

n

n

which completes the proof of the lower bound.



It remains an open problem to determine exact expressions or at least good estimates for ρ±1 (T ) − of order n.

1 2

for a given tree T

Acknowledgments We acknowledge partial support by CNPq, CAPES, FAPERJ, and the CAPES DAAD Probral project ‘‘Cycles, Convexity, and Searching in Graphs’’.

10

V. Costa et al. / Discrete Applied Mathematics (

)



References [1] C. Bazgan, M. Chopin, B. Ries, The firefighter problem with more than one firefighter on trees, Discrete Appl. Math. 161 (2013) 899–908. [2] L. Cai, Y. Cheng, E. Verbin, Y. Zhou, Surviving rates of graphs with bounded treewidth for the firefigher problem, SIAM J. Discrete Math. 24 (2010) 1322–1335. [3] L. Cai, E. Verbin, L. Yang, Firefighting on trees: (1–1/e) approximation, fixed parameter tractability and a subexponential algorithm, in: LNCS, vol. 5369, 2008, pp. 258–269. [4] L. Cai, W. Wang, The surviving rate of a graph for the firefighter problem, SIAM J. Discrete Math. 23 (2009) 1814–1826. [5] V. Costa, S. Dantas, M.C. Dourado, L. Penso, D. Rautenbach, More fires and more fighters, Discrete Appl. Math. 161 (2013) 2410–2419. [6] C. Duffy, A collection of algorithmic and complexity results for variants of the firefighter problem (Master’s thesis), University of Victoria, 2011, Available online under http://dspace.library.uvic.ca:8080/bitstream/handle/1828/3550/Duffy_Christopher_MSc_2011.pdf?sequence=3. [7] S. Finbow, A. King, G. MacGillivray, R. Rizzi, The firefighter problem for graphs of maximum degree three, Discrete Math. 307 (2007) 2094–2105. [8] S. Finbow, G. MacGillivray, On firefighter problem: a survey of results, directions and questions, Australas. J. Combin. 43 (2009) 57–77. [9] B. Hartnell, Q. Li, Firefighting on trees: how bad is the greedy algorithm? Congr. Numer. 145 (2000) 187–192. [10] T.W. Haynes, S.T. Hedetniemi, P.J. Slater, Fundamentals of Domination in Graphs, Marcel Dekker, Inc., New York, 1998. [11] G. MacGillivray, P. Wang, On the firefighter problem, J. Combin. Math. Combin. Comput. 47 (2003) 83–96.