1 Introduction

Bonato, Janssen, and Roshanbin [8, 9] introduced Graph Burning as a model of information spreading. This problem asks to burn all the vertices in a graph in the following way: we first pick a vertex and set fire to the vertex; at the beginning of each round, the fire spreads one step along edges; at the end of each round, we pick a vertex and set fire to it; the process finishes when all vertices are burned. The objective in the problem is to minimize the number of rounds (including the first round for just picking the first vertex) to burn all the vertices. The minimum number of rounds that can burn a graph G in such a process is the burning number of G, which is denoted by \(\mathsf {b}(G)\). Given a graph G and an integer k, Graph Burning asks whether \(\mathsf {b}(G) \le k\).

In other words, the burning number of G can be defined as the minimum length k of a sequence \((b_{0}, \dots , b_{k-1})\) of vertices of G such that every vertex in G has distance at most i from some \(b_{i}\). We call such a sequence a burning sequence. Note that in this definition, \(b_{i}\) is the vertex we set fire in the \((k-i)\)th round. It is also useful to introduce the generalized neighborhood of vertices. For a vertex v of a graph G, let \(N_{d}[v]\) be the set of vertices with distance at most d in G. For example, \(N_{0}[v]\) contains only v, \(N_{1}[v]\) is the closed neighborhood N[v] of v, and \(N_{2}[v] = \bigcup _{u \in N[v]} N[u]\). With this terminology, a sequence \((b_{0}, \dots , b_{k-1})\) of vertices of \(G = (V,E)\) is a burning sequence of \(G = (V,E)\) if and only if \(\bigcup _{0 \le i \le k-1}N_{i}[b_{i}] = V\).

Note that although Graph Burning is a recent concept, Alon [1] studied the same problem in 1992 as a message transmitting problem on hypercubes motivated by a practical application originated from Intel. Alon [1] showed that the n-dimensional hypercube has burning number \(\lceil n/2\rceil +1\). This line of research was followed by a few groups of authors [28, 30, 38] and primarily focused on highly symmetric networks.

1.1 Previous Work

As a model of information spreading, it is important to know how fast the information can spread under the model in the worst case. This question can be answered by finding the maximum burning number of graphs of n vertices. The literature is rich in this direction. In the very first papers [8, 9], it is shown that \(\mathsf {b}(G) \le 2 \lceil \sqrt{n} \rceil -1\) for every connected graph G of order n and conjectured that \(\mathsf {b}(G) \le \lceil \sqrt{n} \rceil \) holds. Note that the connectivity requirement is essential here as an edgeless graph of order n needs n rounds. Some improvements of the general upper bound and studies on special cases are done [3, 6, 7, 11, 15, 20, 27, 34,35,36,37, 39, 40, 45], but the conjecture of \(\mathsf {b}(G) \le \lceil \sqrt{n} \rceil \) for general connected graphs remains unsettled. The current best upper bound is \(\lceil (-3 + \sqrt{24n+ 33})/4 \rceil \approx \sqrt{1.5 n}\) [34].

The computational complexity of Graph Burning has been studied intensively as well. It is shown that Graph Burning is NP-complete on trees of maximum degree 3, spiders, and linear forests [2]. The NP-completeness result is further extended to connected caterpillars of maximum degree 3 [35], which form subclasses of connected interval graphs, connected permutation graphs, and connected unit disk graphs. On the other hand, Graph Burning admits a 3-approximation algorithm for general graphs [10], that is, given a graph G, the algorithm finds a burning sequence of G with length at most \(3 \cdot \mathsf {b}(G)\) in polynomial time. Recently, the problem has been shown to be APX-hard [41]. Algorithms with approximation factors parameterized by path-length and tree-length are known as well [31].

Kare and Reddy [32] initiated the study on parameterized complexity of Graph Burning. They showed that Graph Burning on connected graphs is fixed-parameter tractable parameterized by distance to cluster graphs and by neighborhood diversity. The parameterized complexity with respect to the natural parameter k, the burning number, remained open. Recently, Janssen [29] has generalized the problem to directed graphs and has shown that the directed version is W[2]-complete parameterized by k even on directed acyclic graphs. It was mentioned in [29] that the original undirected version parameterized by k was still open.

For further information about the previous studies, see the comprehensive survey by Bonato [5].

1.2 Our Results

In the literature, the input graph of Graph Burning is sometimes assumed to be connected (e.g. in [32]). In Graph Burning, the disconnected case would be nontrivially more complex than the connected case. For example, while the burning number of a path of n vertices is known to be \(\lceil \sqrt{n} \rceil \) [8, 9], Graph Burning is NP-complete on disjoint unions of paths [2]. In this paper, we do not assume the connectivity of input graphs. All positive results in this paper hold on possibly disconnected graphs, while all negative results hold even on connected graphs.

Our study in this paper is inspired by Kare and Reddy [32] and Janssen [29]. We generalize the results in [32] and solve all open problems on parameterized complexity in [32]. In Sect. 2, we present fixed-parameter algorithms. We show that Graph Burning is fixed-parameter tractable parameterized by clique-width plus the maximum diameter among all connected components. This implies that Graph Burning is fixed-parameter tractable parameterized by modular-width, by treedepth, and by distance to cographs. We also show that Graph Burning is fixed-parameter tractable parameterized by distance to split graphs. The complexity parameterized by distance to cographs and by distance to split graphs were explicitly asked in [32]. The fixed-parameter tractability parameterized by modular-width generalizes the one parameterized by neighborhood diversity in [32]. In Sect. 3, we present some negative results. We show that Graph Burning parameterized by the natural parameter k is W[2]-complete. This settles the main open problem in this line of research [29, 32]. As a byproduct, we also show that Graph Burning parameterized by vertex cover number does not admit a polynomial kernel unless \(\mathrm {NP} \subseteq \mathrm {coNP/poly}\). This also answers a question in [32]. Finally, in Sect. 4, we show that Graph Burning is in XP parameterized by the max leaf number and by the maximum diameter among all connected components. See Fig. 1 for a summary of the results.

Fig. 1
figure 1

Graph parameters and the complexity of Graph Burning. Our results in this paper are on the parameters with the dark background. Connections between two parameters imply the existence of a function in the one above (being in this sense more general) that lower-bounds the one below. “The maximum diameter of the components” is shortened as “max diameter”

We assume that the reader is familiar with the basic terms and concepts in the parameterized complexity theory. See some textbooks in the field (e.g., [14, 18]) for definitions. We omit the definitions of most of the graph parameters in this paper as we do not explicitly need them. We only need the definition of the vertex cover number of a graph: it is the minimum size of a vertex subset (called a vertex cover) such that each edge in the graph has at least one endpoint in the set. We refer the readers to [44] for the definitions of other graph parameters and the hierarchy among them.

2 Fixed-Parameter Tractability

We first observe that Graph Burning is expressible as a first order logic (FO) formula of length depending only on k.

The syntax of FO of graphs includes (i) the logical connectives \(\vee \), \(\wedge \), \(\lnot \), \(\Leftrightarrow \), \(\Rightarrow \), (ii) variables for vertices, (iii) the quantifiers \(\forall \) and \(\exists \) applicable to these variables, and (iv) the following binary relations: equality of variables, and \(\mathsf {adj}(u,v)\) for two vertex variables u and v, which means that u and v are adjacent. If G models an FO formula \(\varphi \) with no free variables, then we write \(G \models \varphi \).

The following formula \({\text {dist}}_{\le d}(v,w)\) is true if and only if the distance between v and w is at most d:

$$\begin{aligned} {\text {dist}}_{\le d}(v,w):= & {} \exists u_{0}, \dots , u_{d} \; (u_{0} = v) \wedge (u_{d} = w) \\&\wedge \left( \bigwedge _{0 \le i < d} (u_{i} = u_{i+1}) \vee \mathsf {adj}(u_{i},u_{i+1})\right) . \end{aligned}$$

Clearly, \({\text {dist}}_{\le d}(v,w)\) has length depending only on d. Now we define the formula \(\varphi _{k}\) such that \(G \models \varphi _{k}\) if and only if (Gk) is a yes instance of Graph Burning as follows:

$$\begin{aligned} \varphi _{k} :=\exists v_{0}, \dots , v_{k-1} \; \forall u \; \bigvee _{0 \le i \le k-1} {\text {dist}}_{\le i}(u, v_{i}). \end{aligned}$$

It is known that on nowhere dense graph classes, testing an FO formula \(\psi \) is fixed-parameter tractable parameterized by \(|\psi |\), where \(|\psi |\) is the length of \(\psi \) [25]. (See [25] for the definition of nowhere dense graph classes.) Since \(\varphi _{k}\) is an FO formula of length depending only on k, the following holds.

Observation 2.1

Graph Burning on nowhere dense graph classes parameterized by k is fixed-parameter tractable.

For an n-vertex graph G of clique-width at most \(\mathsf {cw}\) and for a one-sorted monadic-second order logic formula (an MSO\(_{1}\) formula, for short) \(\psi \), one can check whether \(G \models \psi \) in time \(O(f(|\psi |, \mathsf {cw}) \cdot n^{3})\), where f is a computable function [13, 43]. Since an FO formula is an MSO\(_{1}\) formula and the length of \(\varphi _{k}\) depends only on k, we can observe the following fact.

Observation 2.2

Graph Burning parameterized by \(\text {clique-width} + k\) is fixed-parameter tractable.

We extend this observation in a nontrivial way to show the main result of this section. To this end, it is useful to generalize \(\varphi _{k}\) as follows. For nonempty \(I = \{i_{1}, \dots , i_{|I|}\} \subseteq \{0, \dots , k-1\}\), let \(\varphi _{I}\) be a formula that means that there are vertices \(b_{i_{1}}, \dots , b_{i_{|I|}}\) such that \(\bigcup _{i_{j} \in I}N_{i_{j}}[b_{i_{j}}] = V\), which can be expressed as follows:

$$\begin{aligned} \varphi _{I} :=\exists v_{i_{1}}, \dots , v_{i_{|I|}} \; \forall u \; \bigvee _{1 \le j \le |I|} {\text {dist}}_{\le i_{j}}(u, v_{i_{j}}). \end{aligned}$$

Clearly, checking \(G \models \varphi _{I}\) is still fixed-parameter tractable parameterized by clique-width\({}+k\).

Theorem 2.3

Graph Burning is fixed-parameter tractable parameterized by clique-width plus the maximum diameter among all connected components.

Proof

Let (Gk) be an instance of Graph Burning, where G has n vertices. Let \(C_{1}, \dots , C_{p}\) be the connected components of G and \(d_{\max }\) be the maximum diameter of the components. We assume that \(k \ge p\) since otherwise (Gk) is a trivial no instance. By Observation 2.2, we can also assume that \(d_{\max } < k\).

Observe that if a component \(C_{q}\) contains \(b_{i}\) for some \(i \ge d_{\max }\), then \(N_{i}[b_{i}] = V(C_{q})\). Hence the problem is equivalent to finding a sequence \((b_{0}, \dots , b_{d_{\max }-1})\) that burns as many connected components as possible. That is, we want to find a maximum cardinality subset \(\mathcal {C} \subseteq \{C_{1}, \dots , C_{p}\}\) and a sequence \((b_{0}, \dots , b_{d_{\max }-1})\) such that \(\bigcup _{0 \le i \le d_{\max }-1} N_{i}[b_{i}] = \bigcup _{C_{q} \in \mathcal {C}} V(C_{q})\). It holds that \(p-|\mathcal {C}| \le k - d_{\max }\) if and only if (Gk) is a yes instance.

We reduce this problem to Disjoint Sets. Given a universe U, a subset family \(\mathcal {S} \subseteq 2^{U}\), and an integer t, Disjoint Sets asks whether there are t pairwise-disjoint subsets in \(\mathcal {S}\). Let \(U=\{0,1,\dots ,d_{\max }-1\} \cup \{c_{1}, \dots , c_{p}\}\) and \(\mathcal {S} = \{I \cup \{c_{q}\} \mid I \subseteq \{0,\dots ,d_{\max }-1\}, \; C_{q} \models \varphi _{I}, \; 1 \le q \le p\}\). Clearly, picking \(I \cup \{c_{q}\}\) into the solution for the Disjoint Set instance corresponds to burning \(C_{q}\) with \(\{b_{i} \mid i \in I\}\), and vice versa. We set \(t = p- k +d_{\max }\). Note that \(t \le d_{\max }\) as \(k \ge p\). Using the color-coding technique, it can be shown that Disjoint Sets is solvable in time \(2^{O(t \cdot \max _{S \in \mathcal {S}} |S|)} (|\mathcal {S}|+|U|)^{O(1)}\) [18, Disjoint r -Subsets] (see also [16, Bounded Rank Disjoint Sets]). In our instance, \(t \cdot \max _{S \in \mathcal {S}} |S| \le d_{\max }(d_{\max }+1)\) holds.

For each \(q \in \{1,\dots ,p\}\) and for each \(I \subseteq \{0,\dots ,d_{\max }-1\}\), we can test whether \(C_{q} \models \varphi _{I}\) in time \(O(f(d_{\max }+\mathsf {cw}) \cdot n^{3})\) for some computable function f, where \(\mathsf {cw}\) is the clique-width of G, because \(|\varphi _{I}|\) depends only on \(d_{\max }\). Thus, \(\mathcal {S}\) can be constructed in time \(O(f(d_{\max }+\mathsf {cw}) \cdot n^{3} \cdot p \cdot 2^{d_{\max }})\). Since \(|\mathcal {S}| \le 2^{d_{\max }} \cdot p\), the last step of solving Disjoint Sets can be done in time \(2^{O(d_{\max }^{2})} (2^{d_{\max }} \cdot p + (d_{\max }+p))^{O(1)}\). Since \(p \le n\), the total running time is \(g(d_{\max } + \mathsf {cw}) \cdot n^{O(1)}\) for some computable function g. This completes the proof. \(\square \)

The definition of modular-width [23] implies that every connected component of a graph of modular-width at most w has both diameter and clique-width at most w. It is known that every connected component of a graph of treedepth at most d has diameter at most \(2^{d}\) [42] and its clique-width is bounded by a function of treedepth (or even smaller treewidth) [12]. Therefore, Theorem 2.3 implies the fixed-parameter tractability with respect to these parameters.

Corollary 2.4

Graph Burning is fixed-parameter tractable parameterized by modular-width.

Corollary 2.5

Graph Burning is fixed-parameter tractable parameterized by treedepth.

For a graph class \(\mathcal {C}\) and a graph G, the distance from G to \(\mathcal {C}\) is defined as the minimum integer k such that by removing at most k vertices from G, one can obtain a member of \(\mathcal {C}\).

Let \(\mathcal {C}\) be a graph class with constants c and d such that each graph in \(\mathcal {C}\) has clique-width at most c and each connected component of each member of \(\mathcal {C}\) has diameter at most d. Observe that a graph of distance at most k to \(\mathcal {C}\) has clique-width at most \(c \cdot 2^{k}\) since after a removal of a single vertex, the clique-width remains at least half of the original clique-width [26]. Observe also that each connected component of a graph of distance at most k to \(\mathcal {C}\) has diameter less than \((k+1)(d+2)\). Thus, by Theorem 2.3, Graph Burning is fixed-parameter tractable parameterized by distance to \(\mathcal {C}\). This observation can be applied immediately to cographs that are known to be the \(P_{4}\)-free graphs and the graphs of clique-width at most 2.

Corollary 2.6

Graph Burning is fixed-parameter tractable parameterized by distance to cographs.

Now we consider the distance to split graphs. A graph is a split graph if its vertex set can be partitioned into a clique and an independent set. For a graph \(G = (V,E)\), which is not necessarily a split graph, a subset \(S \subseteq V\) is a split-deletion set if \(G - S\) is a split graph. Then the distance to split graphs from G is equal to the minimum size of a split-deletion set. It is known that the split graphs are exactly the \((2K_{2}, C_{4}, C_{5})\)-free graphs [21]. This characterization implies that when designing an algorithm parameterized by distance d to split graphs, we can assume that a split-deletion set of minimum size is given since a standard bounded-search tree algorithm finds such a set in time \(5^{d} \cdot n^{O(1)}\), where 5 is the maximum order of the forbidden induced subgraphs.

Theorem 2.7

Graph Burning is fixed-parameter tractable parameterized by distance to split graphs.

Proof

Let (Gk) be an instance of Graph Burning and S be a minimum split-deletion set of \(G = (V,E)\). We denote |S| by s. Let (KI) be a partition of \(V-S\), where K is a clique and I is an independent set. It is well known that such a partition can be found in linear time by greedily adding a vertex of minimum degree in \(G-S\) into I. We further partition I into three subsets \(I_{K}\), \(I_{S}\), \(I_{\emptyset }\) in such a way that \(I_{\emptyset }\) is the set of degree-0 vertices in G, \(I_{S}\) is the set of vertices in \(I \setminus I_{\emptyset }\) that have neighbors only in S, and \(I_{K} = I \setminus (I_{\emptyset } \cup I_{S})\). Note that each vertex in \(I_{S}\) has at least one neighbor in S and each vertex in \(I_{K}\) has at least one neighbor in K (and possibly some neighbors in S). See Fig. 2.

Fig. 2
figure 2

The partition of the vertex set in the proof of Theorem 2.7

First observe that if \(k \ge s + |I_{\emptyset }| + 3\), then (Gk) is a yes instance: take two vertices arbitrarily as \(b_{0}\) and \(b_{1}\), one vertex in K as \(b_{2}\), and all the vertices in \(S \cup I_{\emptyset }\) as the rest of a burning sequence. Hence, in the following, we assume that \(k < s + |I_{\emptyset }| + 3\).

