Parameterized Complexity of Firefighting Revisited
The Firefighter problem is to place firefighters on the vertices of a graph to prevent a fire with known starting point from lighting up the entire graph. In each time step, a firefighter may be permanently placed on an unburned vertex and the fire s…
Authors: Marek Cygan, Fedor V. Fomin, Erik Jan van Leeuwen
P arameterized Complexit y of F ir efigh ting Revisi t ed Marek Cygan ∗ F edor V. F omin † Erik Jan v an Leeu we n † Abstract The Firefighter problem is to place fir efighters on the vertices of a graph to pr even t a fir e with known starting p o int from ligh ting up the en tire graph. In eac h time step, a fir efighter ma y b e p er manently placed on an unburned v er tex and the fire spreads to its neighborho o d in the graph in so far no fir efighters are pro tecting those vertices. The goal is to let as few vertices burn a s p ossible. This pr oblem is known to be NP-complete, e ven when restricted to bipartite gr aphs or to trees of maximum degree three. Initial study show e d the Firefighter pro b- lem to b e fixed-para meter tractable on tr ees in v arious parameteriz a - tions. W e complete these r esults by s howing that the problem is in FPT on general graphs when para meterized b y the n umber of burned vertices, but has no p oly nomial k er nel on trees, resolv ing an open pro b- lem. Conv er sely , we show that the problem is W[1]-hard when pa ram- eterized by the num b er of unburned vertices, even o n bipar tite gr aphs. F or bo th par ameterizations, we additiona lly give re fined alg orithms on trees, improving on the running times of the known a lg orithms. 1 In tro d uction The F irefighter problem concerns a deterministic mo del of fire spreading through a graph via its ed ges. The problem has recently r eceiv ed consider- able attenti on [9, 13]. In the mo del, w e are giv en a graph G with a v ertex s ∈ V ( G ). A t time t = 0, the fi re breaks out at s and vertex s starts burn - ing. At eac h step t ≥ 1, first the firefighter protects one v ertex not y et on fire—this vertex remains p ermanently protected—and the fire then s preads from burn in g v ertices to all u nprotected n eigh b ors of these v ertices. The pro cess stops when the fi r e cannot s p read an ymore. The goal is to fi nd a strategy for th e firefi ghter that minimizes the amount of burned v ertices, or, equiv alen tly , maximizes the num b er of sa ve d , i.e. not bu rned, vertic es. It is kno wn that the Firef ighter prob lem is NP-hard, ev en when re- stricted to bipartite graphs [13] or trees of maximum degree three [10]. Ho w ever, it is p olynomial-time solv able on such trees if th e ro ot h as degree t wo [13]. W e refer to the survey [11] for an o verview of fu rther com binatorial ∗ Institute of Informatics, Universit y of W arsa w, P oland, cyg an@mimuw.edu.pl † Department of Informatics, Universit y of Bergen, Norw ay , fedor.fomi n|E.J.van.Leeuwen@ ii .uib.no 1 results on th e pr oblem. The stud y of the problem from the p ersp ectiv e of parameterized complexit y wa s initiated by Cai, V erbin, and Y ang [6]. They considered the follo win g parameterized v ersions of the p roblem and obtained a n u m b er of parameterized algorithms on trees. The first p arameterizati on considered by Cai et al. in [6 ] is by the num b er of sav ed ve r tices. Sa ving k Ver tices P arameter: k Input: An u ndirected graph G , a v ertex s , and an int eger k . Question: Is there a strateg y to sav e at least k v ertices w hen a fi re breaks out at s ? Cai et al. pro ved that Sa ving k Ver tices on trees has a k ernel with O ( k 2 ) v ertices. They also ga v e a r andomized algorithm solving Sa ving k Ve r t ices on trees in time O (4 k + n ), whic h can b e derandomized to a O ( n + 2 O ( k ) )-time algorithm. The second p arameterizati on is by the num b er of burned vertic es. Sa ving All But k Ver tices P arameter: k Input: An u ndirected n -v ertex graph G , a v er tex s , and an integ er k . Question: I s there a strategy to sav e at least n − k ve r tices wh en a fire breaks out at s ? F or Sa ving All But k Ver tices on trees, Cai et al. ga ve a random- ized algorithm of run ning time O (4 k n ), whic h can b e derand omized to a O (2 O ( k ) n log n )-time algorithm. T h ey left as an op en problem wh ether Sa v - ing All But k Ve r t ices has a p olynomial k ern el on trees. The last parameterization is by the num b er of protected vertices, i.e. the n u m b er of v ertices o ccupied by firefigh ters. Maximum k -Ve r t ex Protection P arameter: k Input: An u ndirected graph G , a v ertex s , and an int eger k . Question: What is a str ategy that sa ves the maximum num b er of ver- tices by protecting k v ertices wh en a fi re breaks out at s ? F or Maximum k -Ver tex Protection on trees, Cai et al. ga v e a rand om- ized algorithm of runn ing time O ( k O ( k ) n ), wh ic h can b e deran d omized to a O ( k O ( k ) n log n )-time algorithm. They left op en whether the p roblem has a p olynomial k ernel on trees, and aske d w hether there is an algorithm solving the pr oblem on trees in time 2 o ( k log k ) n O (1) . W e will sometimes consider the decision v arian t o f Max imum k -Ver tex Pr o tection . k -Ver tex Protection P arameter: k Input: An u ndirected graph G , a ve r tex s , an in teger k , and an inte ger K . Question: Is there a s tr ategy that sa ve s at least K v ertices by protecting k v ertices when a fire br eaks out at s ? The unparameterized version of this pr oblem is ob viously NP-hard on trees 2 of maximum d egree thr ee from the hard ness of the Firefighter problem. Our results W e resolv e sev eral op en questions of Cai, V erbin, an d Y ang [6]. W e also r efine and extend s ome of the resu lts of [6]. • In Section 2, we give a deterministic algorithm solving S a ving k Ver tices on trees in time O (2 k k 3 + n ), improving the runn ing time O (4 k + n ) of th e rand omized algo r ith m f r om [6]. W e also observ e that on general graphs the pr ob lem is W[1]-hard, whic h was in dep end en tly observ ed b y Cai (p riv ate communicatio n ), bu t is in FPT when pa- rameterized by k and the treewidth of a graph. Based on that we deriv e that S a ving k Ver tices is in FPT on graph s of b ounded lo cal treewidth, including planar graphs, graphs of b ound ed gen us, ap ex- minor-free graphs, an d grap h s of b ounded maxim um vertex degree. • In Section 3, w e provide d eterministic alg orithm s solving Sa ving All But k Ve r tice s in time O (2 k n ) on trees, and in time O (3 k n ) on general graph s. The algorithm on trees impr o v es the O (4 k n ) run ning time of the rand omized algorithm f r om [6]. W e also answ er the op en question of Cai et al. by sho wing that Sa ving All But k Ver tices has n o p olynomial kernel on trees of maximum ve r tex degree four. • F or M aximum k -Ve r te x Pr o tection , we answ er b oth op en ques- tions of Cai et al.: W e give a d eterministic algorithm solving Ma xi- mum k -Ver tex Protection on trees in time O (2 k k n ) in Section 2, and sho w that the pr oblem has no p olynomial ke r nel on trees in Section 3. Th e n o-p oly-k ernel r esult wa s indep endent ly obtained b y Y ang [14]. Based on the parameterized a lgorithm, w e also giv e an exact sub exp on ential- time algorithm, solving the F irefighter prob- lem on an n -v ertex tree in time O (2 √ 2 n n 3 / 2 ), th us improving on the 2 O ( √ n log n ) runn in g time from [6]. On general graphs, w e sho w that the Maximum k -Ver tex Protection p roblem is W[1]-hard, but is in FPT wh en p arameterized by k and the treewidth of a graph. Recen tly , and indep end en t of our work, Bazgan, Chopin, and F ello ws [2] pro ved sev eral of the results m en tioned ab o ve . This includes the W[1]- hardness of Sa ving k Ver tices , as w ell as its members hip of FPT on graphs of b ound ed treewidth, and the mem b ership of FPT of S a ving All But k Ver tices on general graphs , as well as it not havi n g a p olynomial k ernel on trees. In addition, they consider the parameterization b y the ve r tex co v er num b er of a graph, and the extension of the pr oblem to b eing able to protect b v ertices at an y time step. How ev er, they do not consider Max imum k -Ver tex Pr ot ection , algorithms on trees, or exact algorithms. 3 2 Sa ving and Protecting V ertices In this section, we consider the complexit y of S a ving k Ve r t ices a n d Maximum k -Ver tex Protection . These problems are known to b e fixed- parameter tractable on trees, but their complexit y on general graph s wa s hitherto unkno w n. W e resolv e this op en problem by giving a W[1]-hardness result f or b oth pr oblems. A t the other end of th e sp ectrum, we extend the b ound ary w here Sa ving k Ver tices and Maximum k -Ver tex Pr ot ec- tion r emain fixed -p arameter tractable by giving p arameterized algorithms on graphs of boun ded treewidth. Finally , we impr o v e th e algo r ithms known to exist for trees. 2.1 W[1]-Hardness on General Graphs W e sho w that Sa ving k Ver tices and th e d ecision v ariant of Maximum k - Ver tex Pr ote ction are W[1]-hard, eve n on b ip artite graph s. W e r educe from the k -Clique problem, w hic h is well known to b e W[1]-hard [7]. Theorem 2.1 Sa ving k Ver tices is W[1]-har d, even on bip artite gr aphs. Pro of: Let ( G, k ) be an instance of k -Clique . W e can assu me that G has at least k + 1 v ertices that are not isolated, or we can easily outpu t a trivial Yes - or No -instance. W e constru ct th e follo wing b ipartite graph G ′ (see Figure 1). F or eac h edge ( u, v ) ∈ E ( G ), we add a v ertex s uv , and for eac h ve r tex v ∈ V ( G ), we add a v ertex s v . Call these t wo sets of v ertices E and V r esp ectiv ely . No w add an ed ge f r om s uv to b oth s u and s v for eac h ( u, v ) ∈ E ( G ). Ad d a ro ot vertex s , and add v ertices a i,j for all 1 ≤ i ≤ k − 1 and 1 ≤ j ≤ k . C onnect a i,j to a i ′ ,j ′ ( i ′ = i + 1) for all i, j, j ′ , connect a 1 ,j to s for all j , and connect a k − 1 ,j to eac h vertex of V for all j . No w set k ′ = k + k 2 + 1. W e claim that Sa v ing k Ver t ices on ( G ′ , s, k ′ ) is a Yes -instance if and only if k -Clique on ( G, k ) is a Yes -instance. Supp ose that G has a k -clique K . T hen the strategy that protects the v ertices s v for all v ∈ K sa v es the vertices s uv for all u, v ∈ K . Since K is a clique, these vertice s s uv are indeed presen t in G ′ . Add itionally , w e can protect (a n d th us sa ve) a v ertex s xy for some edge xy 6∈ E ( G [ K ]). Th is edge exists, as G is assumed to h a v e at lea st k + 1 nonisolated vertice s. It follo ws that this strategy sav es at least k ′ v ertices. Supp ose th at P = { p 1 , . . . , p ℓ } is a strategy for ( G ′ , s, k ′ ) that c h o oses v ertex p t at time t and sa ves at least k ′ v ertices. First observe that if p t = a i,j for some i, j , then this vertex is not helpful, as there is alw a ys a v ertex a i,j ′ that will b e burned at time t and has the same neigh b orho o d as a i,j . Hence w e can assume that no v ertex a i,j is protected by the strategy . This implies that all v ertices of V will b e bu rned, except those that are pr otected by the strategy . But then p rotecting v ertices of E do es n ot sa ve an y fu rther 4 s E V s 1 s 2 s 3 s 4 s 5 s 12 s 23 s 24 s 34 s 45 a 1 , 1 a 1 , 2 a 1 , 3 a 2 , 1 a 2 , 2 a 2 , 3 1 2 3 4 5 Figure 1: An instance of k -Clique and the corresp onding graph G ′ con- structed in th e pro of of Th eorem 2.1 for k = 3. v ertices. Since th e fi re w ill reac h V in k time steps , and thus E in k + 1 time steps, the v ertices in S ∩ V are resp onsible for sa ving k 2 v ertices, which is only p ossible if the vertic es of S ∩ V in duce a k -clique in G . Observe that essen tially the same construction works for the decision v ariant of Max imum k -Ver tex Protection . Theorem 2.2 k -Ver tex Protection is W[1]-har d, even on b i p ar tite gr aphs. Pro of: W e again redu ce from k -Clique and construct the same bipartite graph as in the pro of of Theorem 2.1. W e set k ′ = k + 1 and K ′ = k + k 2 + 1. Correctness n o w follo ws str aigh tforw ard ly from the argumen ts in the p ro of of Th eorem 2.1. The ab ov e redu ction also implies an NP-hardness red u ction, which is sim- pler than the original reduction f or the Firefighter problem on bipartite graphs [13]. 2.2 Impro ved Algorithm on T rees W e sh o w that Sa ving k Ver tices and Maximum k -Ver tex Pr ote ction ha ve a deterministic O ( n + 2 k k 3 ) and O (2 k k n ) algorithm, resp ective ly , on trees. This resolve s an op en question of Cai et al. [6]. As a consequence, w e also obtain a refined su b exp onen tial algorithm for the Fire fighter problem on trees, ru nning in time O (2 √ 2 n n 3 / 2 ). The follo wing observ ation is by MacGillivra y and W ang [13, S ect. 4.1]. 5 Lemma 2.3 F or any optimum str ate gy for an instanc e of the Firefighter pr oblem on tr e es, ther e is an i nte ger ℓ such that al l pr ote cte d vertic es have depth at most ℓ , exactly one vertex p i at e ach depth 1 ≤ i ≤ ℓ is pr ote cte d, and al l anc estors of e ach p i ar e bu rne d. W e need the follo win g notation. Let T b e any ro oted tree. Use a pr e-order tra v er s al of T to n u m b er the vertices of T from 1 to n . W e sa y that u ∈ V ( T ) is to the left of v ∈ V ( T ) if the num b er assigned to u is not greater than the num b er of v in the order. It is then easy to define what the leftmost or rightmost ve r tex is. Theorem 2.4 Maximum k -Ver tex Protection h as an O (2 k k n ) -time algorithm on tr e es. Pro of: Let ( T , s, k ) b e an instance of Maximum k -Ver tex Protection on a tree T . Assume that T is ro oted at s . By Lemma 2.3, we can d efine a c haracteristic v ector χ v of length k for eac h v ertex v of the tree, w h ic h has a 1 at p osition i if and only if the optimal strategy pr otects a verte x at depth i in the part of the tree to the left of v . W e use these v ectors as the basis f or a dyn amic p rogramming pro cedur e. Ho wev er, the ve ctor cannot ensure that no ancestors of a protected v ertex will b e p rotected. T o ensu re this, w e add another dim en sion to our dyn amic programming p ro cedure. Th e pre-order n u m b ering ensur es that no descendant is protected. The dynamic programming algorithm is then as follo ws. Let L b e the set of vertice s in T that are at depth at most k . F or eac h v ∈ L , let P v denote th e path in T b et ween v and s . F or ea ch vec tor χ ⊆ { 0 , 1 } k and eac h in teger 0 ≤ i ≤ k , we compute A v ( χ, i ), the maxim um num b er of v ertices one can sa v e when pr otecting at most one vertex at depth j for eac h j f or whic h χ ( j ) = 1 and n o ve r tex otherwise, wher e protected vertices must lie to the left of v bu t a t depth greater than i wh en lying on P v , and no p rotected v ertex is an ancestor of another. Ob serv e that s is the leftmost vertex of L . No w set A s ( χ, i ) = 0 for an y χ and i . Th en A v ( χ, i ) = max { A l ( v ) ( χ, min { depth( v ) − 1 , i } ) , [ χ (depth( v )) = 1 ∧ dep th( v ) > i ] · ( r ( v ) + A l ( v ) ( χ v , depth( v ) − 1)) } Here d epth( v ) is the depth of a v ertex v , l ( v ) is the rightmost v ertex in L which has strictly smaller v alue in the pre-order than v , an d r ( x ) is the n u m b er of v ertices sa ved w hen pr otecting only x . Moreo v er, χ v is the 0-1 v ector obtained from χ by setting the num b er at the index of χ corresp onding to d epth( v ) to 0. In the form ula w e use Iv erson’s brac ket notation, where [ φ ] is equal to one if φ is true and zero otherwise. T o see that the ab ov e form ula is correct, observ e that w e c an either protect the considered v ertex v or not. If we do not p rotect v , then w e m us t 6 ensure that the v alue for the second dimen s ion of our dy n amic pr ogramming pro cedure do es not exceed the length of P v , y et still captures the same forbidden part of P v . Corr ectness then f ollo ws from th e fact that the paren t of v is alw a ys on P l ( v ) . If we do p rotect v , we can protect v only if w e are allo w ed to do so, i.e. if χ (depth( v )) = 1 and depth( v ) > i . F urtherm ore, we need to ensure that n o ancestor of v is p r otected later. T herefore, we set the v alue for the second d im en sion of our d ynamic programming pro cedu re to d epth( v ) − 1. T o get the solution for the wh ole tree T , return A v ∗ (1 k , 0), wher e v ∗ is the righ tmost vertex of L . T o obtain the claimed r u nning time, first find L , and then l ( v ) f or eac h v ertex v ∈ L . T h is can b e done in linear time b y a depth-first searc h. W e can also compute r ( x ) for eac h x ∈ V ( T ) in linear time, as r ( x ) equals one plu s the n umb er of descendan ts of x . By tra v ersing the vertic es of L from left to r igh t, the total running time is O (2 k k n ). Corollary 2.5 Sa ving k Ver tices has an O (2 k k n ) -time algorithm on tr e es. Pro of: Let ( T , s, k ) b e an instance of Sa ving k Ver tices on a tree T . W e run the ab o v e algorithm for Maximum k -Ver tex Protection for all k ′ = 1 , . . . , k . Observe that it is p ossible to sa v e k ve r tices of the tree if and only if the algorithm s a v es at least k vertic es for some v alue of k ′ . F urthermore, we n ote that k X i =1 (2 i in ) ≤ kn k X i =1 2 i = (2 k +1 − 2) k n, implying that the w orst-case r unning time of the algorithm is O (2 k k n ). Using the known ke r nel of size O ( k 2 ) [6], w e can impro ve ru nning time of the ab o v e algorithm for Sa ving k Ver tices to O ( n + 2 k k 3 ). T o obtain a go o d s ub exp onen tial algorithm, w e use the follo win g lemma. Lemma 2.6 If a vertex at depth d burns in an optimum str ate gy for an instanc e of the Firef ighter pr oblem on tr e es, then at le ast 1 2 ( d 2 + d ) vertic es ar e save d. Pro of: Let ( T , s ) b e an in stance of th e Firefighter p roblem on trees, and let v b e a vertex of depth d that bur ns in an optimum strategy . Th en the strategy protects a verte x at depth d , and by Lemma 2.3 it thus protects a v ertex p i at eac h depth i for 1 ≤ i ≤ d . F or an y i , the subtree ro oted at p i should con tain at least d − i + 1 v ertices, or it w ould ha ve b een b etter to protect th e v ertex at depth i th at is on the path from v to s . But th en the strategy sa ves at least P d i =1 ( d − i + 1) = 1 2 ( d 2 + d ) v ertices. 7 Theorem 2.7 The Firef ighter pr oblem has an O (2 √ 2 n n 3 / 2 ) -time algo- rithm on tr e es. Pro of: Let ( T , s ) b e an instance of the Firef ighter problem on trees. Supp ose that a v ertex v at depth √ 2 n bu rns in an optim um strategy . Then, b y Lemma 2.6, the strategy sa ve s at least n + p n/ 2 > n v ertices, which is not p ossible. It follo ws that all v ertices at d epth √ 2 n are sa ved in any optim um strategy . Since in any optim um strategy ev ery pr otected v ertex has a b urned ancestor by Lemma 2.3, all protected v ertices are at dep th at most √ 2 n . Hence there is an optimum str ategy that pr otects at most √ 2 n v ertices, and we ca n fi nd the optim um strategy b y ru nning the algorithm of Theorem 2.4 with k = √ 2 n . 2.3 T ractabilit y on Graphs of Bounded T reewidth W e generalize the ab ov e resu lts by sh o wing that Ma ximum k -Ver tex Pro- tection and Sa ving k Ver tices remain fixed -p arameter tractable wh en parameterized b y k and the treewidth of the underlying graph. T o this end, we use Mo n adic Second Or der Logic (MSOL). The syntax of MSOL of graphs includ es the logical conn ectiv es ∨ , ∧ , ¬ , ⇔ , ⇒ , v ariables for ve r tices, edges, sets of v ertices, and sets of edges, the quanti fi ers ∀ , ∃ that can b e applied to these v ariables, and the follo win g four binary relations: 1. u ∈ U , where u is a v ertex v ariable and U is a vertex set v ariable. 2. d ∈ D , where d is an edge v ariable and D is an edge set v ariable. 3. adj( u, v ), where u, v are verte x v ariables, a n d the interpretatio n is that u and v are adj acent. 4. Equalit y , =, of v ariables representing ve r tices, edges, sets of v ertices, and sets of edges. F or Maximum k -Ver tex Protection , w e actuall y need Linear Extended MSOL [1], which allo ws the maximization o ver a linear com bination of the size of unb ound set v ariables in the MS OL form ula. (The definition of LEMSOL in [1] is slight ly more general, but th is su ffices for our pu r p oses.) Theorem 2.8 Maximum k -Ver tex Pr otec tion is in FPT when p ar am- eterize d by k and the tr e ewidth of the gr aph. Pro of: L et ( G, s, k ) b e an instance of Maximum k -Ver tex Protection suc h that the treewidth of G is t . Use Bodlaend er ’s Algorithm [3] to fin d a tree d ecomp osition of G of width at most t . Consid er the follo wing MSOL form u lae. NextBurn( B i − 1 , B i , p 1 , . . . , p i ) := ∀ v v ∈ B i − 1 ∨ ∃ u u ∈ B i − 1 ∧ adj( u, v ) ∧ V 1 ≤ j ≤ i v 6 = p j ⇔ v ∈ B i 8 This expresses is that if the vertic es of B i − 1 are bu rning b y time step i − 1, then th e v ertices of B i burn b y time step i , assuming that v ertices p 1 , . . . , p i ha ve b een protected so far. Sa ve d ( S, B , p 1 , . . . , p ℓ ) := ∀ u u ∈ S ⇒ u 6∈ B ∧ ∀ v adj( u, v ) ⇒ v ∈ S ∨ _ 1 ≤ i ≤ ℓ p i = u This expresses th at S is a set of sav ed v ertices w hen B is a set of bur ned v ertices and vertice s p 1 , . . . , p ℓ are protected. Protect( S, ℓ ) := ∃ p 1 , . . . , p ℓ ∃ B , B 0 , . . . , B ℓ − 1 ∀ u ( u ∈ B 0 ⇔ u = s ) (1) ∧ ^ 1 ≤ i ≤ ℓ − 1 NextBurn( B i − 1 , B i , p 1 , . . . , p i ) (2) ∧ ^ 1 ≤ i ≤ ℓ p i 6∈ B i − 1 (3) ∧ ∀ u _ 0 ≤ i ≤ ℓ − 1 u ∈ B i ⇒ u ∈ B (4) ∧ S a ve d ( S, B , p 1 , . . . , p ℓ ) (5) This expr esses that S ca n b e sav ed b y protecting ℓ ve r tices. The sets B i con tain all v ertices that are b urned b y time step i , whic h is ensu r ed by the form u las in lines 1 and 2. Th e set B con tains v ertices that are not sav ed (line 5) and all vertices of the sets B i (line 4). The v ertices p 1 , . . . , p ℓ are the vertic es that are p rotected. Line 3 ensures that the v ertices we wa nt to protect are n ot burned by the time w e pic k them. Then w e w ant to fi nd the largest set S suc h that Protect k ( S ) := _ 1 ≤ ℓ ≤ k Protect( S, ℓ ) is true. F ollo wing a r esult of Arn b org, Lagergren, and Seese [1], this can b e done in f ( k , t ) · n O (1) time u sing th e ab ov e formula. In the same wa y as Corollary 2.5, we then obtain the f ollo wing. Corollary 2.9 Sa ving k Ver tices is in FPT when p ar ameterize d by k and the tr e ewidth of the gr aph. Observe that this algorithm also works on graphs of b ound ed lo cal treewidth , b ecause if the graph has a v ertex at distance more than k from the ro ot, then any strategy that pr otects a verte x at distance i from the ro ot in time step i w ill s av e at least k v ertices, and we can answer Yes immediately . 9 Corollary 2.10 Sa ving k Ve r t ices is in FPT on g r aphs of b ounde d lo c al tr e ewidth. The class of graphs h a ving b ounded lo cal treewidth coincides with the class of ap ex-minor-free graphs [8], whic h includ es the class of p lanar graph s. Corollary 2.11 Sa ving k Ver tices is in FPT on planar gr aphs. 3 Burning V ertices In this section, w e consider the Firefighter p roblem when parameterized b y the num b er of burned v ertices, wh ich w e call the Sa ving All But k Ver tices pr oblem. W e imp ro ve on results of Cai et al. [6] by sho wing an O (2 k n )-time deterministic algorithm f or trees and an O (3 k n )-time determin- istic algorithm for general graph s. F u r thermore, we pro ve that the Sa ving All But k Ver tices pr oblem has n o p olynomial kernel for trees, resolving an op en problem from [6]. 3.1 Algorithms In this s u bsection, we sh o w an O (2 k n )-time algorithm for the Sa ving All But k Ver tices problem on trees, and an O (3 k n )-time algorithm on gen- eral grap h s. Theorem 3.1 The Sa ving All But k Ver tices pr oblem for tr e es c an b e solve d in O (2 k n ) time and p oly nomial sp ac e. Pro of: If the ro ot s has at most one child, then we immediately answ er Yes . W e ma y assume that the ro ot has exactly a ≥ 2 children, and k ≥ a − 1 since otherwise w e simp ly answ er No . W e use Lemma 2.3 and branc h on ev ery c hild of the r o ot s . In eac h branch, w e cut the subtree ro oted at the protected v ertex, identify all th e vertic es that are on fire after the first round, and decrease the parameter by a − 1. In this w ay , we obtain a new instance of the Sa ving All But k Ver tices problem with parameter v alue equal to k − ( a − 1). The time b ound follo ws f r om the inequalit y T ( k ) ≤ aT ( k − ( a − 1)) + O ( n ) whic h is wo r st when a = 2 . Before we pr esen t the algorithm on general graphs, we need to reformula te the Firef ighter problem to an equiv alen t version. Consider a different v ersion of the Firef ighter problem, where in eac h r ound an arbitrary n u m b er of v ertices ma y b e pr otected u nder the follo win g restrictions: • eac h protected v ertex m ust ha ve a neighbor wh ic h is on fire, 10 • after i roun ds of the pro cess at most i v ertices are p r otected. By Sa ving All But k Ver tices I I w e denote the S a ving All But k Ver tices problem where v ertices are protected su b ject to th e ab ov e rules. Lemma 3.2 An instanc e ( G, s, k ) of the Sa ving All But k Ver tices pr oblem is a Y es -instanc e if and only if it i s a Ye s -instanc e of the Sa v ing All But k Ver tices I I pr oblem. Pro of: Assume that ( G, s, k ) is a Yes -instance of the S a ving All But k Ver tices problem. Let P b e th e set of protected vertice s of an optim um strategy S . W e construct a strategy S ′ , wh ic h in the i -th r ound of Sa ving All But k Ver tices I I p rotects exactly those vertice s of P w hic h hav e a neigh b or which is on fi re. Clearly after i round s at most i v ertices will b e protected, sin ce eac h v ertex of P is pr otected by the strategy S ′ not earlier than by the strategy S . In the other direction assume that ( G, s, k ) is a Yes -instance of the Sa ving All But k Ver tices I I problem and P is the set of protected v ertices of an optim u m str ategy S ′ . W e construct a strategy S as follo ws. Let ( v 1 , . . . , v | P | ) b e a sequence of v ertices of P sorted by the round in whic h a vertex is protected by S ′ (breaking ties arbitrarily). In th e i -th roun d of strategy S we protect the v ertex v i . The v ertex v i is not on fire in the i -th round, b ecause in th e strategy S ′ it is p rotected not earlier than in the i -th round. Theorem 3.3 Ther e is an O (3 k n ) -time and p olynomial-sp ac e algorithm for the S a ving All But k Ver tices I I pr oblem on gener al gr aph s. Pro of: W e present a sim p le br anc hing algorithm. Assu me that w e are in the i -th time step and let B b e the set of v ertices wh ic h are cur ren tly on fire. Moreo ver, let P b e th e set of already p rotected ve r tices (in the first round w e ha v e B = { s } and P = ∅ ). Let a = i − | P | and r = | N ( B ) \ P | . The algorithm d o es the follo wing: 1. If | B | > k , then we immediately answer No . 2. Observe that in the i -th roun d w e are allo wed to p rotect at most min( a, r ) v ertices. If a ≥ r , then we can greedily protect the whole set N ( B ) \ P . Hence in this case w e answer Yes . 3. In the last case, when a < r , w e b ranc h on all subsets of N ( B ) \ P of size at most a . Observ e that the num b er of branc hes is equal to P a j =0 r j ≤ 2 r − 1, s ince w e h av e a < r . The runn ing time of the algorithm is as follo ws. W e in tro duce a measure α = ( k − | B | ) + ( i − | P | ) whic h w e u se in our time b ound . A t the b eginning of 11 the first r ound of the burning pro cess we h a v e α = ( k − 1) + (1 − 0) = k . By T ( α ) w e denote the u pp er b ound on the num b er of steps that our algorithm requires for a graph with measure v alue α . Observe that for α ≤ 0, w e hav e T ( α ) = O ( n ). Let us assume that the algorithm did not stop in s tep 1 or 2, and it branc h es in to at most 2 r − 1 c h oices of protected vertic es. Observe that n o m atter ho w man y v ertices the a lgorithm decides to p rotect, the v alue of the measure d ecreases by exactly r − 1. Cons equ en tly , we ha v e the inequalit y T ( α ) ≤ (2 r − 1) T ( α − r + 1) + O ( n ). Since the algorithm did not stop in steps 1 or 2, w e infer that r ≥ 2. The time b ound follo ws from the fact that the w orst case for the inequalit y o ccurs when r = 2. Corollary 3.4 Ther e is an O (3 k n ) -time and p olynomial-sp ac e algorith m for the S a ving All But k Ver tices pr oblem on ge ne r al gr aphs. 3.2 No Poly-Kernel for T rees The aim of this sub section is to prov e th e follo wing th eorem. Theorem 3.5 Unless NP ⊆ c oNP / p oly, ther e is no p olynomia l kernel for the Sa ving Al l Bu t k Ver tices pr oblem, even if the input gr aph is a tr e e of maximum de gr e e four. Before we pro ve Theorem 3.5 we describ e th e necessary to ols. W e use the cross-comp osition tec h n ique introdu ced b y Bo dlaender et al. [5], which is based on the p r evious results of Bo dlaend er et al. [4] and F ortno w and San than am [12]. W e recall the crucial defin itions. Definition 3.6 (Po lynomial equiv a lence relation [5]) A n e quivalenc e r elatio n R on Σ ∗ is c al le d a p olynomial equiv ale n ce relation if (1) ther e is an algorithm that given two strings x, y ∈ Σ ∗ de cides whether R ( x, y ) in ( | x | + | y | ) O (1) time; (2) for any finite set S ⊆ Σ ∗ the e quivalenc e r elation R p ar titions the elements of S into at most (max x ∈ S | x | ) O (1) classes. Definition 3.7 (Cross-comp osition [5]) L et L ⊆ Σ ∗ , and let Q ⊆ Σ ∗ × N b e a p ar ameterize d pr oblem. We say that L cross-composes into Q if ther e is a p olynomial e quivalenc e r elation R and an algorithm which, given t strings x 1 , x 2 , . . . x t b elonging to the same e quivalenc e class of R , c omputes an i nstanc e ( x ∗ , k ∗ ) ∈ Σ ∗ × N i n time p olynomial in P t i =1 | x i | such that (1) ( x ∗ , k ∗ ) ∈ Q i ff x i ∈ L for some 1 ≤ i ≤ t ; (2) k ∗ is b ounde d p olynomia l ly in max t i =1 | x i | + log t . Theorem 3.8 ([5], T he orem 9) If L ⊆ Σ ∗ is NP - har d under Karp r e- ductions and L cr oss-c omp oses into the p ar ameterize d pr oblem Q that has a p oly nomial kernel, then NP ⊆ c oNP / p oly. 12 W e apply Theorem 3.8, where as the language L we use Sa ving Al l But k Ver tices in trees of maximum degree three, w h ic h is NP-complete [1 0 ]. T o finish the p r o of of Theorem 3.5, we present a cross-comp osition algorithm. Lemma 3.9 The unp ar ameterize d version of the Sa ving All But k Ver - tices pr oblem on tr e es with maximum de gr e e thr e e cr oss-c omp oses to Sa v- ing All But k Ve r t ices on tr e es with maximum de gr e e four. Pro of: Observe th at an y p olynomial equiv alence relation is d efined on all w ords o v er the alphab et Σ and for this reason w e should also define how th e relation b eha ves on w ord s th at do not r ep resen t instances of the pr ob lem. F or the equiv alence relation R w e tak e a relation that p uts all malformed instances in to on e equiv alence class and all well- f orm ed instances are group ed according to the num b er of vertic es w e are allo wed to burn . If we are giv en m alformed instances, we simply output a trivial No - instance. Thus in the r est of the pr o of we assume we are giv en a sequence of instances ( T i , s i , k ) t i =1 of the F irefighter problem, where eac h T i is of maxim um degree three. O bserve that in all instances we hav e the same v alue of the parameter k . W.l.o.g. we assume that t = 2 h for some intege r h ≥ 1. Otherwise w e can dup licate an app ropriate num b er of instances ( T i , s i , k ). W e create a new tree T ′ as follo ws . Let T ′ b e a full binary tree with exactly t lea ves ro oted at a v ertex s ′ . No w for eac h i = 1 , . . . , t , we replace the i -th leaf of th e tree b y tree T i ro oted at s i . Finally , we set k ′ = k + h = k + log 2 t . Observe that sin ce eac h tree T i is of maxim u m d egree thr ee, the tree T ′ is of maximum degree fou r . T o prov e correctness, it is enough to sh ow that any strategy that minimizes the n u mb er of bu rned v ertices protec ts exactly one v ertex at eac h d epth 1 , . . . , h , wh ic h follo ws from Lemma 2.3. Hence in any strategy that minimizes the num b er of burn ed ve r tices, there will b e exactly one vertex s i whic h is on fir e after h round s. W e can obtain a similar result for the d ecision v arian t of Maximum k - Ver tex Pr ote ction . Theorem 3.10 Unless NP ⊆ c oNP / p oly, ther e is no p olynomial kernel for the k -Ver tex Protection pr oblem, even if the input gr aph is a tr e e o f maximum de gr e e four. Pro of: There are on ly t wo differences compared to the pro of for Sa ving All But k Ver tices . • F or the equiv alence relation R , we tak e a relation that pu ts all mal- formed instances into one equiv alence class, and all w ell-formed in- stances are group ed according to the num b er of v ertices of the tree, the parameter v alue k , and the v alue K . 13 • The v alue of k ′ for the tree T ′ is k + h , and the v alue of K ′ is equal to K + ( t − 1) n + ( t − h − 1), where n is the n umb er of vertices in eac h of the trees T i . The additional summands are d er ived fr om the fact that any optimal strategy will ensu re that after h rounds exactly one v ertex s i will b e on fire and hence we sa v e t − 1 subtrees r o oted at s i , eac h con taining n vertice s, and t − h − 1 vertic es of the fu ll binary tree. This completes th e pro of. 4 Op en Problems In this pap er, we refined and extended several p arameterized algorithmic and complexit y resu lts ab out different parameterizations of the Fire fighter problem. W e conclude with the follo w ing op en p roblems. • W e ha ve sho wn that Sa v ing k Ver tices is in FPT on graphs of b ound ed lo cal treewidth , and thus on planar graphs, b y sho wing that the problem is in FPT p arameterized b y k and th e treewidth of a graph. While Maximum k -Ver tex Protection is also in FPT pa- rameterized by k and the treewidth, we do not kno w if the problem is in FPT on planar graph s , and lea v e it as an op en pr oblem. • The Firefighter p roblem is solv able in sub exp on ential time on trees. Is it solv able in time 2 o ( n ) on n -v ertex planar graphs? Ev en the case of outerplanar graphs is op en. • Finally , w e do n ot know if an y of th e three parameterized versions of the problem is solv able in parameterized sub exp onenti al time 2 o ( k ) n O (1) on trees. Ac kno wledgement W e thank Leizhen Cai for p oin ting us to [14] and for sending us the full version of [6]. W e also ac kn o wledge the supp ort of Sc hloss Dagstuhl for Seminar 11071 (GRAST A 2011 - Theory an d Applications of Graph Searc hing P r oblems). Researc h of F edor F omin was su pp orted b y the Europ ean Researc h Council (ERC) grant Rigorous Th eory of Pr ep ro cessing, reference 267959 . References [1] Arnb org, S ., Lagergren, J., Seese, D.: Easy problems for tree- decomp osable graphs. J . Algorithms 12, 308–340 (199 1) [2] Bazgan, C., Ch op in , M., F ello ws, M.R.: Paramete r ized complexit y of the fir efigh ter problem. In: ISAAC (2011) 14 [3] Bo dlaend er , H .L.: A linear-time algo r ith m for fi nding tree- decomp ositions of small tr eewidth . S IAM J. Computing 25(6), 1305– 1317 (1996) [4] Bo dlaend er , H.L., Do wney , R.G., F ello ws, M.R., Hermelin, D.: On problems without p olynomial kernels. J. Compu t. Syst. S ci. 75(8), 423– 434 (2009) [5] Bo dlaend er , H.L., J ansen, B.M.P ., Kratsch, S.: Cross-comp osition: A new tec hn iqu e for kerneliza tion lo wer b ounds. CoRR abs/1011.42 24 (2010 ) [6] Cai, L., V erbin, E., Y ang, L.: Firefigh ting on tr ees: (1 -1/e)- appro ximation, fixed parameter tractabilit y and a sub exp onent ial al- gorithm. In: ISAA C. pp . 258–269 (2008) [7] Do w ney , R .G., F ello ws, M.R.: P arameterized complexit y . S pringer- V erlag, New Y ork (1999) [8] Ep pstein, D.: Diameter and treewidth in minor-closed graph families. Algorithmica 27(3), 275–29 1 (2000) [9] Finb o w, S., Hartn ell, B., Li, Q ., Sc hm eisser, K.: On minimizing the ef- fects of fir e or a virus on a net work. J. Com bin . Math. Com b in. C omput. 33, 311–322 (2000) [10] Finbow, S., King, A., MacGillivra y , G., Rizzi, R.: Th e firefigh ter pr ob- lem for graphs of maxim u m degree three. Discrete Math. 307(16 ), 2094– 2105 (2007) [11] Finbow, S., MacGillivra y , G.: The firefighte r problem: a survey of results, directions and questions. Aus tralas. J . Com b in. 43, 57–77 (2009) [12] F ortno w, L., San thanam, R.: Infeasibilit y of instance compression and succinct PCPs for NP. In : STOC 2008: Pro ceedings of the 40th Annual A CM Symp osium on Theory of Comp uting. pp. 133–1 42. A CM (2008) [13] MacGillivra y , G., W ang, P .: On the fi refigh ter p roblem. J. C om bin. Math. C om bin. Compu t. 47, 83–96 (2003) [14] Y ang, L.: Efficient Algorithms on T r ees. M. Phil thesis, Departmen t of Computer Science and E n gineering, The Chinese Universit y of Hong Kong (2009) 15
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment