Skip to main content
PLOS One logoLink to PLOS One
. 2026 Feb 6;21(2):e0341222. doi: 10.1371/journal.pone.0341222

The Firefighter problem with dynamic defence costs

Ethan Hunter 1,*, Jessica Enright 1
Editor: Jan Rychtář2
PMCID: PMC12880756  PMID: 41650194

Abstract

The Firefighter Problem is a single-player game modelling the spread of a contagion (e.g. rumours, diseases) on a graph. The player’s objective is to defend vertices to protect at least a given number. This problem is computationally hard, but it can be solved efficiently on certain restricted classes of graph, such as complete graphs (in constant time) and graphs with path length at most 1 (in 𝒪((n+m)n2)-time).

We define The Cost Function Firefighter Problem, the first variant of the Firefighter problem that introduces vertex defence costs depending on time and game state. We show the Cost Function problem is computationally hard even for classes of trees on which the classic problem is tractable, but tractable on some very restricted graph classes (complete graphs, graphs of fixed bounded path length and trees under certain conditions). By expressing our variant in monadic second-order logic, we prove it is fixed-parameter tractable with respect to treewidth, budget, and maximum time step.

To complement theoretical findings, we undertake empirical investigation to compare performance of cost, threat and degree-based heuristics under various cost functions. We find that the relative effectiveness of these heuristics depends heavily on graph structure, with degree-based heuristics generally performing worse than state-based strategies. We show how these heuristics play out on both random and real-world interaction graphs.

1 Introduction

The Firefighter Problem (Fire) is a single-player, discrete-time game proposed by Hartnell [1] to model the spread of fire or other contagion in a graph. A Fire instance consists of: a target number of vertices to save, a graph, and a root vertex that serves as the initially burning vertex. Vertices inhabit one of three states at any given time: open, burning or defended (formalised in Definition 1). The objective is typically to maximise the number of vertices saved from burning. Many variants of Fire have been studied [2].

We describe a new variant called The Cost Function Firefighter Problem (which we simply call Cost-Fire). The key feature of Cost-Fire is the use of cost functions to assign defence costs to each vertex that (importantly!) can depend on time and the state of burning in the graph, thus introducing a dynamical aspect. The firefighter is assigned a budget to spend each turn on defending vertices, and may only defend a set of vertices whose costs sum to at most the budget in that turn.

Formally, a decision-problem instance of Cost-Fire consists of a graph G=(V,E) (which we formally define in Sect 3.1) with a vertex rV designated the root, a computable cost-function c that assigns a positive integer cost to each vertex (given a game state and time step), a budget b and a target k. The question is whether there exists a sequence of defences that obeys the budget at each time step while saving at least k vertices by the end of the game. An optimisation version would instead ask for the maximum number of vertices that could be saved with a given budget. For computational complexity purposes, the graph size, budget, and target are considered part of the instance size, with an oracle assumed for c.

1.1 Motivation

We have designed Cost-Fire to model population heterogeneity, such as variations in vaccine hesitancy. A recent survey by Pourrazavi et al. analysed 91 articles reporting COVID-19 vaccine uptake data, across several countries and programs, revealing an average hesitancy rate of 29.72% [3]. In Sect 5, we design cost functions with this rate to model individual inclination towards being defended for heuristic experiments.

1.2 Contribution and structure

We present related work on Fire in Sect 2 as foundation for the formal definition of the new Firefighter variant in Sect 3.3. Cost-Fire generalises Fire by introducing variable defence costs using cost functions that depend on time and the game state, and by imposing a per-turn defence budget. We distinguish between temporal and static cost functions, which do and do not depend upon time respectively, and explore examples of each in Sect 3.4. These cost functions can be used to model, for example, vaccine hesitancy, inclination towards personal protection, and individuals influencing those around them. In particular, we can design cost functions that model these behaviours evolving over time.

As a generalisation of Fire, Cost-Fire is clearly NP-hard (Theorem 3). Following common practice in Fire variant research [2], in Sect 4 we explore graph classes on which Cost-Fire can be efficiently solved to better understand the hardness of the problem. In Sect 4.1, we provide a reduction from a SAT variant to show that Cost-Fire remains hard on a highly symmetric sub-class of trees where Fire is tractable. We briefly prove that Cost-Fire on complete graphs admits an algorithm that is polynomial in graph size and explain why Fire admits a linear-time algorithm by similar reasoning in Sect 4.2. Then, in Sect 4.3, we prove that Cost-Fire is, like Fire, tractable on graphs with fixed maximum path length, yielding an immediate parametrised result for Cost-Fire.

With appropriate cost functions, we can re-couple the budget-degree relation, allowing extensions of a well-known strategy for Fire on trees of bounded degree [4]. This renders Cost-Fire tractable on such trees with these cost functions, as shown in Sect 4.4.

We summarise tractability and hardness results for Cost-Fire (and Fire for comparison) on the considered graph classes in Table 1.

Table 1. Comparison of tractability and hardness results for Fire and Cost-Fire for graphs on n vertices and m edges, maximum path length and budget b. Pathcontainable is defined in Sect 4.4.

Graph class FIRE COST-FIRE
Sea Fan O(n) (§ 4.1) NP-hard (§ 4.1)
Complete O(1) 𝒪(nlnn)4.2)
P-free O(n) [5] 𝒪((n+m)nb(2))4.3)
Tree NP-hard; O(n+m) if max. children is 2 [4] NP-hard; 𝒪(n+m) if Pathcontainable4.4)

In Sect 4.5, we use a result due to Courcelle [6] to show that Cost-Fire admits a fixed-parameter tractable algorithm by the sum of: the treewidth of the input graph, the budget and the maximum time step.

We present experimental data in Sect 5, the results of a custom Python script to simulate Cost-Fire on various cost functions and graphs to compare the performance of different heuristic defence strategies. These results show heuristic performance varying based on graph structure, particularly density. Notably, degree-based defence strategies frequently save the fewest median number of vertices, while threat- and cost-based heuristics perform similarly.

2 Related work

We use standard computational complexity notions throughout, including NP-hardness, associated reduction proof techniques and the parameterised complexity classes fixed-parameter tractable (FPT) and slicewise polynomial (XP). For the unfamiliar interested reader, we recommend the introductory text by Cormen et al. [7], or for an introduction to parametrised algorithmics the text by Cygan et al. [8]. A graph is a pair consisting of a set of vertices V and a binary operation on them E that defines the edges; we define required graph theoretic concepts in Sect 3.1.

2.1 The Firefighter problem

We recommend the comprehensive survey of the classic Firefighter problem by Finbow and MacGillivray [2]. As input for Fire, we require: a rooted graph (G=(V,E),rV) and an integer k. Throughout the game, each vertex inhabits one of the following game states at each turn.

Definition 1 (Fire problem states). All vertices except the root are initially open, meaning neither burning nor defended. Open vertices adjacent to burning vertices catch fire to become burning in the subsequent turn. Open vertices can be selected by the firefighter (player) to become defended, meaning they cannot catch nor transmit fire. Once burning or defended, a vertex remains so for the rest of the game.

A strategy for an instance of Fire is a sequence of vertices selected for defence, indexed by time of selection. An instance of Fire ends when fire is contained, i.e. when no open vertex is adjacent to a burning vertex. At this point, we declare all unburned vertices saved.

Firefighter (Fire) [2]

Instance: A rooted graph (G=(V,E),r) and an integer k1.
Question:
Is there a finite sequence of vertices d1,d2,,dt for some positive integer t|V| such that if fire breaks out at r then:
  • di is neither burning nor defended at time i,
  • at time t, fire is contained and at least k vertices saved by defending each di at time i?

Finbow et al. give a reduction from a variant of the Boolean Satisfiability Problem (SAT) to show that Fire is NP-hard even when restricted to trees of maximum degree three, although an algorithm that is polynomial in tree size exists when the root has degree 2 [4]. We rely on the hardness result for reductions and use the tractability result for comparison in Sect 4.4.

Theorem 1. Fire is NP-hard even when restricted to trees of maximum degree three [4].

2.1.1 Tractability.

There are several graph classes on which Fire is known to be resolvable in time polynomial in graph size. For example, Fire can be decided in constant time when the the root vertex is adjacent to every other vertex in the input graph (e.g. complete graphs). Intuitively, this is because we can save only one vertex before every remaining vertex is burned in the first turn, hence the question simplifies to asking whether k1. We prove a result using a similar observation for Cost-Fire on such graphs in Sect 4. Other graph classes on which Fire is known to be solvable in time polynomial in graph size include: graphs of maximum degree three rooted at a vertex of degree at most 2 [4]; k-caterpillars for fixed k [9]; Pk-free graphs for fixed k [5]; and several perfect graph subclasses (interval graphs, permutation graphs, split graphs and cographs) [5].

2.1.2 Approximation.

Various approaches have been considered for Fire with varying success, with many results restricted to Fire on rooted trees (T,r). An obvious first attempt on trees is to defend vertices greedily, choosing at each step the vertex v whose defence would save the greatest number of descendants Hartnell and Li show that this greedy algorithm produces a 1/2-approximation of Fire on trees [10]. Cai et al. [11] use a linear programming (LP) relaxation to produce a (11/e)-approximation algorithm for Fire on trees. This is known to be tight for LP-based rounding approximations [11].

For general input graphs, Anshelevich et al. show that Fire is not n(1ϵ)-approximable for any ϵ>0 unless P = NP [12].

2.1.3 Variants.

Fire can be generalised by permitting more than one vertex to be defended per turn - this variant is called The Budget Firefighter Problem (b-Fire). The number of vertices that can be defended is called the budget. Bazgan et al. [9] prove the following extension of Theorem 1 for b-Fire.

Theorem 2. b-Fire with fixed budget b is NP-hard even for trees of maximum degree b+2, but solvable in time polynomial in graph size on such trees when the root has degree at most b + 1 [9].

In Cost-Fire, we allow cost functions to depend on time, thereby introducing temporality to the problem by changing the problem state as a function of time. To our knowledge, the only other attempt at introducing explicit temporality to Fire is due to Hand et al. [13]. They define The Temporal Firefighter Problem (Temp-Fire), which is Fire played on temporal graphs, graphs whose edges only exist at certain times. The temporal aspect of Temp-Fire introduces complexity. For example, Fire is straightforwardly tractable on complete graphs [4], but Temp-Fire is NP-Hard on temporal graphs when the underlying graph is complete. This is also the case for trees and graphs of maximum degree three (or b+2 for budget b) when the root does not have maximum degree.

The Weighted Firefighter Problem (Weight-Fire) generalises Fire by assigning to each vertex a static weight value and the aim of the defender is to maximise the weights of the saved vertices - see work by Duffy and MacGillivray [14]. While both Weight-Fire and Cost-Fire introduce values associated with vertices, the weights in Weight-Fire represent values that we aim to maximise in our saved vertices rather than costs to defend. In contrast, in Cost-Fire, we aim to maximise the number of vertices saved, with their costs restricting how many we can save. Duffy and MacGillivray show that Weight-Fire is not only NP-hard for graphs of maximum degree b+2 when fire starts at a vertex of degree at most b+1 where b is the defence budget but it is NP-hard even for binary trees [14]. However, if weights are restricted to positive real numbers, Weight-Fire is polynomial-time solvable on binary trees [14].

3 Theoretical background

Our theoretical work uses tools of algorithmic graph theory: in this section, we briefly outline some of these tools, and then give the formal problem definition. We also provide basic graph theoretic definitions (predominantly following Wilson [15]) for background and to specify our notational choices.

3.1 Graph theoretic preliminaries

For our purposes, graphs are always undirected and unweighted, which is for simplicity. We provide a brief discussion of potential generalisations of our results in Sect 7.2.

Let G=(V,E) be a graph. A path between vi,vjV is a sequence of distinct edges ((vi,w1),(w1,w2),(wk1,wk),(wk,vj)) that join vi to vj. The number of edges on the shortest path between two vertices u,vV is called the distance between u and v, denoted dist(u,v) (if no such path exists, dist(u,v)=). For a vertex v in a graph, the neighbourhood of v, denoted N(v), is the set of vertices that share an edge with v. A rooted graph is a pair (G=(V,E),r) for which a vertex rV has been labelled the root. For a graph G=(V,E), a subgraph H=(VH,EH), denoted HG, is a graph on a vertex-set VHV and edge-set EHE such that (vi,vj)EH,vi,vjVH. An induced subgraph of a graph G=(V,E) is a subgraph H=(VH,EH) such that vi,vjVH, (vi,vj)E(vi,vj)EH. A graph G=(V,E) is connected if, for all vertices vi,vjV, there is a path between vi and vj. A tree is an undirected, connected graph with no cycles. The level of a vertex v in a rooted tree (T,r) is the minimum distance from r to v. In a rooted tree, a vertex v can have parents or children (or both): a vertex w adjacent to v is said to be a parent of v if dist(r,w)<dist(r,v) or a child of v if dist(r,w)>dist(r,v). A complete graph is a graph where each vertex is adjacent to every other vertex.

3.2 Theoretical methods

To show that Cost-Fire is NP-hard on general input graphs, in Sect 4 we use a reduction from Fire. This involves creating an instance A of Cost-Fire from an arbitrary instance B of Fire such that there is a polynomial-time transformation between A and B and A is a yes-instance if and only if B is a yes-instance. We use the same general technique in Sect 4.1, this time from an NP-hard variant of the Boolean Satisfiability problem, to show that Cost-Fire remains hard on a class of graph on which Fire is solvable in time polynomial in graph size. This is a gadget-based reduction.