We now reduce the number of vertices in \(I_{S}\). For a nonempty subset \(S' \subseteq S\), let \(J_{S'} \subseteq I_{S}\) be the set of vertices whose neighborhood is exactly \(S'\). Since the pairwise distance between vertices in \(J_{S'}\) is 2, a burning sequence does not need four or more vertices in \(J_{S'}\). Thus, we can remove all but three vertices in \(J_{S'}\) and obtain an equivalent instance. We apply this reduction to all subsets \(S' \subseteq S\) and denote the reduced subset of \(I_{S}\) by \(I^{*}_{S}\). Note that \(|I^{*}_{S}| < 3 \cdot 2^{|S|}\).

We then remove all vertices in \(I_{\emptyset }\) and obtain an equivalence instance of a slightly generalized problem. Observe that if (Gk) is a yes instance, then there is a burning sequence \((b_{0},\dots ,b_{k-1})\) of G such that the set of first \(|I_{\emptyset }|\) vertices \(\{b_{0}, \dots , b_{|I_{\emptyset }|-1}\}\) is \(I_{\emptyset }\): we need to take every isolated vertex into a burning sequence, but even \(b_{0}\) is good enough to burn an isolated vertex. Hence, the problem can be reduced to the one for finding a sequence \((b_{|I_{\emptyset }|}, b_{|I_{\emptyset }|+1},\dots ,b_{k-1})\) of vertices in \(V \setminus I_{\emptyset }\) such that \(\bigcup _{|I_{\emptyset }| \le i \le k-1} N_{i}[b_{i}] = V \setminus I_{\emptyset }\). We denote by \((G',k,|I_{\emptyset }|)\) the obtained instance of the new problem, where \(G' = G[K \cup S \cup I^{*}_{S}]\).

To solve the reduced problem, we first guess which vertices in \(S \cup I^{*}_{S}\) appear in \((b_{|I_{\emptyset }|}, b_{|I_{\emptyset }|+1},\dots ,b_{k-1})\) and where they are placed in the sequence. The number of candidates of such a guess depends only on s as \(|S \cup I^{*}_{S}|^{k-|I_{\emptyset }|} < (s+3\cdot 2^{s})^{s+3}\). The vacant slots of \((b_{|I_{\emptyset }|}, b_{|I_{\emptyset }|+1},\dots ,b_{k-1})\) after the guess tell us which \(b_{i}\) belongs to \(K \cup I_{K}\). If there are at most three vertices in \(K \cup I_{K}\) that appear in \((b_{|I_{\emptyset }|}, b_{|I_{\emptyset }|+1},\dots ,b_{k-1})\), then we try all \(O(n^{3})\) combinations to complete the sequence. Otherwise, we guess from O(n) candidates the vertex in \(K \cup I_{K}\) that appears in \((b_{|I_{\emptyset }|}, b_{|I_{\emptyset }|+1},\dots ,b_{k-1})\) and has the largest index. Since the index of the guessed vertex in \((b_{|I_{\emptyset }|}, b_{|I_{\emptyset }|+1},\dots ,b_{k-1})\) is at least 3 and \(K \cup I_{K}\) induces a connected split graph, which has diameter at most 3, the guessed vertex in \(K \cup I_{K}\) burns all vertices in \(K \cup I_{K}\).

Finally we fill the positions in \((b_{|I_{\emptyset }|}, b_{|I_{\emptyset }|+1},\dots ,b_{k-1})\) that still remain vacant. Let \(X \subseteq \{|I_{\emptyset }|, \dots , k-1\}\) be the set of indices i for which no vertex is guessed as \(b_{i}\) so far, and let \(\overline{X} = \{|I_{\emptyset }|, \dots , k-1\} \setminus X\). Let \(U = V(G') \setminus (\bigcup _{i \in \overline{X}} N_{i}[b_{i}])\). Note that \(U \subseteq S \cup I^{*}_{S}\). Our task is to find \(\{b_{i} \mid i \in X\} \subseteq K \cup I_{K}\) such that \(U \subseteq \bigcup _{i \in X} N_{i}[b_{i}]\). This task can be seen as an instance \((U', \mathcal {S}, p)\) of Set Cover, where \(U' = U \cup X\), \(\mathcal {S} = \{(N_{i}[v] \cap U) \cup \{i\} \mid v \in K \cup I_{K}, i \in X\}\), and \(p = |X|< k - |I_{\emptyset }| < s + 3\). Since Set Cover parameterized by \(|U'|\) is fixed-parameter tractable [22, Lemma 2] and \(|U'| \le s + 3 \cdot 2^{s} + p\), the theorem follows. \(\square \)

3 Fixed-Parameter Intractability

This section is devoted to the proofs of the following theorems.

Theorem 3.1

Graph Burning is \(\mathrm {W[2]}\)-complete parameterized by k.

Theorem 3.2

Graph Burning does not admit a polynomial kernel parameterized by vertex cover number unless \(\mathrm {NP} \subseteq \mathrm {coNP/poly}\).

We present a reduction from Set Cover to Graph Burning that proves both Theorems 3.1 and 3.2. Given a set \(U = \{u_{1}, \dots , u_{n}\}\), a family of nonempty subsets \(\mathcal {S} = \{S_{1}, \dots , S_{m}\} \subseteq 2^{U} \setminus \{\emptyset \}\), and a positive integer s, Set Cover asks whether there exists a subfamily \(\mathcal {S}' \subseteq \mathcal {S}\) such that \(|\mathcal {S}'| \le s\) and \(\bigcup _{S \in \mathcal {S}'} S = U\).

Let \((U = \{u_{1}, \dots , u_{n}\}, \mathcal {S} = \{S_{1}, \dots , S_{m}\}, s)\) be an instance of Set Cover. We construct an equivalent instance \((G, k = s+2)\) of Graph Burning. (See Fig. 3.) We first construct \(s = k-2\) isomorphic graphs \(G_{2}, \dots , G_{k-1}\) as follows. For each \(i \in \{2,3,\dots ,k-1\}\), the vertex set of \(G_{i}\) is \(U_{i} \cup V_{i}\), where \(U_{i} = \{u_{1}^{(i)}, \dots , u_{n}^{(i)}\}\) is a clique and \(V_{i} = \{v_{1}^{(i)}, \dots , v_{m}^{(i)}\}\) is an independent set. In \(G_{i}\), \(u_{p}^{(i)}\) and \(v_{q}^{(i)}\) are adjacent if and only if \(u_{p} \in S_{q}\). From each \(G_{i}\), we construct \(H_{i}\) by adding \(i+2\) copies of a path of i vertices and all possible edges between each vertex in \(V_{i}\) and one of the degree-1 vertices in each path. We then take the disjoint union of \(H_{2}, H_{3}, \dots , H_{k-1}\) and add U as a clique. For each \(i \in \{2,3,\dots ,k-1\}\) and \(j \in \{1,2,\dots ,m\}\), we connect \(u_{j}^{(i)}\) and \(u_{j}\) with a path of length \(i-1\) with \(i-2\) new inner vertices. Finally, we attach a vertex w to a vertex in U, and a path (xyz) to the same vertex. We set \(V_{0} = \{w\}\) and \(V_{1} = \{x,y,z\}\). We denote the constructed graph by G.

Fig. 3
figure 3

The reduction from Set Cover to Graph Burning. The edges in the cliques \(U_{2}, \dots , U_{k-1}\), and U are omitted

Lemma 3.3

\((U, \mathcal {S}, s)\) is a yes instance of Set Cover if and only if (Gk) is a yes instance of Graph Burning.

Proof

() Assume that \((U, \mathcal {S}, s)\) is a yes instance of Set Cover and \(\mathcal {S}' \subseteq \mathcal {S}\) is a certificate; that is, \(|\mathcal {S}'| \le s\) and \(\bigcup _{S \in \mathcal {S}'} S = U\). We assume without loss of generality that \(|\mathcal {S}'| = s\) and \(\mathcal {S}' = \{S_{2}, S_{3}, \dots , S_{s+1 = k-1}\}\). We set \(b_{0} = w\), \(b_{1} = y\), and \(b_{i} = v_{i}^{(i)}\) for \(2 \le i \le k-\)1. We show that \((b_{0}, \dots , b_{k-1})\) is a burning sequence of G.

Clearly, \(N_{0}[b_{0}] = V_{0}\) and \(N_{1}[b_{1}] = V_{1}\). For \(2 \le i \le k-1\), observe that \(N_{i}[b_{i}] = N_{i}[v_{i}^{(i)}]\) includes all the vertices of \(H_{i}\): the farthest vertices in i-vertex paths have distance exactly i from \(v_{i}^{(i)}\); \({\text {dist}}(v_{i}^{(i)}, v_{j}^{(i)}) = 2\) for each \(j \ne i\) as \(v_{j}^{(i)}\) and \(v_{i}^{(i)}\) share a neighbor (an endpoint of a path of i vertices); \({\text {dist}}(v_{i}^{(i)}, u_{j}^{(i)}) \le 2\) for every j since \(v_{i}^{(i)}\) has at least one neighbor in the clique \(U_{i}\) as \(\emptyset \notin \mathcal {S}\). Moreover, \(N_{i}[v_{i}^{(i)}]\) includes all inner vertices of the paths from \(U_{i}\) to U as \({\text {dist}}(v_{i}^{(i)}, u_{j}^{(i)}) \le 2\) for every j. Finally, \(u_{j} \in N_{i}[v_{i}^{(i)}]\) if and only if \(u_{j} \in S_{i}\): if \(u_{j} \in S_{i}\), then \(v_{i}^{(i)}\) and \(u_{j}^{(i)}\) are adjacent, and thus \({\text {dist}}(v_{i}^{(i)}, u_{j}) \le 1 + {\text {dist}}(u_{j}^{(i)}, u_{j}) = i\); otherwise, \(v_{i}^{(i)}\) and \(u_{j}^{(i)}\) are not adjacent and thus \({\text {dist}}(v_{i}^{(i)}, u_{j}) \ge 1 + {\text {dist}}(u_{h \ne j}^{(i)}, u_{j}) > i\). This implies that \(U \subseteq \bigcup _{2 \le i \le k-1} N_{i}[v_{i}^{(i)}]\) since \(\bigcup _{S \in \mathcal {S}'} S = U\).

() Assume that (Gk) is a yes instance of Graph Burning and \((b_{0}, \dots , b_{k-1})\) is a burning sequence of G.

We first show that \(b_{i} \in V_{i}\) for all \(0 \le i \le k-1\). Let \(i \in \{2,\dots ,k-1\}\). Assume that we already know that \(b_{j} \in V_{j}\) for \(i+1 \le j \le k-1\). Since there are \(i+2\) paths attached to \(V_{i}\), at least one of them, say P, has no vertex in the remaining vertices \(b_{0}, \dots , b_{i}\). The degree-1 vertex in P has distance exactly i from every vertex in \(V_{i}\) and distance at least \(i+1\) from every vertex not in \(V(P) \cup V_{i}\). Hence, \(b_{i} \in V_{i}\). Now we know that \(b_{i} \in V_{i}\) for \(2 \le i \le k-1\). Let \(u_{j} \in U\) be the vertex where \(V_{0}\) and \(V_{1}\) are attached to. For \(2 \le i \le k-1\), we have \({\text {dist}}(b_{i}, u_{j}) \ge i\), and thus \(N_{i}[b_{i}]\) contains no vertex in \(V_{0} \cup V_{1}\). Since \(b_{0}\) covers only \(b_{0}\) itself, \(b_{1} = y\) and \(b_{0} = w\) hold.

For \(2 \le i \le k-1\), let \(b_{i} = v_{h_{i}}^{(i)}\). Since \(N_{0}[b_{0}] = \{w\}\) and \(N_{1}[b_{1}] = \{x,y,z\}\), we have \(U \subseteq \bigcup _{2 \le i \le k-1} N_{i}[v_{h_{i}}^{(i)}]\). As we saw in the only-if case, \(u_{j} \in N_{i}[v_{h_{i}}^{(i)}]\) if and only if \(u_{j} \in S_{h_{i}}\) for \(1 \le j \le n\). This implies that \(N_{i}[v_{h_{i}}^{(i)}] \cap U = S_{h_{i}}\), and thus \(U = \bigcup _{2 \le i \le k-1} S_{h_{i}}\). Therefore, the subfamily \(\{S_{h_{2}}, S_{h_{3}}, \dots , S_{h_{k-1}}\} \subseteq \mathcal {S}\) of at most \(k-2 = s\) subsets shows that \((U, \mathcal {S}, s)\) is a yes-instance of Set Cover. \(\square \)

Proof (Theorem 3.1)

[Theorem 3.1] By Lemma 3.3, the construction of (Gk) from \((U,\mathcal {S},s)\) described above is a parameterized reduction from Set Cover parameterized by s to Graph Burning parameterized by \(k=s+2\). Since Set Cover is W[2]-complete parameterized by s [17], the W[2]-hardness follows.

The membership to W[2] can be shown by the following reduction to Set Cover. Let \((G = (V,E), k)\) be an instance of Graph Burning. We set \(s = k\), \(U = V \cup \{0, 1, \dots , k-1\}\), and \(\mathcal {S} = \{N_{i}[v] \cup \{i\} \mid v \in V, 0 \le i \le k-1\}\). This is just an undirected version of the proof by Janssen [29], who showed the membership to W[2] for Graph Burning on directed graphs, and the correctness can be shown in the same way. \(\square \)

Proof (Theorem 3.2)

[Theorem 3.2] The graph G constructed above has an independent set \(\bigcup _{i=2}^{k-1} V_{i}\). The vertices not belonging to this independent set form a vertex cover of size \(4 + (k-1)|U| + \sum _{2 \le i \le k-1} (i(i+2) + (i-2)|U|)\), which is a polynomial in \(k = s+2\) and |U|. By Lemma 3.3, the construction of (Gk) from \((U,\mathcal {S},s)\) described above is a polynomial parameter transformation [4] from Set Cover parameterized by \(|U| + s\) to Graph Burning parameterized by vertex cover number. Since Set Cover parameterized by \(|U| + s\) does not admit polynomial kernels unless \(\mathrm {NP} \subseteq \mathrm {coNP/poly}\) [16], the theorem holds. \(\square \)

The reduction above also shows the W[2]-hardness parameterized by diameter since the diameter of a connected graph is smaller than the square of its burning number [8, 9]. We further observe that the graph G in the reduction is \(P_{(4k-3)}\)-free. That is, G does not contain a path of \(4k-3\) vertices as an induced subgraph. Let P be an induced path in G. For \(i \in \{2,\dots ,k-1\}\), let \(H_{i}'\) be the graph consists of \(H_{i}\) and the paths from \(U_{i}\) to U. Since U is a clique, there are at most two indices i such that P intersects \(H_{i}' - U\). We can see that \(|V(P) \cap V(H_{i}')| \le 2i+1\) for each i, and thus \(|V(P)| \le 2(k-1)+1 + 2(k-2)+1 = 4k-4\). This implies the following \(\mathrm {W[2]}\)-hardness.

Corollary 3.4

Graph Burning on \(P_{q}\)-free graphs is \(\mathrm {W[2]}\)-hard parameterized by q.

4 XP Algorithms

To complete the picture of parameterized complexity of Graph Burning (Fig. 1), we present a couple of XP algorithms in this section. Recall that a parameterized problem is slice-wise polynomial (or XP, for short) if it admits an algorithm of running time \(O(n^{f(k)})\) for some computable function f, where n is the input size and k is the parameter.

We saw in the previous section that Graph Burning is W[2]-hard parameterized by the maximum diameter of the components. The following simple observation complements this fact by placing it into XP.

Observation 4.1

Graph Burning is XP parameterized by the maximum diameter among all connected components.

Proof

Let (Gk) be an instance of Graph Burning, n be the number of vertices in G, and \(d_{\max }\) be the maximum diameter of the components of G. As observed in the proof of Theorem 2.3, the problem is equivalent to finding a sequence \((b_{0}, \dots , b_{d_{\max }-1})\) that burns as many connected components as possible. We try all possible sequences of \(d_{\max }\) vertices in G and find the one that burns the maximum number of components. Since there are at most \(n^{d_{\max }}\) such sequences, this algorithm runs in time \(n^{O(d_{\max })}\). \(\square \)

We now turn to the main result of this section, which is on max leaf number. The max leaf number of a connected graph is the maximum integer \(\ell \) such that the graph has a spanning tree with \(\ell \) leaves. For disconnected graphs, the max leaf number is the sum of those of its connected components. It is known that the bandwidth of a graph is upper-bounded by the twice of its max leaf number [44]. Since Graph Burning is NP-complete already on caterpillars of maximum degree 3 [27, 35], which have bandwidth at most 2, it would be important to see how the problem changes its complexity when parameterized by max leaf number.

In the rest of this section, we show that the burning number of G can be computed in time \(n^{O(\ell ^2)}\), where \(\ell \) is the max leaf number of G, yielding that Graph Burning is XP parameterized by max leaf number.

Theorem 4.2

Graph Burning is XP parameterized by max leaf number.

Proof

Let (Gk) be an instance of Graph Burning, where \(G = (V,E)\) is an n-vertex graph of max leaf number \(\ell \). It is known that such a graph is a subdivision of a graph H with at most \(4\ell - 2\) vertices [19, 33]. Thus, the edge set E of G can be partitioned into edge-disjoint paths \(P_{1}, \dots , P_{p}\) with \(p \le \left( {\begin{array}{c}4\ell - 2\\ 2\end{array}}\right) \) such that for \(1 \le i \le p\), every internal vertex of \(P_{i}\) has degree exactly 2 in G. We call each end vertex of \(P_i\) a connection point. Note that such a partition with the minimum number of paths can be computed in polynomial time (while computing a spanning tree with \(\ell \) leaves is NP-hard [24]). Let \(\mathcal {P} = \{P_{1}, \dots , P_p\}\) be such a partition.

In the following, we assume that the burning number of G is at least \((4\ell - 2)(4\ell - 3)\) as otherwise we can compute \(\mathsf {b}(G)\) in time \(n^{O(\ell ^2)}\) by checking all possible burning sequences. For a burning sequence \(B = (b_{0}, \dots , b_{k - 1})\) of G, we call \(b_{i}\) the ith source of B for each \(0 \le i \le k - 1\).

Let \(B = (b_{0}, \dots , b_{k-1})\) be a burning sequence of G and let \(P = (v_{1}, \dots , v_{t})\) be a path in G whose internal vertices have degree exactly 2 in G. Assume that B contains at least one vertex \(v_{i'}\) of P as the ith source of B (i.e., \(b_{i} = v_{i'}\)). We say that \(b_i\) is left-effective for P (with respect to B) if for every \(v_{j'}\) contained in B as the jth source (i.e., \(b_{j} = v_{j'}\)), it holds that \(i - i' \ge j - j'\). Similarly, \(b_{i}\) is right-effective for P (with respect to B) if it satisfies \(i + i' \ge j + j'\) for any \(v_{j'}\) contained in B as the jth source (i.e., \(b_{j} = v_{j'}\)). Intuitively, if the fire starting at a vertex in P burns a vertex \(u \notin V(P)\), then at least one of the left- and right-effective vertices for P burns u as well. If P contains at least one vertex \(b_{i}\) in B, it also contains (possibly identical) left- and right-effective vertices with respect to B. Note that for a path P, there can be more than one left-effective vertices (and also right-effective vertices). Let x and y be (possibly identical) left- and right-effective vertices for P, respectively. Observe that for every vertex \(z \in (V(B) \cap V(P)) \setminus \{x, y\}\) and \(v \in V(G) \setminus V(P)\), if v is burned by z, then v is also burned by at least one of x and y. This simple observation plays a key role in the following discussion.

The idea of our algorithm is as follows. For each path \(P \in \mathcal {P}\), we guess at most two vertices of a burning sequence \(B = (b_0, \ldots , b_{k-1})\) for its left- and right-effective vertices. If these guesses are correct for B, the vertices “unburned” by the effective vertices induce a disjoint union of \(O(\ell ^{2})\) paths, and the remaining problem is easy to solve by dynamic programming.

To be precise, we first select a subset S of vertices of G such that for each \(P \in \mathcal {P}\), \(|V(P) \cap S| \le 2\). Clearly, we have \(|S| \le (4\ell - 2)(4\ell - 3)\) and hence the number of possible subsets is \(n^{O(\ell ^2)}\). For such S, we also consider an assignment to a burning sequence, which is defined by an injection \(\gamma \) from S to \(\{0, 1, \dots , k-1\}\). We say that \((S, \gamma )\) is correct for B if (1) for every \(P \in \mathcal {P}\) with \(V(P) \cap S \ne \emptyset \), S contains at least one left-effective vertices and at least one right-effective vertices for P, and (2) every vertex in S is left- or right-effective for some \(P \in \mathcal {P}\). The key to our XP algorithm is the following claim.

Claim

Let \(B = (b_{0}, \dots , b_{k-1})\) be a burning sequence of G, \(S \subseteq V(B)\), and \(\gamma :S \rightarrow \{0, 1, \dots , k -1\}\). If \((S, \gamma )\) is correct for B, then each component in \(G[V \setminus (\bigcup _{v \in S} N_{\gamma (v)}[v])]\) is a subpath of P for some \(P \in \mathcal {P}\) that has no connection points.

Proof

(Claim) We show that each connection point u is burned by some vertex in S under assignment \(\gamma \), that is, \(u \in \bigcup _{v \in S} N_{\gamma (v)}[v]\). Suppose to the contrary that \(u \notin \bigcup _{v \in S} N_{\gamma (v)}[v]\) for a connection point u on a path \(P \in \mathcal {P}\). As B is a burning sequence of G, there is \(b_{i} \in V(B)\) with \(u \in N_{i}[b_{i}]\). Let \(P' \in \mathcal {P}\) be the path containing \(b_{i}\). Then, S contains at least one left-effective vertex and at least one right-effective vertex for \(P'\). By the definition of effective vertices, at least one of them also burns u, contradicting to the choice of u. Thus, \(\bigcup _{v \in S} N_{\gamma (v)}[v]\) contains all connection points in G and hence each remaining component is a subpath of P. \(\square \)

The claim above ensures that if \((S, \gamma )\) is correct for a burning sequence \(B = (b_{0}, \dots , b_{k-1})\), then the set of the remaining vertices \(R :=V \setminus (\bigcup _{v \in S} N_{\gamma (v)}[v])\) induces a disjoint union of paths. Moreover, as \(|S \cap V(P)| \le 2\) for each \(P \in \mathcal {P}\), there are at most 3p paths in G[R]. Let \(\mathcal {R} = \{P'_{1}, \dots , P'_{p'}\}\) be the vertex-disjoint paths that form G[R]. The remaining task is to burn those paths by appropriately selecting the ith source of B for each \(i \in \{0, \dots , k - 1\} \setminus \{\gamma (v) \mid v \in S\}\). Since S contains left- and right-effective vertices for each path in \(\mathcal {P}\) (if they exist), the fire starting at a vertex on a path \(P \in \mathcal {R}\) does not spread to a vertex on another path \(P' \in \mathcal {R}\). Thus, we can assume that the ith source of B is selected from R for each \(i \in \{0, \dots , k - 1\} \setminus \{\gamma (v) \mid v \in S\}\).

To solve the remaining task, it suffices to give an algorithm that given a disjoint union of paths \(P_{1}, \dots , P_{t}\) and a set of indices \(I \subseteq \{0, \dots , k - 1\}\), decides if there is a set \(\{b_{i} \mid i \in I\}\) of |I| vertices such that \(\bigcup _{i \in I} N_{i}[b_{i}]\) covers all vertices in the paths. If such a covering exists, then we say that the pair \((I, \{P_{1}, \dots , P_{t}\})\) is feasible. For each \(1 \le i \le |I|\), we denote by \(q_{i}\) the ith smallest element in I and by \(I_{i}\) the set of smallest i elements in I, i.e., \(I_{i} = \{q_{1}, \dots , q_{i}\}\). For each \(1 \le i \le t\), let \(n_{i}\) be the number of vertices in \(P_{i}\). Let \(\mathcal {P} = \{P_{1}, \ldots , P_{t}\}\). Observe that \((I,\mathcal {P})\) is feasible if and only if so is \((I_{|I|-1}, \mathcal {P}_{i})\) for some \(i \in \{1,\dots ,t\}\), where \(\mathcal {P}_{i}\) is obtained from \(\mathcal {P}\) by replacing the path \(P_{i} \in \mathcal {P}\) with a path of \(n_{i} - 2q_{|I|} - 1\) vertices as \(b_{q_{|I|}}\) can cover \(2q_{|I|} + 1\) consecutive vertices in a path. (If \(n_{i} - 2q_{|I|} - 1 \le 0\), then we just remove \(P_{i}\).) This observation leads to the following dynamic programming algorithm. We compute \(\textsf {opt}(i; \ell _{1}, \dots , \ell _{t})\) that indicates whether \((I_{i}, \{P_{1}',\dots ,P_{t}'\})\) is feasible, where each \(P_{j}'\) is a path of \(\ell _{j}\) vertices. (We allow \(\ell _{j}\) to be nonpositive when \(P_{j}'\) is an empty graph with no vertex.) Clearly, \((I, \mathcal {P})\) is feasible if and only if \(\textsf {opt}(|I|; n_{1}, \dots , n_{t})\) is true. By the above observation, we have the following recurrence:

$$\begin{aligned} \textsf {opt}(0; \ell _{1}, \dots , \ell _{t})&= {\left\{ \begin{array}{ll} \text {true} &{} \text {if } \ell _{i} \le 0 \text { for all } 1 \le i \le t,\\ \text {false} &{} \text {otherwise}, \end{array}\right. } \\ \textsf {opt}(i; \ell _{1}, \dots , \ell _{t})&= \bigvee _{1 \le j \le t} \textsf {opt}(i-1; \ell _{1}, \ldots , \ell _{j-1}, \ell _{j} - 2q_i - 1, \ell _{j+1}, \ldots , \ell _{t}). \end{aligned}$$

We can evaluate this recurrence in time \(n^{O(\ell ^{2})}\) since \(\max _{1 \le i \le t} n_i \le n\) and \(t \in O(\ell ^{2})\). This completes the proof. \(\square \)

5 Conclusion

We studied the parameterized complexity of Graph Burning and presented an almost complete picture of the complexity hierarchy with respect to important structural parameters (see Fig. 1). One missing piece in the picture is the complexity of the problem parameterized by max leaf number. We showed that it is XP, but we do not know whether it is fixed-parameter tractable.

Another question is on approximation. It is known that Graph Burning admits a 3-approximation algorithm [10] but it is APX-hard [41]. It would be natural to ask whether it admits a better approximation.

Finally, we recall that the following conjecture is still open: “\(\mathsf {b}(G) \le \lceil \sqrt{n} \rceil \) for every connected n-vertex graph G.”