Proceeding to tractability results, in Sects 4.2 and 4.3 we give straightforward algorithmic proofs that Cost-Fire is tractable on complete graphs and graphs of bounded path length respectively. In Sect 4.4, we define restrictions on cost functions to revive the degree-budget coupling observed by Finbow et al. [4] for b-Fire, leading to a related tractability result for Cost-Fire on trees of specified maximum degree. In Sect 4.5, we express Cost-Fire in extended monadic second-order logic (EMSO). In doing so, we benefit from an extension of a well-known result (Courcelle’s theorem) which means Cost-Fire is fixed-parameter tractable by the budget, maximum time step and the treewidth of the input graph.

3.3 Problem definition

To formally define Cost-Fire, we first formalise instances, strategies and cost functions. An instance of Cost-Fire is a tuple consisting of a rooted graph (G=(V,E),r), a cost function c mapping each vertex to an integer that can depend on time and game state, a budget b and a target k.

Definition 2 (Strategy with multiple defences per turn). For an instance of Cost-Fire with budget b on a rooted graph (G=(V,E),r), a strategy is a sequence of sets of vertices σ=({d11,d12,,d1p1},{d21,,d2p2},,{dt1,dtpt}) for some positive integer t|V|. Here, dij denotes the j-th vertex defended at time i and pi is the total number of vertices defended at time i.

For convenience, we denote by σi the set of vertices defended at time i.

E.g. 1. To illustrate this definition, consider an instance of Cost-Fire on the graph in Fig 1 with root labelled r, a cost function that defines the cost to defend all vertices as 1 in all turns, and a budget of 2.

Fig 1. Illustration of a strategy for an instance of Cost-Fire on the depicted graph on 9 vertices, rooted at r, where each vertex costs 1 to defend and a budget of 2 per turn is available.

Fig 1

In this instance, fire breaks out at r in the first turn. We then defend D and H, after which fire spreads to A and C. In turn 2, we defend B and in doing so contain the fire. Hence, the strategy denoted as per Definition 2 is σ=({D,H},{B}) (and saves 6 vertices).

To allow costs to vary according to the state of the problem, we define the following mapping and give an example to illustrate.

Definition 3 (State mapping). Let G be a graph on n vertices v1,v2,,vn. For an instance of Cost-Fire on G, given a strategy σ, let T denote the maximum set of times [0,|σ|] that the game could last, and define the state mapping

𝒮,σ:T{((v1,x1),(v2,x2),,(vn,xn))xi{burning,defended,open}}

as a function that, for a given instance, strategy played and time, returns the state of the game as a set of vertex-state pairs.

When the instance is unambiguous, we omit the subscript and write 𝒮σ, and similarly 𝒮 when both instance and strategy are clear.

E.g. 2. To illustrate Definition 3, we refer again to the instance of Cost-Fire that we depict in Fig 1, which we label . Let the graph be denoted G=(V,E). The state mapping for instance under the strategy σ=({D,H},{B}) is as follows.

S,σ(0)={(A,open),(B,open),(C,open),(D,open),(E,open),(F,open),(G,open),(H,open),(r,burning)}S,σ(1)={(A,burning),(B,open),(C,burning),(D,defended),(E,open),(F,open),(G,open),(H,defended),(r,burning)}S,σ(2)={(A,burning),(B,defended),(C,burning),(D,defended),(E,open),(F,open),(G,open),(H,defended),(r,burning)}

For convenience, denote by 𝔖 the set of all possible game states, which we illustrate with the following example.

E.g. 3. Consider an instance of Cost-Fire on a path on two vertices, u and v, rooted on u, with budget and costs such that we can implement a strategy σ=({v}) (that defends v at time 1). The state mapping 𝒮,σ at time 1 is 𝒮,σ(1)={(u,burning),(v,defended)}. Note that 𝔖 contains elements such as {(u,burning),(v,defended)} (which applies to this example) and {(u,burning),(v,burning)} (possible given no defence).

We are now equipped to formally define Cost-Fire.

Cost function firefighter (Cost-Fire)

Instance:
  • A rooted graph (G=(V,E),r),

  • a cost function c:V××𝔖, an oracle mapping each vV to an integer cost based on time and game state,

  • a budget b, and

  • an integer k1.

Question:
Is there a strategy σ (as in Definition 2) such that, if fire breaks out at r and we defend using σ:
  • for each σiσ:
    • – each dσi is open at time i–1, and
    • dσic(d,i,𝒮(i,σi1))b, and
  • at time |σ|, fire is contained and at least k vertices saved?

We define the cost function as an oracle because 𝔖 takes, in general, space exponential in the number of vertices to calculate. However, in practice we keep track only of the state of the game being played. This definition requires budgets and costs to be integers for simplicity - rationals could also be used and proofs would transfer subject to a multiplicative factor.

3.4 Examples of cost functions

Cost functions can depend on: vertex, problem state and turn. Different combinations of parameters are more appropriate for different contexts, so we explicitly characterise them as follows:

  • c(v) - static, depends only on the vertex,

  • c(v,t) - purely temporal, depends on vertex and turn,

  • c(v,𝒮) - purely state-dependent, depends on vertex and current problem state, and

  • c(v,𝒮,t) - temporally state-dependent, depending on vertex, problem state and turn.

Graph state driving changes in costs can model, for instance, individuals in an epidemic model being more easily convinced to seek a vaccination if a close contact is infected. Purely temporal functions can be used to model, for example, the effect of seasonality on a spreading infection. To build intuition, we give some example cost functions: for each, consider an instance of Cost-Fire on a rooted graph (G=(V,E),r) and a budget b.

E.g. 4 (Randomised individual preference). Let c:V be c(v)U[1,5], where U[1,5] indicates an integer sampled uniformly at random from the range [1,5].

This function assigns each vertex a uniformly random cost at the start of the problem, which does not change as the game progresses. In particular, this depends on neither time nor problem state, so it is clearly static.

For the next example, let fv,t denote the number of burning vertices in the neighbourhood of vV at time t.

E.g. 5 (Burning neighbours). Let c:V×𝔖 be

c(v,𝒮(t,{d11,,dtrt}))=max{bfv,t,1}.

This function sets the cost to defend any vertex as the budget b minus the number of burning neighbours that vertex has. In an epidemic context, this purely state-dependent function could model individuals more easily adopting preventative measures as more contacts become infected.

E.g. 6 (Distance from closest fire). We define c:V×𝔖 as

c(v,𝒮(t,{d11,,dtrt}))=min{dist(u,v)(u,burning)𝒮(t,{d11,,dtrt})}.

That is, the cost to defend each vertex is equal to the shortest distance to the closest burning vertex in the graph. This is another example of a purely state-dependent function. Because it calculates the distance from closest fire, this may be a computationally expensive function. Note that under this cost function, individuals only become defensible once fire is within a certain proximity.

E.g. 7 (Purely temporal example). Let c:V×[0,|V|] be a function that assigns costs to vertices based on time as:

c(v,t)={2  if 2t1  otherwise

This function could be used as a basic way of studying defence becoming more difficult seasonally - every second turn, defence is twice as expensive for all vertices. Since this is independent of problem state, this is a purely temporal function. We could combine this notion with example 6 to create a function that is both periodic and changes based on game state to define a temporally state-dependent cost function.

Various modelling dynamics can be easily represented using cost functions. For example, delay (modelling e.g. a given time required to deploy defence) can be modelled by assigning costs that exceed the available budget until a certain turn or game state has been reached. Further, uncertainty can be modelled using a stochastic function to determine the cost to defend, which can be used to represent incomplete or noisy information about the defensibility of individual vertices. We can also introduce feedback loops (modelling e.g. adaptive behaviour in a population) using cost functions that respond to the game state in previous turns.

4 Theoretical results

To place the hardness of Cost-Fire in the landscape of Fire and variants, we begin by proving the problem is NP-complete on general input graphs before showing that it remains hard on a class of highly symmetric trees where Fire is tractable. We then give some simple cases in which Cost-Fire is tractable.

Cost-Fire is a clear generalisation of Fire, so the following is not difficult to justify. For completeness, we give a simple reduction.

Theorem 3. Cost-Fire is NP-complete.

Proof: Consider an arbitrary instance of Fire and construct an instance of Cost-Fire with a cost function c:V such that for all vV, c(v)=1 and a budget b = 1. Clearly, this encodes Fire as an instance that is a yes-instance of Cost-Fire if and only if the original instance of Fire is a yes-instance, so Cost-Fire is NP-hard by reduction from Fire. It is not difficult to justify that a certificate composed of a strategy σ can be verified in time polynomial in the size of the instance. □

4.1 Sea Fan graphs

Sea Fan graphs are highly symmetric, sparse trees on which we show Cost-Fire remains NP-hard but Fire can be solved in time polynomial in the size of the tree.

Definition 4 (Sea Fan). A rooted tree (F,r) is an (f,)–Sea Fan graph if F {r} is a forest of f isomorphic trees called fronds, each composed of a path denoted P of length and two vertices adjacent to the terminal vertex not adjacent to r in F.

We reduce from the 2N2P-SAT problem, a variant of 3-SAT, to show that Cost-Fire is computationally hard on Sea Fan graphs by reduction. Berman et al. (referring to it as the (3,2B)-SAT problem) show this problem is NP-complete [16].

2N2P-SAT

Instance:

A set of n variables 𝒱={v1,,vn} arranged into a logical formula such that:
  • is in conjunctive normal form,
  • each clause of contains exactly 3 literals, and
  • each variable in 𝒱 appears in exactly twice as a positive literal and twice as a negative literal.
Question: Is there a truth assignment for 𝒱 that satisfies ?

Theorem 4. Cost-Fire is NP-complete on (f,)Sea Fan graphs rooted at a vertex r.

Proof: We reduce from 2N2P-SAT: take as given an 2N2P-SAT instance ϕ of n variables in m clauses and let

𝒱=(v1,v2,,vn),𝒞=(C1,C2,,Cm)

be lexicographic orderings of the variables and clauses of ϕ respectively. Because each variable appears in the logical expression 4 times, and each clause contains 3 literals, m = 4n/3 (as observed by Berman et al. [16]). Create an instance of Cost-Fire on a (2n,n+2m)-Sea Fan denoted (F,r) (as in Fig 2) with vertices labelled as follows.

Fig 2. Construction of a (2n, n + 2m)-Sea Fan graph used in the reduction in the proof of Theorem 4; vertex labels correspond to variables and clauses in the 2N2P-SAT instance.

Fig 2

  1. For each variable vi𝒱 for 1in, select vertices to label with the positive and negative literals of vi respectively (called the ‘literal vertices’):
    • (a) the vertex in V(F) on the path Pi at distance n + 2m from r is labelled vi+;
    • (b) the vertex at distance n + 2m from r on path Pn + i is labelled vi.
  2. For each literal vertex, label its two neighbours of degree one Cj and Ck (the ‘clause vertices’), the clauses in 𝒞 in which the literal appears.

Let the target be k=n+3m, the budget be b = 2 and over the set of times T=[1,n+m] let the cost function c:V×T be

c(u,t)={2if u=vt+ or vt,1if u=Ctn,3otherwise.

Intuitively, this function ensures that one literal vertex for each variable can be defended at each time step up to n, and two clause vertices for each clause at each time step from n+1 to n+m. For all three clause vertices labelled Cj to be saved, at least one vertex labelled with a literal in Cj must have been defended.

We now show that, if ϕ is a yes-instance, our instance of Cost-Fire is also a yes-instance. Given a satisfying truth assignment for ϕ, let be the set of satisfied literals. We deploy strategy σ for the instance of Cost-Fire as follows. From time 1 to n, we defend the vertices corresponding to satisfied literals in . Since ϕ is satisfying, at least one of each set of three clause vertices is protected by time n, meaning n+2n vertices are protected so far. At each time n<jn+m, defend the (up to) two vertices labelled Cjn not yet protected - there is only one to defend for clauses that contain the same literal twice, otherwise two. Saving these remaining clause vertices completes protection of all clause vertices for each clause in 𝒞. Since there are n undefended literals, and we have a satisfying truth assignment, 2n clause vertices have been directly defended in this phase. Recalling that m = 4n/3, in total n+2n+2n=n+4(3m/4)=n+3m=k vertices have been saved.

To argue the opposite direction, we assume a ‘yes’ instance of Cost-Fire on the constructed Sea Fan graph with strategy σ. By cost function design, σ saves n literal vertices and 3m clause vertices, 2n of which by direct defence. Therefore, to save n+3m vertices, for every clause, at least one clause vertex is protected by defending a literal parent vertex. By cost function design, only one literal per variable can be defended. Hence, interpreting the literal vertices of σ as truth values gives a satisfying assignment.

Having reduced from 2N2P-SAT, we have shown Cost-Fire is NP-hard. Verifying a certificate for any instance of Cost-Fire can be done in time polynomial in the size of the certificate by Theorem 3, hence Cost-Fire is NP-complete on (f,)-Sea Fan graphs rooted at r. □

In contrast, we find that Fire is polynomial-time resolvable on this same graph class.

Theorem 5. Fire is decidable in polynomial time on (f,)-Sea Fan graphs when the fire starts at the root vertex.

Proof: There exists an optimal strategy that always defends adjacent to burning vertices for instances of Fire on trees [17]. On a Sea Fan graph, if we defend adjacent to fire on a frond, fire is contained in this frond. Because of the symmetry of the fronds, all defence choices adjacent to the fire on a frond will give an equivalent game state. Thus, there is an optimal defence that defends an open vertex adjacent to a burning vertex at each time, unless no such vertex exists in which case the process is over. Then, at each time t an optimal strategy defends a vertex at distance t until the end of the process. We depict an example of this strategy in Fig 3. This can be simulated in polynomial time, and thus Fire can be decided efficiently on an (f,)-Sea Fan graphs when the fire starts at the root vertex.

Fig 3. Illustration of the strategy used in the proof of Theorem 5 (to show that Fire on an (f, )-Sea Fan graph is tractable).

Fig 3

Open vertices are unfilled, burning are filled in red and defended are filled black.

In our first defence, we save vertices on the path of the first frond and 2 vertices attached to the end of the path (so +2 overall). In the next turn, we defend +1 and so on. In the case of f, we defend f+3 on the final turn before fire is contained (e.g. at time , we defend a vertex at the end of a path, saving three vertices). Using this, when f, we save:

f+3+2i=f/2(2+5f).

If fire is not contained by turn +1 (that is, f>), we defend one vertex of degree one. After this, any remaining fronds are completely burned. So, in the case of f>, we save

(+2)+(+1)+4+3+1=3+2i=/2(+5)+1.

Hence, an instance of Fire on a (f,)-Sea Fan is a yes-instance if and only if:

k{f/2(2+5f)if f,/2(+5)+1if f>.

4.2 Complete graphs

We show that Cost-Fire is solvable on complete graphs, on which solving Fire is tractable [4] but solving Temp-Fire remains NP-hard [13].

Theorem 6. Instances of Cost-Fire on complete graphs on n vertices are solvable in 𝒪(nlnn) time

Proof: Consider an instance of Cost-Fire on a rooted complete graph (K=(V,E),r). At time 0, fire breaks out at r and every vertex becomes adjacent to a burning vertex, meaning any vertex not defended in the first turn will burn by the second. To maximise the number of vertices saved, we sort all vertices by cost at this time in 𝒪(nlnn)-time and defend in order of increasing cost (in 𝒪(n) time) until no other vertex can be defended without exceeding the budget. Hence, we can solve Cost-Fire on complete graphs in 𝒪(nlnn) time overall. □

Observe that this result holds for any graph in which the root is adjacent to all other vertices (e.g. star graphs rooted at the central node), of which complete graphs are an example.

4.3 Graphs of bounded path length

We say a graph is P-free if it contains induced paths of maximum length 1 (this class is usually called Pk-free, but k is already a variable in Fire); we take to be constant. Fire on P-free graphs on n vertices is solvable in 𝒪(n) time [5]. We show that Cost-Fire on this graph class is also tractable for fixed budget b and maximum path length .

Theorem 7. Instances of Cost-Fire with budget b on P-free graphs with n vertices and m edges can be solved in 𝒪((n+m)nb(2)) time.

Proof: Observe that the length of the longest path bounds the lifetime of the instance, which is 2 for instances on P-free graphs. Thus, a valid strategy can defend up to b(2) vertices (when all vertices defended cost 1, we can defend at most b vertices per turn). We generate potential defence sequences by enumerating sequences of distinct vertices of lengths up to b(2) in 𝒪(nb(2)) time. We simulate defence for each of these sequences as follows. For each turn, we obtain the cost of each vertex in the sequence (given the current problem state) and greedily defend until either all vertices in the sequence are defended or no more can be defended without exceeding the budget. We then validate the outcome by performing a depth-first search from r in 𝒪(n+m) time to count all unburned (defended and open) vertices at containment of fire. We return a yes-answer if and only if there are at least k such vertices. This algorithm runs in 𝒪((n+m)nb(2)) time. □

A problem with input parameter k that can be solved by an algorithm that runs in time nf(k) for input size n and a computable function f is said to be in XP, meaning slicewise polynomial. We provide such an algorithm to prove Theorem 7 that solves Cost-Fire and is parameterised by the length of the longest path and the budget, leading to the following corollary. We prove a stronger result in Sect 4.5.

Corollary 1. Cost-Fire on graphs of maximum path length is in XP when parameterised by and the budget.

Notable examples of P-free graphs include cographs and split graphs; cographs are P4-free and split graphs are P5-free, so - similarly to Fire [5] - this theorem implies the existence of algorithms for solving Cost-Fire with budget b on cographs and split graphs on n vertices, in particular, that run in 𝒪((n+m)n2b) and 𝒪((n+m)n3b) time respectively, although we conjecture that more efficient algorithms exist.

4.4 Trees

A natural question is whether there exists a generalisation of Theorem 2 for Cost-Fire. For instances of b-Fire on a rooted tree in which each vertex has at most b+1 children, there is an optimal strategy in which burning is restricted to a shortest path from the root to a vertex of degree b+1 [9]. This is a generalisation of the well-known strategy to show that Fire on trees where vertices have at most two children is tractable [4].

While Cost-Fire is not tractable on rooted trees in which each vertex has at most b + 1 children in general (which follows from Theorem 9 below), we define properties to re-couple the relationship between degree and budget that exists in Fire, and made explicit in b-Fire, to make Cost-Fire with these properties tractable on such trees. We refer to instances that possess this set of properties as Pathcontainable; the Pathcontainable property captures a restrictive but intuitive class of Cost-Fire instances in which we can achieve optimal containment by restricting the spread of fire to a single path in a tree, hence the term Pathcontainable. In particular, we find the shortest path to a leaf vertex (or a vertex with degree less than the maximum), inspired by the famous strategy previously mentioned [4]. This approximates real-world processes, such as in wildfire control where firefighters construct barriers just ahead of the fire line, or in epidemiological interventions that prioritise vaccinating individuals directly exposed to an infected contact.

Definition 5 (Pathcontainable instance of Cost-Fire). Let (T,r) be a rooted tree, k and b be positive integers and c be a cost function. An instance of Cost-Fire is Pathcontainable if:

  1. For any open (unburned and undefended) vertex u of T adjacent to a burning vertex and any open vertex w not adjacent to a burning vertex, c(u)c(w).

  2. For any burning vertex v with x open neighbours, we have sufficient budget to defend any subset of x–1 of them.

Importantly, this definition is independent of strategy played, and so is very restrictive. Nonetheless, there are several intuitive, state-dependent cost functions that are natural in common applications of Fire and variants (e.g. disease modelling) that are Pathcontainable. For instance, the functions in examples 5 and 6, which are related to proximity to fire, with an appropriate choice of budget.

We now prove that solving Pathcontainable instances of Cost-Fire is tractable, even on state-dependent and temporal cost functions, using an approach inspired by Fomin et al. [5].

Lemma 1. For Pathcontainable inputs of Cost-Fire, there is an optimal solution in which each defended vertex is adjacent to a burning vertex when defended.

Proof: This is trivial when we can defend all children of the root as the first defence, as the process would then end. Hence, assume that the budget and cost function are such that we can defend precisely all-but-one children of the root. Suppose for a contradiction that there is no optimal solution in which all defended vertices were adjacent to a burning vertex when defended and let (T,r) be a graph with fewest vertices for which this is the case and thus a minimal counterexample.

Suppose there is an optimal strategy σ in which the vertices defended on the first turn are all neighbours of r, labelled x1,,xΔ2. Then, the rooted subgraph T[xΔ1] is a smaller counterexample, a contradiction. Hence, we assume the set of vertices defended by σ in the first turn includes at least one vertex v not adjacent to the burning root. At the time of the first defence, the ancestor u of v adjacent to the burning root is either defended or open. If u is defended in the first turn, it is unnecessary to then defend v, so σ is not optimal; if u is open, defending it rather than v would save at least one more vertex and neither u nor v catch fire. Thus, in both cases, a strategy that defends beside fire performs at least as well, a contradiction. □

Given an instance of Cost-Fire on a tree, we call a vertex defensible with respect to a strategy σ in a certain turn if we can defend all of its open neighbours in that turn.

Lemma 2. For Pathcontainable inputs of Cost-Fire, there exists an optimal solution in which only a path of minimum length to a defensible vertex burns.

Proof: By Lemma 1, there is an optimal strategy in which each vertex defended was adjacent to a burning vertex when defended. Given the input restrictions, we can defend any set of all-but-one children of a burning vertex, so clearly at most one vertex burns at each level of the tree. Since the parent of every burning vertex is burning, the burning vertices induce a path in the tree. □

Theorem 8. We can decide Pathcontainable inputs of Cost-Fire on trees with n vertices and m edges in 𝒪(n+m) time.

Proof: For Pathcontainable inputs of Cost-Fire, by Lemma 2 there exists an optimal solution that only burns a path. We can use an adapted breadth-first search to find the shortest path to a closest defensible vertex v in the graph in time 𝒪(n+m) and then simulate the instance with the strategy of burning this path in at most n turns. □

An obvious question is whether both Pathcontainable properties are required for tractability. The following gives us that property 1 alone is not sufficient, whether 2 alone is sufficient we leave open.

Theorem 9. Solving instances of Cost-Fire on rooted trees (T=(V,E),r) that satisfy Pathcontainable property 1 but not 2 is NP-complete.

Proof: Consider an arbitrary instance of b-Fire on a budget b, a rooted tree (T=(V,E),r) of maximum degree b+2 such that deg(r)=b+2 and an integer k - solving this is know to be NP-complete [18]. We construct an instance of Cost-Fire with budget b, rooted tree (T,r) and integer k and a cost function that assigns a cost of one to all vertices. This clearly encodes instances of b-Fire as an instance of Cost-Fire, showing that solving such instances of Cost-Fire is NP-hard. To show this encoding satisfies Pathcontainable property 1 and not 2, first observe that Pathcontainable property 1 is clearly satisfied as all costs are one. Note that the root is of degree b+2 and we can defend up to b vertices per turn, so we can defend all-but-two vertices adjacent to the root when it burns, meaning Pathcontainable property 2 is not satisfied. Verification of the certificate in time polynomial in the size of the instance is straightforward. Hence, Cost-Fire on such restricted inputs is also NP-complete. □

4.5 Parameterised tractability

A problem is fixed parameter tractable (FPT) with respect to a parameter k if it can be solved by an algorithm with running time f(k)n𝒪(1), where f is a computable function and n is the size of the input. Compare this to the class of slice-wise polynomial problems (XP) referenced in Sect 4.3, which are problems that admit algorithms that run in time nf(k). Corollary 1 states that Cost-Fire on static cost functions is in XP parameterised by the length of the longest path and budget. Using a result due to Arnborg et al. [19] and inspired by Bazgan et al. [20], we express Cost-Fire in a variant of Monadic Second-Order logic (MSO) to prove it is FPT by the sum of treewidth, budget and problem lifetime.

MSO is the fragment of second-order logic produced by limiting second-order quantification to monadic (single argument) predicates. This system permits: variables for (sets of) vertices and (sets of) edges; the usual logical connectives ¬,,, and ; quantifiers and ; and well-formulated predicates. We use an extension of MSO called Extended MSO (EMSO), which allows us to count the size of sets that are quantified by second-order variables.

We rely on the following generalisation from MSO to EMSO of Courcelle’s Theorem [6] due to Arnborg et al. [19]. A more general version of the following was presented in a survey by Langer et al. [21].

Theorem 10. [19] Let P be an EMSO-definable problem. We can solve P on graphs G=(V,E) of order n=|V| with treewidth at most w in time 𝒪(fP(w)·n).

To use this theorem, we produce a EMSO expression for Cost-Fire with size that is a function of budget and maximum time step, thereby showing Cost-Fire is in FPT parameterised by these and the treewidth of the input graph.

Theorem 11. Cost-Fire is in FPT when parameterised by budget, maximum time step and treewidth of the input graph.

Proof: Consider an arbitrary instance of Cost-Fire on a rooted graph (G=(V,E),r), cost function c and positive integer budget b, with maximum time step T. Let σ be a strategy, a sequence of vertices ordered by defence, up to time T. Denote by σi the vertices defended up to time i. Denote by Fi the set of vertices burning at time i under this strategy.

We define the following generalisations of predicates defined by Bazgan et al. [20]. NextToBurn returns true when, given σi and Fi−1, the defended vertices up to i and burning vertices up to time i, Fi contains the previously burning vertices and those that catch fire at time i. For this, we define a predicate A:V×V{true,false} such that u,vV, A(u,v)=true if and only if u and v are adjacent in G.

NextToBurn(Fi1,Fi,ςi):=vV,vFivFi1uV(uFi1A(u,v)vςi)

The next predicate evaluates to true when all vertices in a set S are ‘saved’ at the end of the process under a strategy σ, i.e. no vertex in S is burning and each neighbour of each vertex in S is either saved or defended.

Saved(S,FT,σ):=uV(uS(uFTvV(A(u,v)vSσ)))

Since the process ends when fire can no longer spread, this is sufficient to verify that fire cannot spread to the vertices in this set.

The final predicate ensures that σ is a valid defence strategy.

ValidStrat(b,σ):=(1iTj=1ric(dij,i,SV,i)b)1iT1jri((1ki1rk(i=kj=)(dijdk))(dijFi))σiσ(vσivFT(vσic(v,i,SV,i)b)τσ(dσidτdd))

Using these predicates, we can express Cost-Fire in EMSO.

CostFire(k,b):=σF0,,FT,S,uV,(uF0u=r)1iTNextToBurn(Fi1,Fi,σ)ValidStrat(b,σ)Saved(S,FT,σ)(|S|k)

Since we have expressed an arbitrary instance of Cost-Fire in EMSO, and this expression is clearly of constant length, by Theorem 10, Cost-Fire is in FPT when parameterised by the treewidth of G, the budget b and by the maximum time step. □

5 Experimental methods

Motivated by the formal hardness of Cost-Fire and an interest in the behaviour of the game in practice, we investigate the problem empirically. We report on the number of vertices saved by different heuristics on various cost functions and budgets on random and real-world derived graphs. Graphs were chosen for a range of metrics and thus potential modelling applications.

We wrote a Python script to simulate, analyse and store results of instances of Cost-Fire on given graph types, which is available at https://github.com/Ethan-CS/CostFnFire. The script can be used with random graphs generated with the Networkx library [22] or with graphs from data files.

Heuristics iteratively select vertices for defence each turn, until either the sum of the costs of the selected vertices meets the budget limit or no remaining open vertex can be defended within the remaining budget. We implemented four heuristics for comparison; each was evaluated alone and with the two other non-random strategies to break ties in turn in cases where more than one vertex could be selected by the primary heuristic. The heuristic defence strategies implemented are:

  1. Random - select vertices randomly,

  2. Degree - defend in order of highest to lowest vertex degree,

  3. Threat - defend in order of least to greatest distance from fire, and

  4. Cost - defend in order of least to greatest cost.

Importantly, these heuristics have no guarantees of optimality, but are common in simulation approaches to firefighter problems - see e.g. work by García-Martínez et al. [23].

The cost functions recalculate costs for each vertex at the start of every turn. We implemented the following functions:

  1. Uniform: all vertices cost 1 at all times.

  2. Binary hesitation: vertices cost 2 with probability 0.297, 1 otherwise (to mirror the vaccine hesitancy rate found by Pourrazavi et al. [3]).

  3. Uniformly random: costs uniformly randomly sampled from the range [1,5]

  4. Threat with high stochasticity: distance from fire plus an integer sampled uniformly randomly from [–3,3].

  5. Threat with low stochasticity: distance from fire plus an integer sampled uniformly randomly from [–1,1]

For very dense graphs, threat is very likely to be high for a given vertex (i.e. distance from fire is generally low). Since we define cost functions so that costs are always strictly greater than 0, in the high stochastic case (an added integer uniformly sampled from [–3,3]) we expect costs to be low. Thus, on dense graphs, we expect heuristics to perform similarly with uniform and highly-stochastic threat-based cost functions.

For each graph, and for various budgets, we plot the average (median) of 50 trials with an envelope (shaded area) representing the 95% confidence interval from this average. For each random graph class, we select one results plot to present in each section, with others provided in supplementary information as they are qualitatively similar. We detail the graphs used for experiments in Sect 5.2 and results obtained in Sect 6.

5.1 Experimental design

We generate 50 trials, each a combination of: a graph type, a cost function and an heuristic strategy. In the case of random graphs, we generate a new graph on 100 vertices and a range of generation parameters for each trial; we use the same graph to assess each cost function-heuristic pair. The outbreak vertex was selected randomly for each trial. We stored results, including protection strategies, cost mappings and overall performance metrics, for later verification, analysis and plotting. A time-out of 120 minutes was set, which was reached usually in cases of uniformly-random and threat-based with high stochasticity by cost-based heuristics as this amounts to random selection. We expect random selection to extend instance lifetime on average, since effort is not targeted towards containment.

5.2 Graphs used

We studied Cost-Fire simulations on two real-world graphs to see how the problem performs as a model for disease on real contact graphs. We chose two contact graphs, one of lizards and another of raccoons, which we selected for their contrasting graph structures and public availability.

We also studied heuristic performance on four random graph classes: Erdős-Rényi, Barabási-Albert, geometric and n-regular random graphs. These were selected to study how heuristics perform across more controlled changes in graph structure (e.g. by increasing the probability used for Erdős-Rényi graph generation, we expect graph density to increase). Across these random graph classes, cost-based heuristics (particularly with ties broken on highest threat) outperformed the others in most cases. This performance was followed closely - and occasionally slightly outperformed by - the ‘reverse’ of this heuristic, threat-based with cost-based tie breaks.

5.2.1 Sleepy lizards.

Bull et al. [24] studied a group of Australian scincid ‘sleepy’ lizards (Tiliqua rogosa) to investigate the spread of Salmonella enterica bacteria within the group.

They concluded that infected lizards were far more likely to have contracted the bacteria through contact with another lizard than from some common environmental source [24], which motivated our application of Cost-Fire as a model of disease on this population. We were further motivated to study Cost-Fire on this graph due to the unusual social behaviours of this species: sleepy lizards exhibit non-random interaction behaviours, including monogamous pairings after extended courtships of six-to-eight weeks [25].

By studying a population of 60 lizards (30 male, 30 female) living in an area of 1.5 km2 in Southern Australia, Bull et al. [24] produced a social interaction graph available at the Network Data Repository [26], which we visualise and plot degree rank of in Fig 4. To produce this graph, researchers attached data logger units to the lizards in September 2010, which recorded GPS locations every 10 minutes for 120 days. An edge exists between two lizards to represent social contact if the two incident lizards were within 2 m of each other for at least one of the 10 min GPS readings. We do not use the edge weights, which indicate the ratio of frequency of associations [24]. The resulting graph contains 60 vertices connected by 318 edges, its density is 0.180 and the maximum, mean and minimum degrees of vertices in the graph are 23, 10.6 and 2 respectively. Assortativity is positive, at 0.350, and clustering is fairly high, at 0.567.

Fig 4. Visualisation and degree rank plot of a social interaction graph of sleepy lizards due to Bull et al. [24].

Fig 4

In the graph visualisation, larger vertices indicate higher degrees.

The degree rank plot in Fig 4 indicates this interaction graph has some scale-free characteristics, as the trend is slightly curved, but is unlikely to be strictly scale-free. There are few vertices in the graph with low degree and many have fairly similar degree. Due to the high assortativity of this graph, we expect degree-based heuristics to perform poorly in simulations.

5.2.2 Raccoons.

To model seasonal rabies outbreaks and vaccine efficacy over different levels of coverage, Reynolds et al. used proximity detection collars to construct a contact graph of suburban raccoons (Procyon lotor) from an area of 0.2 km2 in Illinois [27].

The resulting contact graph on 24 vertices and 226 edges has a very high density of 0.819. The average degree of a vertex is 18.8, with a maximum degree of 23 and a minimum of 7. This, combined with a clustering coefficient of 0.903, indicates a highly interconnected graph. We see a fairly gentle slope in the degree rank plot in Fig 5, indicating a more even distribution of edges than the sleepy lizard contact graph. The graph has negative assortativity (-0.133), which suggests high-degree raccoons tend to connect with low-degree raccoons slightly more often than with other high-degree raccoons, which could slow disease propagation. For simulations of Cost-Fire on this graph, we expect degree-based heuristics to be less effective than in more sparse or scale-free graphs, such as the sleepy lizard graph. We chose this graph because, in the original research, Reynolds et al. used the contact graph to model outcomes with varying vaccination coverage. In our experiments, this is studied as varying budget.

Fig 5. Visualisation and degree rank plot of the raccoon contact graph constructed by Reynolds et al. [27] used to simulate heuristics.

Fig 5

Larger vertices indicate higher degrees.

5.2.3 Erdős-Rényi.

Erdős-Rényi random graphs are generated on n vertices by connecting each pair of vertices with given probability p [28]. We chose this graph class as a ‘baseline’ for comparison that allows us to study the impact of varying graph density on the heuristic performances.

5.2.4 Barabási-Albert.

Barabási and Albert developed an algorithm to randomly generate scale-free graphs that is given as input a number of vertices n and a number of edges m to attach [29]. The Barabási-Albert model generates a random graph by iteratively introducing n vertices and randomly attaching each vertex with m edges to existing vertices with preference for high-degree vertices. We selected this model for experiments as it produces scale-free graphs with power-law degree distributions, which is seen in many observed interaction graphs [30].

5.2.5 Clustered power law.

Clustered power-law graphs combine scale-free (power-law) degree distributions with clustering coefficients. These graphs are randomly generated using an algorithm due to Holme and Kim [31], which extends the Barabási and Albert algorithm [29] with a triangulation step. That is, after each new edge is attached, another edge is created with probability p between two of the neighbours of the newly connected vertex, forming a triangle [31]. This can result in higher average clustering, making it suitable for generating graphs with more heterogeneity and local clustering than the Barabási-Albert model [31].

5.2.6 Watts-Strogatz.

The Watts-Strogatz model, due to Watts and Strogatz [32], generates small-world graphs, which are graphs with high clustering coefficients and short average path length. We begin with a ring lattice on n vertices in which each vertex is connected to its k closest neighbours and rewire each edge with given probability p to a random other vertex. Setting the rewiring probability p to 0 results in a regular ring lattice with high clustering and long path lengths, setting it to 1 results in a random graph with low clustering and short path lengths. For intermediate values of p, we reliably observe the small-world phenomenon [32], which is why we chose this model.

5.2.7 Caveman.

Caveman graphs on cliques (caves) of size s are connected graphs, constructed by rewiring a single edge in each clique to a vertex in another clique, forming a central cycle between cliques. We chose caveman graphs as they exhibit small-world properties by design but maintain global connectivity [33].

5.2.8 Geometric.

A random geometric graph is generated by uniformly randomly placing vertices in the unit cube and connecting vertices if the distance between them is less than a specified radius [34]. We considered radii from 0.1 to 0.5; for radii less than 0.2, most of the vertices are saved regardless of heuristic due to the low expected density. We selected this class of random graph because of the high likelihood of cluster separation, unlike Erdős-Rényi or Barabási-Albert random graphs.

5.2.9 Regular.

An r-regular graph is a graph in which each vertex has degree r; random r-regular graphs are selected uniformly randomly from the set of all possible r-regular graphs, although practical generation of r-regular graphs is non-trivial [35]. We use NetworkX for random graph generation, which generates random r-regular graphs using an algorithm due to Steger and Wormald [36]. Random regular graphs were selected to study Cost-Fire on graphs with regular degree; we expect degree-based heuristics to perform similarly to random defence for these graphs, since degree is uniform.

6 Experimental results and discussion

The median numbers of vertices saved at containment of fire under various heuristics on the sleepy lizard contact graph are plotted in Fig 6.

Fig 6. Plots of median numbers of vertices saved by various heuristics on an interaction graph of 60 sleepy lizards.

Fig 6

This figure shows that cost-based heuristics performed well across all implemented cost functions. As expected, we observe some similar performance from other heuristics when costs approach homogeneity (uniform and threat with high stochasticity, as reasoned in Sect 5). Under uniformly sampled and binary hesitation cost functions, threat and degree heuristics perform similarly to random. This is also expected, since the graph is very dense (with density 0.180 and mean degree 10.6).

For threat-based costs with low stochastic variance, cost-based heuristics perform well, particularly when used as a tie break. In some cases, this heuristic outperforms the primarily cost-based heuristic in some cases. Degree-based heuristics consistently perform similarly to or worse than random defence.

We plot the results of experiments on the raccoon contact graph in Fig 7. As in lizard graph simulations, when costs are uniformly random and binary according to hesitancy, heuristics based or breaking ties on costs consistently outperform the other heuristics. However, on the raccoon contact graph, the difference in median numbers of vertices saved narrows between the random and cost-based heuristics at higher budgets. This is expected, because this number approaches the total number of vertices in the graph that can be saved (i.e. one less than the size of the graph).

Fig 7. Plots of median numbers of vertices saved on an interaction graph of 24 raccoons by various heuristics.

Fig 7

When costs are threat-based with high stochastic variance, the picture of heuristic performance on the raccoon contact graph is very similar to the case of uniform costs, i.e. all perform similarly well, including random selection. As was the case for simulations on the lizard contact graph, this is because of the structure of the interaction graph - the graph is small and has a diameter 2 and only 50 of 276 pairs of vertices have minimum distance 2 in the graph - and the way variance is handled, discussed in Sect 5. In the lower variance case, lower homogeneity of costs mean that random selection tends more towards sub-optimal performance, so cost- and threat-based heuristics start to outperform random selection, particularly with higher budgets.

Moving onto random graphs, we plot simulation results on Erdős-Rényi graphs generated on 100 vertices with probability 0.05 in Fig 8 and with probability 0.25 in Fig 9. We provide simulation results for these graphs on the intermediate probabilities 0.10 and 0.15 in S1 Fig and S2 Fig respectively.

Fig 8. Plots of median numbers of vertices saved on randomly generated Erdős-Rényi graphs on 100 vertices with generation probability 0.05.

Fig 8

Fig 9. Plots of median numbers of vertices saved on randomly generated Erdős-Rényi graphs on 100 vertices with generation probability 0.20.

Fig 9

As in the real-world contact graph simulations, we see degree-based heuristics performing worse than the other heuristics on Erdős-Rényi graphs, sometimes worse than random. This is as expected, due to the expected uniformity of degrees in Erdős-Rényi graphs. Cost-based defences perform most consistently well across the cost functions and budgets.

Results of simulations on Barabási-Albert graphs on 100 vertices are presented for m = 2 in Fig 10 and m = 10 in Fig 11. Results for m=1,3 and 5 are given in S3 Fig, S4 Fig and S5 Fig respectively.

Fig 10. Plots of median numbers of vertices saved on randomly generated Barabási-Albert graphs on 100 vertices with 2 edges added per vertex.

Fig 10

Fig 11. Plots of median numbers of vertices saved on randomly generated Barabási-Albert graphs on 100 vertices with 10 edges added per vertex.

Fig 11

Degree-based heuristics again performed worst, although not as poorly (i.e. more similarly to random selection) as on Erdős-Rényi graphs. This is expected, because of the scale-free nature of Barabási-Albert on which degree-based defences are more likely to prove effective. Compare this to the difference in degree-based heuristic performance between the lizard and raccoon graphs - in the former, which is more scale-free, degree-based heuristics performed worst but less poorly than in the latter, less scale-free case. Reassuringly, when cost correlates to threat, threat- and cost-based heuristics perform similarly. Cost-based strategies perform well with most cost functions, which becomes clearer as m increases. We also notice differences in heuristic performance with uniformly random costs, particularly in the higher numbers of vertices saved by cost-based heuristics, in contrast to preliminary results in which all heuristics performed similarly poorly.

In Figs 12 and 13, we see very similar results on clustered power-law graphs on 100 vertices (with 2 and 5 edges added per vertex respectively) to the results on Barabási-Albert graphs. This is expected, as clustered power-law graphs are scale-free and the Barabási-Albert model produces scale-free-like random graphs. We give plots for simulation results on clustered power-law graphs on 100 vertices with 3 and 4 edges added per vertex in S6 Fig and S7 Fig respectively.

Fig 12. Plots of median numbers of vertices saved on randomly generated clustered power-law graphs on 100 vertices with 2 edges added per vertex.

Fig 12

Fig 13. Plots of median numbers of vertices saved on randomly generated clustered power-law graphs on 100 vertices with 5 edges added per vertex.

Fig 13

We plot results on graphs generated by the Watts-Strogatz model on 100 vertices with mean degrees 4 and 10 in Figs 14 and 15 respectively. These plots show another improvement in threat-based heuristics compared to previous results. This may be expected, due to the small-world properties of such graphs. Nonetheless, cost-based heuristics often outperform all others, particularly with ties broken on degree. Results for Watts-Strogatz graphs on 100 vertices with mean degrees 6 and 8 are given in S8 Fig and S9 Fig respectively.

Fig 14. Plots of median numbers of vertices saved on Watts-Strogatz graphs on 100 vertices with mean degree 4.

Fig 14

Fig 15. Plots of median numbers of vertices saved on Watts-Strogatz graphs on 100 vertices with mean degree 10.

Fig 15

We also considered caveman graphs, another generation model that produces small-world graphs. Here, threat seems to have the greatest relative performance we have yet observed, particularly as a tie-break for a cost-based heuristic (and as the primary heuristic with ties broken on costs). Since this graph is so well connected, fire must be contained quickly as possible lifetime is naturally limited. Hence, defending as many as possible (by selecting low-cost vertices) as close as possible to fire (by breaking ties on proximity to fire) is a sound strategy, a conjecture supported by the plots in Figs 16 and 17 of caveman graphs on 100 vertices arranged in 10 and 20 cliques respectively.

Fig 16. Plots of median numbers of vertices saved on caveman graphs on 100 vertices arranged in 10 cliques of size 10.

Fig 16

Fig 17. Plots of median numbers of vertices saved on caveman graphs on 100 vertices arranged in 20 cliques of size 5.

Fig 17

Plots of median vertices saved by the heuristics for geometric graphs on 100 vertices with radii 0.25 and 0.5 are provided in Figs 18 and 19 respectively.

Fig 18. Median numbers of vertices saved on randomly generated geometric graphs on 100 vertices with radius 0.15.

Fig 18

Fig 19. Median numbers of vertices saved on randomly generated geometric graphs on 100 vertices with radius 0.25.

Fig 19

On geometric graphs, threat-based heuristics outperform cost-based heuristics when costs are uniform and they perform similarly with costs close to uniformly random (high stochasticity). In all other cost assignment cases, cost-based heuristics outperform all others.

Finally, we plot the median numbers of vertices saved on randomly generated 3-regular and 8-regular graphs on 100 vertices in Figs 20 and 21. We provide plots for 4- and 6-regular graphs in S11 Fig and S12 Fig respectively.

Fig 20. Plots of median numbers of vertices saved on randomly generated 3-regular graphs on 100 vertices.

Fig 20

Fig 21. Plots of median numbers of vertices saved on randomly generated 8-regular graphs on 100 vertices.

Fig 21

On r-regular graphs, defending based on costs with ties broken on threat performs very well, particularly as budget increases. We observe a sharp jump in the uniform and near-uniform (high stochasticity) cases when the budget is equal to r in all cases. The only heuristic that performs similarly the cost with threat-based tie breaking heuristic is its ‘reverse,’ threat-based defence with ties broken on costs.

7 Conclusion

We have introduced Cost-Fire, a new variant of Fire that includes dynamic cost functions for vertices, allowing us to define costs that vary in time or in response to burning in the graph. Like Fire, we prove that Cost-Fire is NP-complete in general (Theorem 3), even on Sea Fan graphs on which Fire is tractable. We showed that we can solve Cost-Fire in time polynomial in graph size when the input graph is complete (Theorem 6) and, with further input restrictions, a tree (Theorem 8). We also gave an algorithm that solves instances of Cost-Fire with budget b on graphs on n vertices and m edges with maximum length of a path in the graph 1 in 𝒪((n+m)nb(2)) time (Theorem 7). This implies that Cost-Fire is in XP when parameterised by and the budget. Compare this to the result that Cost-Fire is FPT when parameterised by the sum of the treewidth of the input graph, the budget and the maximum lifetime of the problem, which we proved by expressing the problem in a fragment of second-order logic (Theorem 11).

7.1 Limitations

When interpreting the results of this study, several limitations should be kept in mind. First, the limited scale of graphs used (100 vertices for randomly generated graphs, 24-60 vertices for animal contact graphs) means that conclusions about heuristic performance can only be tentative, as our choice of graph classes may not fully capture real-world network heterogeneity. Also, none of our heuristics guarantee optimality, meaning comparisons are only relative rather than absolute solution quality assessments. Further, while our cost function examples are motivated by real-world observations (such as vaccine hesitancy), they are very simple and do not yet model the complex interplay of social, economic, geographic and other factors involved in such behaviours. Instead of making claims about the effectiveness of heuristics on different cost functions, our main aim in Sect 5 was to show how the theoretical model Cost-Fire may be used practically. However, we note that the exponential scaling of the state space (in Definition 3) in general limits practical application to small-to-moderately sized networks, and larger graphs may require approximate state representations or sampling-based approaches.

7.2 Future work

Several promising directions for future research may emerge from our work on Cost-Fire. For instance, future models could incorporate more nuanced cost functions that better reflect individual behaviours or environmental factors, which we hope would provide deeper insights into defence strategies. Future studies should also involve larger and more diverse real-world graphs, such as social networks, transportation systems and biological interaction networks, to evaluate scalability and practical applicability.

While we identify certain graph classes where Cost-Fire is tractable, a broader investigation into other graph structures is warranted. For example, exploring planar graphs, bipartite graphs, or graphs (not just trees) with bounded degree could reveal additional cases of computational feasibility. Understanding the boundaries of tractability across varied graph classes will enhance theoretical insights into the problem.

Although we have focused on unweighted and undirected graphs, Cost-Fire extends naturally to weighted and directed graphs. While complexity results in Sect 4 clearly continue to hold for weighted graphs, heuristics would need to be adapted and other heuristics not possible in the undirected and unweighted case may be favourable. In some directed graphs, we conjecture that the asymmetry for fire spread could be exploited to obtain stronger tractability results than possible on the underlying undirected graph, although in cases of strong connectivity, we expect similar hardness as in the undirected case.

On weighted or directed graphs, Cost-Fire remains valid without modification: costs can still depend on time, state, and vertex identity. The key differences lie in spreading and, consequently, in the reachability and time constraints that influence strategy design. Exploring these generalisations formally remains an open avenue for future work. We would be particularly interested in whether the fixed-parameter tractability result in Sect 4.5 extends under these richer dynamics.

To validate and extend our theoretical findings, we also recommend experiments on the graph classes used in the theoretical section using diverse cost functions and heuristic strategies. This would bridge the gap between theory and empirical performance, offering a more comprehensive understanding of the problem’s behaviour across different contexts.

Supporting information

S1 Fig. Simulation result plots for Erdős-Rényi graphs on 100 vertices with probability 0.1.

(TIFF)

pone.0341222.s001.tif (157.8KB, tif)
S2 Fig. Simulation result plots for Erdős-Rényi graphs on 100 vertices with probability 0.15.

(TIFF)

pone.0341222.s002.tif (151.7KB, tif)
S3 Fig. Simulation result plots for Barabási-Albert graphs on 100 vertices with 1 edge per vertex.

(TIFF)

pone.0341222.s003.tif (223.5KB, tif)
S4 Fig. Simulation result plots for Barabási-Albert graphs on 100 vertices with 3 edges per vertex.

(TIFF)

pone.0341222.s004.tif (154KB, tif)
S5 Fig. Simulation result plots for Barabási-Albert graphs on 100 vertices with 5 edges per vertex.

(TIFF)

pone.0341222.s005.tif (163.4KB, tif)
S6 Fig. Simulation result plots for clustered power-law graphs on 100 with 3 edges per vertex.

(TIFF)

pone.0341222.s006.tif (156.5KB, tif)
S7 Fig. Simulation result plots for clustered power-law graphs on 100 with 4 edges per vertex.

(TIFF)

pone.0341222.s007.tif (135.7KB, tif)
S8 Fig. Simulation result plots for Watts-Strogatz graphs on 100 vertices with mean degree 6.

(TIFF)

pone.0341222.s008.tif (164.1KB, tif)
S9 Fig. Simulation result plots for Watts-Strogatz graphs on 100 vertices with mean degree 8.

(TIFF)

pone.0341222.s009.tif (152.6KB, tif)
S10 Fig. Simulation result plots for randomly generated geometric graphs on 100 vertices with radius 0.2.

(TIFF)

pone.0341222.s010.tif (183KB, tif)
S11 Fig. Simulation result plots for randomly generated 4-regular graphs on 100 vertices.

(TIFF)

pone.0341222.s011.tif (145.1KB, tif)
S12 Fig. Simulation result plots for randomly generated 6-regular graphs on 100 vertices.

(TIFF)

pone.0341222.s012.tif (158.6KB, tif)

Acknowledgments

This is a revised and extended version of a conference manuscript presented at the 13th International Conference on Complex Networks and their Applications (COMPLEX NETWORKS 2024) [37].

Data Availability

The contact graph data used for simulations are available under a Creative Commons Attribution-ShareAlike licence: sleepy lizard data at https://doi.org/10.5061/dryad.jk87h and raccoon data at https://doi.org/10.5061/dryad.gr40r. The code used to perform simulations is publicly available at https://github.com/Ethan-CS/CostFnFire. Full simulation results, including random generation seeds and strategies for verification, are publicly available at https://doi.org/10.6084/m9.figshare.30053002.v1.

Funding Statement

Enright was partially supported by EPSRC grants: EP/T004878/1 and EP/V032305/1.

References

  • 1.Hartnell BL. Firefighter! An application of domination; 1995.
  • 2.Finbow S, MacGillivray G. The firefighter problem: a survey of results, directions and questions. The Australasian Journal of Combinatorics. 2009;43. [Google Scholar]
  • 3.Pourrazavi S, Fathifar Z, Sharma M, Allahverdipour H. COVID-19 vaccine hesitancy: a systematic review of cognitive determinants. Health Promot Perspect. 2023;13(1):21–35. doi: 10.34172/hpp.2023.03 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4.Finbow S, King A, MacGillivray G, Rizzi R. The firefighter problem for graphs of maximum degree three. Discrete Mathematics. 2007;307(16):2094–105. doi: 10.1016/j.disc.2005.12.053 [DOI] [Google Scholar]
  • 5.Fomin FV, Heggernes P, van Leeuwen EJ. The Firefighter problem on graph classes. Theoretical Computer Science. 2016;613:38–50. doi: 10.1016/j.tcs.2015.11.024 [DOI] [Google Scholar]
  • 6.Courcelle B. The monadic second-order logic of graphs. I. Recognizable sets of finite graphs. Information and Computation. 1990;85(1):12–75. doi: 10.1016/0890-5401(90)90043-h [DOI] [Google Scholar]
  • 7.Cormen TH, Leiserson CE, Rivest RL, Stein C. Introduction to algorithms. MIT Press; 2022. [Google Scholar]
  • 8.Cygan M, Fomin FV, Kowalik L, Lokshtanov D, Marx D, Pilipczuk M. Parameterized algorithms. 1st ed. Springer Publishing Company, Incorporated. 2015. [Google Scholar]
  • 9.Bazgan C, Chopin M, Ries B. The firefighter problem with more than one firefighter on trees. Discrete Applied Mathematics. 2013;161(7–8):899–908. doi: 10.1016/j.dam.2012.11.011 [DOI] [Google Scholar]
  • 10.Hartnell B, Li Q. Firefighting on trees: how bad is the greedy algorithm? In: Proceedings of the thirty-first Southeastern International Conference on Combinatorics, Graph Theory and Computation. Congressus Numerantium 145. Boca Raton, Florida USA; 2000. p. 187–92.
  • 11.Cai L, Verbin E, Yang L. Firefighting on trees: (1 - 1/e)-approximation, fixed parameter tractability and a subexponential algorithm. In: Hong SH, Nagamochi H, Fukunaga T, editors. Algorithms and computation. Berlin, Heidelberg: Springer; 2008. p. 258–69. [Google Scholar]
  • 12.Anshelevich E, Chakrabarty D, Hate A, Swamy C. Approximability of the firefighter problem. Algorithmica. 2010;62(1–2):520–36. doi: 10.1007/s00453-010-9469-y [DOI] [Google Scholar]
  • 13.Hand SD, Enright J, Meeks K. Making life more confusing for firefighters. In: 11th International Conference on Fun with Algorithms (FUN 2022). 2022. p. 15:1-15:15. https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FUN.2022.15
  • 14.Duffy C, MacGillivray G. An analysis of the weighted firefighter problem. Journal of Combinatorial Mathematics and Combinatorial Computation. 2015;94:167–75. [Google Scholar]
  • 15.Wilson RJ. Introduction to Graph Theory. 4th ed. Essex: Addison Wesley Longman Ltd.; 1996. [Google Scholar]
  • 16.Berman P, Karpinski M, Scott A. Approximation hardness of short symmetric instances of max-3sat. Electronic Colloquium on Computational Complexity. 2003. [Google Scholar]
  • 17.MacGillivray G, Wang P. On the firefighter problem. Journal of Combinatorial Mathematics and Combinatorial Computing. 2003;47:83–96. [Google Scholar]
  • 18.Duffy C. A collection of algorithmic and complexity results for variants of the Firefighter Problem. University of Waterloo; 2011. [Google Scholar]
  • 19.Arnborg S, Lagergren J, Seese D. Easy problems for tree-decomposable graphs. Journal of Algorithms. 1991;12(2):308–40. doi: 10.1016/0196-6774(91)90006-k [DOI] [Google Scholar]
  • 20.Bazgan C, Chopin M, Cygan M, Fellows MR, Fomin FV, van Leeuwen EJ. Parameterized complexity of firefighting. Journal of Computer and System Sciences. 2014;80(7):1285–97. doi: 10.1016/j.jcss.2014.03.001 [DOI] [Google Scholar]
  • 21.Langer A, Reidl F, Rossmanith P, Sikdar S. Practical algorithms for MSO model-checking on tree-decomposable graphs. Computer Science Review. 2014;13–14:39–74. doi: 10.1016/j.cosrev.2014.08.001 [DOI] [Google Scholar]
  • 22.Hagberg AA, Schult DA, Swart PJ. Exploring network structure, dynamics, and function using NetworkX. In: Proceedings of the Python in Science Conference. 2008. p. 11–5. 10.25080/tcwv9851 [DOI]
  • 23.García-Martínez C, Blum C, Rodriguez FJ, Lozano M. The firefighter problem: empirical results on random graphs. Computers & Operations Research. 2015;60:55–66. doi: 10.1016/j.cor.2015.02.004 [DOI] [Google Scholar]
  • 24.Bull CM, Godfrey SS, Gordon DM. Social networks and the spread of Salmonella in a sleepy lizard population. Mol Ecol. 2012;21(17):4386–92. doi: 10.1111/j.1365-294X.2012.05653.x [DOI] [PubMed] [Google Scholar]
  • 25.Bull C, Gardner M, Sih A, Speigal O, Godfrey S, Leu S. Why is social behavior rare in reptiles? Lessons from sleepy lizards.. Advances in the Study of Behavior. 49 ed. Elsevier. 2017. p. 1–26.
  • 26.Rossi RA, Ahmed NK. The network data repository with interactive graph analytics and visualization. In: AAAI; 2015. https://networkrepository.com.
  • 27.Reynolds JJH, Hirsch BT, Gehrt SD, Craft ME. Raccoon contact networks predict seasonal susceptibility to rabies outbreaks and limitations of vaccination. J Anim Ecol. 2015;84(6):1720–31. doi: 10.1111/1365-2656.12422 [DOI] [PubMed] [Google Scholar]
  • 28.Erd˝os P, R´enyi A. On random graphs. I. Publicationes Mathematicae. 1959;6:290–7. [Google Scholar]
  • 29.Barabasi A, Albert R. Emergence of scaling in random networks. Science. 1999;286(5439):509–12. doi: 10.1126/science.286.5439.509 [DOI] [PubMed] [Google Scholar]
  • 30.Albert R, Barabási A-L. Statistical mechanics of complex networks. Rev Mod Phys. 2002;74(1):47–97. doi: 10.1103/revmodphys.74.47 [DOI] [Google Scholar]
  • 31.Holme P, Kim BJ. Growing scale-free networks with tunable clustering. Phys Rev E Stat Nonlin Soft Matter Phys. 2002;65(2 Pt 2):026107. doi: 10.1103/PhysRevE.65.026107 [DOI] [PubMed] [Google Scholar]
  • 32.Watts DJ, Strogatz SH. Collective dynamics of “small-world” networks. Nature. 1998;393(6684):440–2. doi: 10.1038/30918 [DOI] [PubMed] [Google Scholar]
  • 33.Watts DJ. Networks, dynamics, and the small-world phenomenon. American Journal of Sociology. 1999;105(2):493–527. doi: 10.1086/210318 [DOI] [Google Scholar]
  • 34.Penrose M. Random geometric graphs. Oxford University Press; 2003. [Google Scholar]
  • 35.Bollobás B. Random graphs. 2nd ed. Cambridge University Press; 2001. [Google Scholar]
  • 36.Steger A, Wormald NC. Generating random regular graphs quickly. Combinator Probab Comp. 1999;8(4):377–96. doi: 10.1017/s0963548399003867 [DOI] [Google Scholar]
  • 37.Hunter E, Enright J. The firefighter game with state-varying cost functions. In: Complex Networks & Their Applications XIII: Proceedings of The Thirteenth International Conference on Complex Networks and Their Applications: COMPLEX NETWORKS 2024 . 2024. p. 76–86.

Decision Letter 0

Hoda Bidkhori

24 Jul 2025

PONE-D-25-17298The Firefighter problem with dynamic defence costsPLOS ONE

Dear Dr. Hunter,

Thank you for submitting your manuscript to PLOS ONE. After careful consideration, we feel that it has merit but does not fully meet PLOS ONE’s publication criteria as it currently stands. Therefore, we invite you to submit a revised version of the manuscript that addresses the points raised during the review process. The three reviewers suggested accept, minor revision, and reject. I suggest major revision. I suggest addressing all the reviewers' comments. In addition, I think the graphs studied in the paper are very restricted. I suggest significantly improving the paper by considering more general graphs.

Please submit your revised manuscript by Sep 07 2025 11:59PM. If you will need more time than this to complete your revisions, please reply to this message or contact the journal office at plosone@plos.org. When you're ready to submit your revision, log on to https://www.editorialmanager.com/pone/ and select the 'Submissions Needing Revision' folder to locate your manuscript file.

Please include the following items when submitting your revised manuscript:

  • A rebuttal letter that responds to each point raised by the academic editor and reviewer(s). You should upload this letter as a separate file labeled 'Response to Reviewers'.

  • A marked-up copy of your manuscript that highlights changes made to the original version. You should upload this as a separate file labeled 'Revised Manuscript with Track Changes'.

  • An unmarked version of your revised paper without tracked changes. You should upload this as a separate file labeled 'Manuscript'.

If you would like to make changes to your financial disclosure, please include your updated statement in your cover letter. Guidelines for resubmitting your figure files are available below the reviewer comments at the end of this letter.

If applicable, we recommend that you deposit your laboratory protocols in protocols.io to enhance the reproducibility of your results. Protocols.io assigns your protocol its own identifier (DOI) so that it can be cited independently in the future. For instructions see: https://journals.plos.org/plosone/s/submission-guidelines#loc-laboratory-protocols. Additionally, PLOS ONE offers an option for publishing peer-reviewed Lab Protocol articles, which describe protocols hosted on protocols.io. Read more information on sharing protocols at https://plos.org/protocols?utm_medium=editorial-email&utm_source=authorletters&utm_campaign=protocols.

We look forward to receiving your revised manuscript.

Kind regards,

Hoda Bidkhori

Academic Editor

PLOS ONE

Journal Requirements:

1. When submitting your revision, we need you to address these additional requirements. Please ensure that your manuscript meets PLOS ONE's style requirements, including those for file naming. The PLOS ONE style templates can be found at https://journals.plos.org/plosone/s/file?id=wjVg/PLOSOne_formatting_sample_main_body.pdf and https://journals.plos.org/plosone/s/file?id=ba62/PLOSOne_formatting_sample_title_authors_affiliations.pdf 2. We noted in your submission details that a portion of your manuscript may have been presented or published elsewhere. ‘Yes, some results were published as a shorter (conference) manuscript, currently in print. Theoretical results were all briefly mentioned and justified in the original - they are fully proved here. Experimental results in the original were only preliminary and do not appear in this extended version. Instead, they have been replaced by more thorough simulation results and discussion”. Please clarify whether this [conference proceeding or publication] was peer-reviewed and formally published. If this work was previously peer-reviewed and published, in the cover letter please provide the reason that this work does not constitute dual publication and should be included in the current manuscript. 3. Thank you for uploading your study's underlying data set. Unfortunately, the repository you have noted in your Data Availability statement does not qualify as an acceptable data repository according to PLOS's standards. At this time, please upload the minimal data set necessary to replicate your study's findings to a stable, public repository (such as figshare or Dryad) and provide us with the relevant URLs, DOIs, or accession numbers that may be used to access these data. For a list of recommended repositories and additional information on PLOS standards for data deposition, please see https://journals.plos.org/plosone/s/recommended-repositories. 4. We note that Figures 3 and 6 in your submission contain copyrighted images. All PLOS content is published under the Creative Commons Attribution License (CC BY 4.0), which means that the manuscript, images, and Supporting Information files will be freely available online, and any third party is permitted to access, download, copy, distribute, and use these materials in any way, even commercially, with proper attribution. For more information, see our copyright guidelines: http://journals.plos.org/plosone/s/licenses-and-copyright. We require you to either present written permission from the copyright holder to publish these figures specifically under the CC BY 4.0 license, or remove the figures from your submission: a. You may seek permission from the original copyright holder of Figures 3 and 6 to publish the content specifically under the CC BY 4.0 license. We recommend that you contact the original copyright holder with the Content Permission Form (http://journals.plos.org/plosone/s/file?id=7c09/content-permission-form.pdf) and the following text:“I request permission for the open-access journal PLOS ONE to publish XXX under the Creative Commons Attribution License (CCAL) CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). Please be aware that this license allows unrestricted use and distribution, even commercially, by third parties. Please reply and provide explicit written permission to publish XXX under a CC BY license and complete the attached form.” Please upload the completed Content Permission Form or other proof of granted permissions as an "Other" file with your submission. In the figure caption of the copyrighted figure, please include the following text: “Reprinted from [ref] under a CC BY license, with permission from [name of publisher], original copyright [original copyright year].” b. If you are unable to obtain permission from the original copyright holder to publish these figures under the CC BY 4.0 license or if the copyright holder’s requirements are incompatible with the CC BY 4.0 license, please either i) remove the figure or ii) supply a replacement figure that complies with the CC BY 4.0 license. Please check copyright information on all replacement figures and update the figure caption with source information. If applicable, please specify in the figure caption text when a figure is similar but not identical to the original image and is therefore for illustrative purposes only. 5. If the reviewer comments include a recommendation to cite specific previously published works, please review and evaluate these publications to determine whether they are relevant and should be cited. There is no requirement to cite these works unless the editor has indicated otherwise.

Additional Editor Comments:

The paper introduces a new variant of the classic Firefighter Problem, which models how contagions like rumors or diseases spread through a network. In the traditional problem, a player protects nodes in a graph to stop the spread and save as many as possible. This new version, called the Cost Function Firefighter Problem, adds complexity by making the cost of defending each node vary over time and depend on the graph's burning state. The authors prove that this version is computationally hard, even on tree structures where the original problem is more manageable. However, by formulating the problem in monadic second-order logic, they show it becomes fixed-parameter tractable when considering factors like treewidth, budget, and maximum time step.

In addition to theoretical analysis, the authors carry out empirical studies to compare different heuristic strategies—based on cost, threat, and degree—under varying cost conditions. They test these heuristics on both random and real-world graphs and find that the effectiveness of each approach depends heavily on the underlying graph structure. Notably, degree-based heuristics generally perform worse than strategies that consider the dynamic state of the graph, such as cost or threat.

The three reviewers suggested accept, minor revision, and reject. I suggest major revision. I suggest addressing all the reviewers' comments. In addition, I think the graphs studied in the paper are very restricted. I suggest significantly improving the paper by considering more general graphs.

[Note: HTML markup is below. Please do not edit.]

Reviewers' comments:

Reviewer's Responses to Questions

Comments to the Author

1. Is the manuscript technically sound, and do the data support the conclusions?

The manuscript must describe a technically sound piece of scientific research with data that supports the conclusions. Experiments must have been conducted rigorously, with appropriate controls, replication, and sample sizes. The conclusions must be drawn appropriately based on the data presented.

Reviewer #1: No

Reviewer #2: Yes

Reviewer #3: Partly

**********

2. Has the statistical analysis been performed appropriately and rigorously?

Reviewer #1: No

Reviewer #2: N/A

Reviewer #3: Yes

**********

3. Have the authors made all data underlying the findings in their manuscript fully available?

The PLOS Data policy requires authors to make all data underlying the findings described in their manuscript fully available without restriction, with rare exception (please refer to the Data Availability Statement in the manuscript PDF file). The data should be provided as part of the manuscript or its supporting information, or deposited to a public repository. For example, in addition to summary statistics, the data points behind means, medians and variance measures should be available. If there are restrictions on publicly sharing data—e.g. participant privacy or use of data from a third party—those must be specified.

Reviewer #1: Yes

Reviewer #2: Yes

Reviewer #3: Yes

**********

4. Is the manuscript presented in an intelligible fashion and written in standard English?

PLOS ONE does not copyedit accepted manuscripts, so the language in submitted articles must be clear, correct, and unambiguous. Any typographical or grammatical errors should be corrected at revision, so please note any specific errors here.

Reviewer #1: No

Reviewer #2: Yes

Reviewer #3: Yes

**********

5. Review Comments to the Author

Please use the space provided to explain your answers to the questions above. You may also include additional comments for the author, including concerns about dual publication, research ethics, or publication ethics. (Please upload your review as an attachment if it exceeds 20,000 characters)

Reviewer #1: Report for the manuscript is attached with the system metadata. It can be seen with the system login. I just suggest to prepare a manuscript that shows one track concept and results rather choosing multi directional concepts without technical concepts in the paper.

Reviewer #2: In the paper entitled "The Firefi ghter problem with dynamic defence costs",

the authors have introduced a variant of the Fire ghter problem called The Cost

Function Fire ghter Problem, in which each vertex has a cost to defend that varies

with time and the burning state of the graph. To complement theoretical fi ndings,

they compare performance of cost, threat and degree-based heuristics under various

cost functions. Their findings explain that the relative effectiveness of these heuris-

tics depends heavily on the structure of graph used in the process, but degree-based

heuristics tend to perform worse than state-based strategies. This manuscript has

been presented at an international conference, 2024.

I suggest to accept the manuscript, after authors address the following;

1. How well do these models capture real-world dynamics like delay, uncertainty,

or feedback loops?

2. Has the problem been simulated on real networks (e.g., social, transportation,

biological)?

3. Can the problem be extended to weighted or directed graphs, and how does

that affect solution strategies?

4. What algorithms are commonly used to solve or approximate solutions to the

Fire fighter Problem?

5. What are the best-known approximation ratios for specifi c versions of the

problem?

6. On which graph classes is the Fire fighter Problem solvable in polynomial time?

7. What are the known variants of the Firefi ghter Problem?

8. What are the limitations of this study?

9. Aligns text to both margins evenly.

10. Figure 8, 9, 10, 11 and 12 are not clear.

11. Make sure that all references are cited within the manuscript.

Reviewer #3: Manuscript ID: PONE-D-25-17298

Title: The Firefighter Problem with Dynamic Defence Costs

Strengths

• Excellent structure and clarity throughout.

• Strong theoretical foundation and clear NP-hardness reductions.

• Effective use of MSO logic for parameterized complexity.

• Experimental evaluation is thorough and includes both random and real-world graphs.

________________________________________

Minor Issues & Suggested Revisions

1. Abstract Improvements

• Line: “This problem is computationally hard, but can be solved efficiently...”

o Suggestion: Add a brief example or graph class for which it is efficiently solvable to make the sentence self-contained.

• Line: “We introduce a variant...”

o Suggestion: Consider emphasizing the novelty more clearly — e.g., highlight that it is the first to incorporate time-dependent vertex defence costs.

________________________________________

2. Notation and Definitions

• Definition 2 (Strategy)

o The multi-index notation (e.g., djid_{ji}) is clear, but it may help to include a small illustrative figure for visual clarity.

• Definition 3 (State Mapping)

o It would be beneficial to provide a visual timeline or state diagram for the example.

________________________________________

**********

6. PLOS authors have the option to publish the peer review history of their article (what does this mean?). If published, this will include your full peer review and any attached files.

If you choose “no”, your identity will remain anonymous but your review may still be made public.

Do you want your identity to be public for this peer review? For information about this choice, including consent withdrawal, please see our Privacy Policy.

Reviewer #1: No

Reviewer #2: No

Reviewer #3: No

**********

[NOTE: If reviewer comments were submitted as an attachment file, they will be attached to this email and accessible via the submission site. Please log into your account, locate the manuscript record, and check for the action link "View Attachments". If this link does not appear, there are no attachment files.]

While revising your submission, please upload your figure files to the Preflight Analysis and Conversion Engine (PACE) digital diagnostic tool, https://pacev2.apexcovantage.com/. PACE helps ensure that figures meet PLOS requirements. To use PACE, you must first register as a user. Registration is free. Then, login and navigate to the UPLOAD tab, where you will find detailed instructions on how to use the tool. If you encounter any issues or have any questions when using PACE, please email PLOS at figures@plos.org. Please note that Supporting Information files do not need this step.

Attachment

Submitted filename: PONE-D-25-17298.pdf

pone.0341222.s013.pdf (467.9KB, pdf)
Attachment

Submitted filename: plos1.pdf

pone.0341222.s014.pdf (48.5KB, pdf)
Attachment

Submitted filename: Review Report-for Plos.docx

pone.0341222.s015.docx (17.4KB, docx)
PLoS One. 2026 Feb 6;21(2):e0341222. doi: 10.1371/journal.pone.0341222.r002

Author response to Decision Letter 1


5 Sep 2025

[Copied from the submitted file `Response to Reviewers.pdf` for convenience]

Response to reviews - PONE-D-25-17298

4th September 2025

Dear Dr. Bidkhori,

We thank you and the reviewers for your careful reading of our manuscript. We have revised the paper accordingly and write today to address each point in turn.

Journal Requirements

We have addressed the following reviews related to PLOS ONE’s specific submission requirements.

Journal Requirement 1 — Ensure that your manuscript meets PLOS ONE’s style requirements, including those for file naming.

Response: We apologise for the oversight. The figure and supplementary information files have all been named according to the style guides (FigX.abc for figures, SX_Fig.abc for supplementary figures).

Journal Requirement 2 — We noted in your submission details that a portion of your manuscript may have been presented or published elsewhere. Please clarify whether this [conference proceeding or publication] was peer-reviewed and formally published . . . please provide the reason that this work does not constitute dual publication and should be included in the current manuscript.

Response: This manuscript has been submitted by invitation to a special edition of the ‘Complex Networks and their Applications’ conference collection. The original conference article, presented at the Thirteenth International Conference on Complex Networks and

their Applications (COMPLEX NETWORKS 2024), was peer reviewed prior to publication. It is shorter than this manuscript (10 pages) and contains only sketches of proofs and limited preliminary experimental results as proof-of-concept. The current manuscript: adds to background and preliminary discussions to provide better context for the new problem, includes the proofs to new results, and presents the results of experiments proposed in the initial shorter paper. Hence, this manuscript contains significant extensions and additions to the previous publication.

Journal Requirement 3 — Thank you for uploading your study’s underlying data set. Unfortunately, the repository you have noted in your Data Availability statement does not qualify as an acceptable data repository according to PLOS’s standards. At this time, please upload the minimal data set necessary to replicate your study’s findings to a stable, public repository (such as figshare or Dryad) and provide us with the relevant URLs, DOIs, or

accession numbers that may be used to access these data.

Response: We apologise that link was not working at time of previous submission. While the DOI has now been successfully coined, and the link is working when tested, we have performed a wider range of experiments, the data of which (as used to produce plots) are all available at: https://doi.org/10.6084/m9.figshare.30053002.v1.

Journal Requirement 4 — We note that Figures 3 and 6 in your submission contain copyrighted images. All PLOS content is published under the Creative Commons Attribution License (CC BY 4.0), which means that the manuscript, images, and Supporting Information files will be freely available online, and any third party is permitted to access, download, copy, distribute, and use these materials in any way, even commercially, with proper attribution. We require you to either present written permission from the copyright holder to publish these figures specifically under the CC BY 4.0 license, or remove the figures from your submission

Response: We apologise for this oversight, a result of a misunderstanding of the CC BY-SA 3.0 licence under which the images were originally distributed. These figures, and references to them, have been removed in the updated manuscript.

Journal Requirement 5 — If the reviewer comments include a recommendation to cite specific previously published works, please review and evaluate these publications to determine whether they are relevant and should be cited. There is no requirement to cite these works unless the editor has indicated otherwise.

Response: Thank you, we have reviewed the recommended papers (Reviewer Com- ment 3.11). We found those that refer to the Firefighter problem are not closely related to the work in this manuscript.

Academic Editor Comments

Academic Editor Comment — I think the graphs studied in the paper are very restricted. I suggest significantly improving the paper by considering more general graphs.

Response: We are grateful for this important suggestion. To address it, we have re-run simulations on all existing random graph classes - on 100 vertices, rather than 50 - and included other random graph types. Specifically, the full list of graphs on which we run experiments is now:

• A contact graphs of 60 sleepy lizards,

• A contact graph of 24 raccoons,

• Erdős-Rényi random graphs, 100 vertices, generation probabilities 0.05, 0.10, 0.15, 0.20 and 0.25,

• Barabási-Albert graphs, 100 vertices, added edges per vertex: 1, 2, 3, 5 and 10, • Clustered power-law graphs, 100 vertices, added edges per vertex: 2, 3, 4 and 5, • Watts-Strogatz graphs, 100 vertices, mean degrees 4, 6, 8 and 10,

• Cavemen graphs, on 10 and 20 cliques (100 vertices in total),

• Random geometric graphs, with radii 0.15, 0.2 and 0.25, and • Random r-regular, 100 vertices for r =3, 4, 6 and 8.

We hope that this much broader scope of experimentation, coupled with explicit discussion of the limitations of this scope in the new Limitations section (§ 7.1, addresses this concern.

Reviewer 1

Reviewer Comment 1.1 — I suggest to prepare a manuscript that shows one track concept and results rather choosing multi directional concepts without technical concepts in the paper.

Response: We have reworked the central narrative of the manuscript, to make clear that our approach is to first show the problem is NP-hard to solve in general, which motivates a two-pronged approach in searching for tractable instances and comparing heuristic performance experimentally to understand the hardness of the problem in specific cases.

Reviewer Comment 1.2 — . . . neither the paper is scientifically so sound to be considered for the publication in Plos One . . . However it could be valuable for the specific journal. The authors can consider specialized journal for the publication of this article.

Response: We appreciate this comment and respectfully point out that this manuscript has been submitted by invitation to a special edition of the Complex Networks and their Applications conference collection, which we hope this reviewer deems a suitable venue.

Reviewer Comment 1.3 — The authors have mentioned Graph theory in the paper but mathematical tools of graph theory are not used in any results.

Response: To better expose the methods and logical structure, we have reorganised the manuscript to include a theoretical background section (§ 3), in which we give graph theoretic preliminaries (§ 3.1). In the Firefighter problem, we defend vertices in a graph, so this background is required. In a new theoretical methods section (§ 3.2), we explain the main techniques used, so it is clear that this work lies in algorithmic rather than structural graph theory.

Reviewer 2

Reviewer Comment 2.1 — How well do these models capture real-world dynamics like delay, uncertainty, or feedback loops?

Response: We discuss, in a new paragraph at the end of § 3.4, how cost functions can be defined to model the dynamics mentioned (delay, uncertainty and feedback loops).

Reviewer Comment 2.2 — Has the problem been simulated on real networks (e.g., social, transportation, biological)?

Response: While our empirical study does include real interaction graphs (the sleepy lizard and raccoon networks), these are very small and intended to demonstrate usage of the model rather than to find statistically significant conclusions. We state this explicitly in the new limitations section.

Reviewer Comment 2.3 — Can the problem be extended to weighted or directed graphs, and how does that affect solution strategies?

Response: Yes,andhardnessresultslargelyhold(althoughweconjecturethatthestructure of certain directed graphs may be leveraged for tractability on unweighted underlying graphs on which the problem remains hard). We explain our thoughts on this in § 7.2 and leave these extensions as future work.

Reviewer Comment 2.4 — What algorithms are commonly used to solve or approximate solutions to the Firefighter Problem?

Response: We have given an explanation of known approximation results in the new § 2.1.2 on Approximation of the original Firefighter problem. Of course, approximation is the best we can hope for in general, since the problem is NP-hard (Theorem 1, § 2.1).

Reviewer Comment 2.5 — What are the best-known approximation ratios for specific versions of the problem?

Response: We provide an overview of existing approximation results in the new § 2.1.2.

Reviewer Comment 2.6 — On which graph classes is the Firefighter Problem solvable

in polynomial time?

Response: We give some well-known graph classes on which the Firefighter problem is tractable in the new § 2.1.1, with citations.

Reviewer Comment 2.7 — What are the known variants of the Firefighter Problem? Response: We discuss Variants of the Firefighter problem in the new § 2.1.1, with

particular focus on variants related to the Cost Function variant we introduce.

Reviewer Comment 2.8 — What are the limitations of this study?

Response: We are particularly grateful for the reviewer pointing out the omission of a limitations section, which we have introduced as § 7.1.

Reviewer Comment 2.9 — Aligns text to both margins evenly.

Response: We have verified no ‘hbox-full’ warnings are produced on compilation in LATEX,

and have not amended or adjusted the formatting in the PLOS-ONE LATEX template.

Reviewer Comment 2.10 — Figures 8, 9, 10, 11 and 12 are not clear.

Response: We have re-generated all figures in higher resolution, as PDF files to avoid compression, and increased font sizes. We hope this improves the clarity of these figures.

Reviewer Comment 2.11 — Make sure that all references are cited within the manuscript. Response: We have manually checked and believe all references listed are cited at least

once in the main text of the manuscript.

Reviewer 3

Abstract improvements

Reviewer Comment 3.1 — Line: “This problem is computationally hard, but can be solved efficiently. . .” Suggestion: Add a brief example or graph class for which it is efficiently solvable to make the sentence self-contained.

Response: We have made this change in the abstract, both for the Firefighter problem (in the first paragraph of the abstract) and when introducing new variant (second paragraph).

Reviewer Comment 3.2 — Line: “We introduce a variant...” Suggestion: Consider emphasizing the novelty more clearly - e.g., highlight that it is the first to incorporate time-dependent vertex defence costs.

Response: Thankyou,wehavemadethischange(‘WedefineTheCostFunctionFirefighter Problem, the first variant of the Firefighter problem to introduce costs to defend each vertex that depend on time and problem state.’)

Notation and definitions

Reviewer Comment 3.3 — Definition 2 (Strategy) The multi-index notation (e.g., djidji [sic]) is clear, but it may help to include a small illustrative figure for visual clarity.

Response: This is a helpful suggestion - we have provided a figure (Figure 1, § 3.3) to illustrate a strategy for an instance of the Cost Function Firefighter problem that defends more than one vertex in the first turn, and added text (E.g. 1, after Definition 2) showing how this is represented using this notation.

Reviewer Comment 3.4 — Definition 3 (State Mapping) It would be beneficial to provide a visual timeline or state diagram for the example.

Response: This is also a helpful suggestion. We have provided (E.g. 2, after Definition 3) a fully worked example of the state mapping for the illustration used in our response to Reviewer Comment 3.3 for each turn in the lifetime of the instance.

Typographical & language refinements

Reviewer Comment 3.5 — Throughout: Minor grammar enhancements can improve flow: “Letthetargetk=n+3mk=n+3m,thebudgetb=2b=2andoverthesetof times...” Changeto: “Letthetargetbek=n+3mk=n+3m,withabudgetb=2b=2, over the time steps. . .”

Response: Thank you, we have made this change throughout and performed further proof reading with a particular focus on grammar and flow.

Reviewer Comment 3.6 — Page 2, Line 23: “We have designed Cost-Fire to model pop- ulation heterogeneity. . .” Suggestion: Replace “have designed” with “designed” for consistency in tense

Response: Respectfully, we believe the past perfect (rather than simple) is the correct tense here.

Reviewer Comment 3.7 — Page 6, Example 5: Consider formatting the piecewise function using LaTeX-style brackets or clearer indentation.

Response: This was originally formatted with a case environment, so to address this point we have increased the whitespace and hope this improves the readability of the function. We have also added more text explaining the examples that are more difficult to parse.

Table formatting

Reviewer Comment 3.8 — Table 1: Summary is excellent, but could use clearer column separation and improved caption wording: Caption Suggestion: “Summary of tractability and hardness results for Fire and Cost-Fire across graph classes.”

Response: We have increased the available spacing, moved the section numbers to the relevant cells and amended the caption in line with this suggestion.

Figures

Reviewer Comment 3.9 — Figures 1, 2, 3, 4, etc. Suggestion: Ensure all figures have consistent formatting and high resolution. Captions should explicitly state what is being shown and its relevance to the discussion.

Response: We have re-generated and saved all figures as higher-resolution files and checked all captions for clarity and completeness.

Section 3.6 – PathContainable

Reviewer Comment 3.10 — Excellent theory, but the term “PathContainable” could be better motivated. Consider including a brief paragraph before the definition to provide an intuitive explanation of the motivation and a real-world analogy (e.g., proximity-based decision-making in epidemics).

Response: Thank you for this suggestion, we have added this discussion to § 4.4 (second paragraph). Here, we explain the motivation for the PathContainable property, and how it relates to the path-containing strategies for the classic and budget Firefighter problems.

Cite the latest work

Reviewer Comment 3.11 — Cite the latest work.

Response: We have carefully reviewed the suggested papers and, while interesting, have

not found them sufficiently relevant to our work to cite them in the manuscript.

We thank you and the reviewers once again for your time and effort in considering this article.

Yours sincerely,

Ethan Hunter, on behalf of the authors.

Attachment

Submitted filename: Response to Reviewers.pdf

pone.0341222.s016.pdf (291.8KB, pdf)

Decision Letter 1

Jan Rychtář

5 Jan 2026

The Firefighter problem with dynamic defence costs

PONE-D-25-17298R1

Dear Dr. Hunter,

We’re pleased to inform you that your manuscript has been judged scientifically suitable for publication and will be formally accepted for publication once it meets all outstanding technical requirements.

Within one week, you’ll receive an e-mail detailing the required amendments. When these have been addressed, you’ll receive a formal acceptance letter and your manuscript will be scheduled for publication.

An invoice will be generated when your article is formally accepted. Please note, if your institution has a publishing partnership with PLOS and your article meets the relevant criteria, all or part of your publication costs will be covered. Please make sure your user information is up-to-date by logging into Editorial Manager at Editorial Manager® and clicking the ‘Update My Information' link at the top of the page. For questions related to billing, please contact billing support.

If your institution or institutions have a press office, please notify them about your upcoming paper to help maximize its impact. If they’ll be preparing press materials, please inform our press team as soon as possible -- no later than 48 hours after receiving the formal acceptance. Your manuscript will remain under strict press embargo until 2 pm Eastern Time on the date of publication. For more information, please contact onepress@plos.org.

Kind regards,

Jan Rychtář

Academic Editor

PLOS One

Additional Editor Comments (optional):

Reviewers' comments:

Reviewer's Responses to Questions

Comments to the Author

1. If the authors have adequately addressed your comments raised in a previous round of review and you feel that this manuscript is now acceptable for publication, you may indicate that here to bypass the “Comments to the Author” section, enter your conflict of interest statement in the “Confidential to Editor” section, and submit your "Accept" recommendation.

Reviewer #1: (No Response)

Reviewer #2: All comments have been addressed

Reviewer #3: All comments have been addressed

**********

2. Is the manuscript technically sound, and do the data support the conclusions?

The manuscript must describe a technically sound piece of scientific research with data that supports the conclusions. Experiments must have been conducted rigorously, with appropriate controls, replication, and sample sizes. The conclusions must be drawn appropriately based on the data presented.

Reviewer #1: No

Reviewer #2: Yes

Reviewer #3: Yes

**********

3. Has the statistical analysis been performed appropriately and rigorously?

Reviewer #1: No

Reviewer #2: N/A

Reviewer #3: Yes

**********

4. Have the authors made all data underlying the findings in their manuscript fully available?

The PLOS Data policy requires authors to make all data underlying the findings described in their manuscript fully available without restriction, with rare exception (please refer to the Data Availability Statement in the manuscript PDF file). The data should be provided as part of the manuscript or its supporting information, or deposited to a public repository. For example, in addition to summary statistics, the data points behind means, medians and variance measures should be available. If there are restrictions on publicly sharing data—e.g. participant privacy or use of data from a third party—those must be specified.

Reviewer #1: Yes

Reviewer #2: Yes

Reviewer #3: Yes

**********

5. Is the manuscript presented in an intelligible fashion and written in standard English?

PLOS ONE does not copyedit accepted manuscripts, so the language in submitted articles must be clear, correct, and unambiguous. Any typographical or grammatical errors should be corrected at revision, so please note any specific errors here.

Reviewer #1: No

Reviewer #2: Yes

Reviewer #3: Yes

**********

6. Review Comments to the Author

Please use the space provided to explain your answers to the questions above. You may also include additional comments for the author, including concerns about dual publication, research ethics, or publication ethics. (Please upload your review as an attachment if it exceeds 20,000 characters)

Reviewer #1: This paper is more theoretical and less mathematical. The Term Graph Theory is used but Graph Theoretic concepts are not studied in the fashion it is required. Most of the results are based on Theoretical Concepts rather Mathematical. Firefighter Problem is a good topic to study, but it is interesting only if studied through mathematical ways. I, therefore, suggest the authors to make the work more mathematical and less theoretical by using mathematical tools in general and graphical tools in structural properties.

Reviewer #2: (No Response)

Reviewer #3: I have carefully reviewed the manuscript in accordance with the journal’s guidelines. The study is original, technically sound, and clearly presented. The methodology is appropriate, and the results are well supported by the analysis. I did not identify any concerns related to dual publication, plagiarism, data integrity, or research and publication ethics. The manuscript does not appear to have been submitted elsewhere, and all references are properly cited.

The authors have adequately addressed relevant literature and clearly stated the contributions of their work. Overall, the paper meets the ethical and academic standards of the journal, and I have no additional ethical concerns to report.

**********

7. PLOS authors have the option to publish the peer review history of their article (what does this mean?). If published, this will include your full peer review and any attached files.

If you choose “no”, your identity will remain anonymous but your review may still be made public.

Do you want your identity to be public for this peer review? For information about this choice, including consent withdrawal, please see our Privacy Policy.

Reviewer #1: No

Reviewer #2: No

Reviewer #3: Yes: Sikander Ali

**********

Acceptance letter

Jan Rychtář

PONE-D-25-17298R1

PLOS One

Dear Dr. Hunter,

I'm pleased to inform you that your manuscript has been deemed suitable for publication in PLOS One. Congratulations! Your manuscript is now being handed over to our production team.

At this stage, our production department will prepare your paper for publication. This includes ensuring the following:

* All references, tables, and figures are properly cited

* All relevant supporting information is included in the manuscript submission,

* There are no issues that prevent the paper from being properly typeset

You will receive further instructions from the production team, including instructions on how to review your proof when it is ready. Please keep in mind that we are working through a large volume of accepted articles, so please give us a few days to review your paper and let you know the next and final steps.

Lastly, if your institution or institutions have a press office, please let them know about your upcoming paper now to help maximize its impact. If they'll be preparing press materials, please inform our press team within the next 48 hours. Your manuscript will remain under strict press embargo until 2 pm Eastern Time on the date of publication. For more information, please contact onepress@plos.org.

You will receive an invoice from PLOS for your publication fee after your manuscript has reached the completed accept phase. If you receive an email requesting payment before acceptance or for any other service, this may be a phishing scheme. Learn how to identify phishing emails and protect your accounts at https://explore.plos.org/phishing.

If we can help with anything else, please email us at customercare@plos.org.

Thank you for submitting your work to PLOS ONE and supporting open access.

Kind regards,

PLOS ONE Editorial Office Staff

on behalf of

Dr. Jan Rychtář

Academic Editor

PLOS One

Associated Data

    This section collects any data citations, data availability statements, or supplementary materials included in this article.

    Supplementary Materials

    S1 Fig. Simulation result plots for Erdős-Rényi graphs on 100 vertices with probability 0.1.

    (TIFF)

    pone.0341222.s001.tif (157.8KB, tif)
    S2 Fig. Simulation result plots for Erdős-Rényi graphs on 100 vertices with probability 0.15.

    (TIFF)

    pone.0341222.s002.tif (151.7KB, tif)
    S3 Fig. Simulation result plots for Barabási-Albert graphs on 100 vertices with 1 edge per vertex.

    (TIFF)

    pone.0341222.s003.tif (223.5KB, tif)
    S4 Fig. Simulation result plots for Barabási-Albert graphs on 100 vertices with 3 edges per vertex.

    (TIFF)

    pone.0341222.s004.tif (154KB, tif)
    S5 Fig. Simulation result plots for Barabási-Albert graphs on 100 vertices with 5 edges per vertex.

    (TIFF)

    pone.0341222.s005.tif (163.4KB, tif)
    S6 Fig. Simulation result plots for clustered power-law graphs on 100 with 3 edges per vertex.

    (TIFF)

    pone.0341222.s006.tif (156.5KB, tif)
    S7 Fig. Simulation result plots for clustered power-law graphs on 100 with 4 edges per vertex.

    (TIFF)

    pone.0341222.s007.tif (135.7KB, tif)
    S8 Fig. Simulation result plots for Watts-Strogatz graphs on 100 vertices with mean degree 6.

    (TIFF)

    pone.0341222.s008.tif (164.1KB, tif)
    S9 Fig. Simulation result plots for Watts-Strogatz graphs on 100 vertices with mean degree 8.

    (TIFF)

    pone.0341222.s009.tif (152.6KB, tif)
    S10 Fig. Simulation result plots for randomly generated geometric graphs on 100 vertices with radius 0.2.

    (TIFF)

    pone.0341222.s010.tif (183KB, tif)
    S11 Fig. Simulation result plots for randomly generated 4-regular graphs on 100 vertices.

    (TIFF)

    pone.0341222.s011.tif (145.1KB, tif)
    S12 Fig. Simulation result plots for randomly generated 6-regular graphs on 100 vertices.

    (TIFF)

    pone.0341222.s012.tif (158.6KB, tif)
    Attachment

    Submitted filename: PONE-D-25-17298.pdf

    pone.0341222.s013.pdf (467.9KB, pdf)
    Attachment

    Submitted filename: plos1.pdf

    pone.0341222.s014.pdf (48.5KB, pdf)
    Attachment

    Submitted filename: Review Report-for Plos.docx

    pone.0341222.s015.docx (17.4KB, docx)
    Attachment

    Submitted filename: Response to Reviewers.pdf

    pone.0341222.s016.pdf (291.8KB, pdf)

    Data Availability Statement

    The contact graph data used for simulations are available under a Creative Commons Attribution-ShareAlike licence: sleepy lizard data at https://doi.org/10.5061/dryad.jk87h and raccoon data at https://doi.org/10.5061/dryad.gr40r. The code used to perform simulations is publicly available at https://github.com/Ethan-CS/CostFnFire. Full simulation results, including random generation seeds and strategies for verification, are publicly available at https://doi.org/10.6084/m9.figshare.30053002.v1.


    Articles from PLOS One are provided here courtesy of PLOS

    RESOURCES