# The Moving Firefighter Problem

^{1}

^{2}

^{3}

^{*}

^{†}

## Abstract

**:**

## 1. Introduction

## 2. Related Work

## 3. The Moving Firefighter Problem

**Definition**

**1.**

**Decision version of the 1-MFP problem:**Given an arbitrary instance $\langle G=(V,E),F,a,\tau ,1,{T}_{S}\rangle $ of 1-MFP and an integer $k\ge 1$, is there a valid sequence ${\mathcal{S}}_{moving}$ of vertices defended by the firefighter such that the number of burnt vertices at the end of the process is at most k?

#### 1-MFP Is NP-Complete

**Definition**

**2.**

**Decision version of the 1-FP problem:**Given an arbitrary instance $\langle G=(V,E),F\rangle $ of 1-FP, where $F\subset V$ is the set of vertices where the fire breaks out and an integer $k\ge 1$, is there a sequence ${\mathcal{S}}_{original}$ of vertices defended by the firefighter such that the number of burnt vertices at the end of the process is at most k?

**Lemma**

**1.**

**Proof of Lemma 1.**

**Lemma**

**2.**

**Proof of Lemma 2.**

**Theorem**

**1.**

**Proof of Theorem 1.**

## 4. Mixed-Integer Quadratically Constrained Program for the 1-MFP

**d**can be further extended to matrices

**d’**${}_{j}$ and

**p**${}_{j}$ (see Equations (26) and (27)), where $j\in [1,B]$.

**d’**${}_{j}$) is copied into column j of matrix

**d**. In other words, each column j of matrix

**d**is a summary of what happens inside each matrix

**d’**${}_{j}$. Similarly to Constraint (4), Constraint (9) indicates that once a vertex is defended at the $k\mathrm{th}$ defense round of the $j\mathrm{th}$ burning round, it will stay defended.

**p**${}_{j}$ is to report the last defended vertex at each defense round within each burning round. Notice that ${p}_{j,i,k}=1$ might mean two different things: vertex ${v}_{i}$ has been defended precisely at the $k\mathrm{th}$ defense round within burning round j (Constraints (10) and (11)), or vertex ${v}_{i}$ is the last vertex defended at some previous round. Constraint (12) guarantees that exactly one vertex is the last defended at each defense round. Please note that Constraint (18) establishes that the anchor point a is defended at the beginning of the process. For convenience, we can organize these variables in a matrix

**p**${}_{j}$ for each burning round (see Equation (27)).

**p**. When a new vertex becomes defended, these constraints are deactivated by making the right-hand side equal to zero. In this case, the subsequent columns are no longer a copy of the previous ones; instead, the currently defended vertex is updated. Constraints (15) and (16) guarantee that the time ${t}_{j}$ needed to carry out a sequence of defended vertices within the $j\mathrm{th}$ burning round does not exceed the current number j of time slots of the diffusive process. By these two constraints, Constraints (3) and (5)–(14), which define the relationship between the defended vertices and the dynamics of the diffusive process, the firefighter cannot defend a vertex that the fire has already spread to (which is consistent with Equation (1)).

## 5. Experimental Performance Evaluation

## 6. Conclusions

## Author Contributions

## Funding

## Data Availability Statement

## Conflicts of Interest

## References

- Hartnell, B. Firefighter! an application of domination. In Proceedings of the the 24th Manitoba Conference on Combinatorial Mathematics and Computing, University of Manitoba, Winnipeg, ON, Canada, 30 September–2 October 1994. [Google Scholar]
- Finbow, S.; MacGillivray, G. The Firefighter Problem: A survey of results, directions and questions. Australas. J. Comb.
**2009**, 43, 57–78. [Google Scholar] - Khakzad, N. A graph theoretic approach to optimal firefighting in oil terminals. Energies
**2018**, 11, 3101. [Google Scholar] [CrossRef] [Green Version] - Wang, K.; Yuan, Y.; Chen, M.; Lou, Z.; Zhu, Z.; Li, R. A Study of Fire Drone Extinguishing System in High-Rise Buildings. Fire
**2022**, 5, 75. [Google Scholar] [CrossRef] - Fogarty, P. Catching the Fire on Grids. Master’s Thesis, Department of Mathematics, University of Vermont, Burlington, VT, USA, 2003. [Google Scholar]
- Develin, M.; Hartke, S.G. Fire containment in grids of dimension three and higher. Discret. Appl. Math.
**2007**, 155, 2257–2268. [Google Scholar] [CrossRef] [Green Version] - Ng, K.L.; Raff, P. A generalization of the firefighter problem on Z × Z. Discret. Appl. Math.
**2008**, 156, 730–745. [Google Scholar] [CrossRef] [Green Version] - Anshelevich, E.; Chakrabarty, D.; Hate, A.; Swamy, C. Approximation algorithms for the firefighter problem: Cuts over time and submodularity. In Proceedings of the International Symposium on Algorithms and Computation; Springer: Berlin, Germany, 2009; pp. 974–983. [Google Scholar]
- King, A.; MacGillivray, G. The firefighter problem for cubic graphs. Discret. Math.
**2010**, 310, 614–621. [Google Scholar] [CrossRef] [Green Version] - Bonato, A.; Messinger, M.E.; Prałat, P. Fighting constrained fires in graphs. Theor. Comput. Sci.
**2012**, 434, 11–22. [Google Scholar] [CrossRef] [Green Version] - Bazgan, C.; Chopin, M.; Ries, B. The firefighter problem with more than one firefighter on trees. Discret. Appl. Math.
**2013**, 161, 899–908. [Google Scholar] [CrossRef] - Klein, R.; Levcopoulos, C.; Lingas, A. Approximation algorithms for the geometric firefighter and budget fence problems. In Proceedings of the Latin American Symposium on Theoretical Informatics; Springer: Berlin, Germany, 2014; pp. 261–272. [Google Scholar]
- Anshelevich, E.; Chakrabarty, D.; Hate, A.; Swamy, C. Approximability of the firefighter problem. Algorithmica
**2012**, 62, 520–536. [Google Scholar] [CrossRef] - Michalak, K.; Knowles, J.D. Simheuristics for the multiobjective nondeterministic firefighter problem in a time-constrained setting. In Proceedings of the European Conference on the Applications of Evolutionary Computation; Springer: Berlin, Germany, 2016; pp. 248–265. [Google Scholar]
- Klein, R.; Levcopoulos, C.; Lingas, A. Approximation algorithms for the geometric firefighter and budget fence problems. Algorithms
**2018**, 11, 45. [Google Scholar] [CrossRef] [Green Version] - Coupechoux, P.; Demange, M.; Ellison, D.; Jouve, B. Firefighting on trees. Theor. Comput. Sci.
**2019**, 794, 69–84. [Google Scholar] [CrossRef] - Zambon, M.J.; de Rezende, P.J.; de Souza, C.C. Solving the geometric firefighter routing problem via integer programming. Eur. J. Oper. Res.
**2019**, 274, 1090–1101. [Google Scholar] [CrossRef] - Farhadi, M.; Toriello, A.; Tetali, P. The Traveling Firefighter Problem. In Proceedings of the SIAM Conference on Applied and Computational Discrete Algorithms (ACDA21), Philadelphia, PA, USA, 19–21 July 2021; pp. 205–216. [Google Scholar]
- Granwal, L. Area of Bushfire Damage in Australia 2020 by Land Type. 2022. Available online: https://www.statista.com/statistics/1093799/australia-bushfire-damage-area-by-land-type/ (accessed on 14 April 2022).
- Sönnichsen, N. Acres Burned by Wildfires in the United States from 1983 to 2020. 2021. Available online: https://www.statista.com/statistics/203990/area-of-acres-burnt-due-to-wildland-fires-in-the-us/ (accessed on 14 April 2022).
- Alves, B. Number of Wildfires in Brazilian Biomes in 2021, by Type of Biome. 2022. Available online: https://www.statista.com/statistics/1044209/number-wildfires-brazil-biome/ (accessed on 14 April 2022).
- MacGillivray, G.; Wang, P. On the firefighter problem. JCMCC J. Comb. Math. Comb. Comput.
**2003**, 47, 57–78. [Google Scholar] - Chlebíková, J.; Chopin, M. The firefighter problem: Further steps in understanding its complexity. Theor. Comput. Sci.
**2017**, 676, 42–51. [Google Scholar] [CrossRef] [Green Version] - Fomin, F.V.; Heggernes, P.; van Leeuwen, E.J. The firefighter problem on graph classes. Theor. Comput. Sci.
**2016**, 613, 38–50. [Google Scholar] [CrossRef] - Finbow, S.; King, A.; MacGillivray, G.; Rizzi, R. The firefighter problem for graphs of maximum degree three. Discret. Math.
**2007**, 307, 2094–2105. [Google Scholar] [CrossRef] [Green Version] - 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 Computing. Congressus Numerantium 145, Boca Raton, FL, USA, 11 September 2000; pp. 187–192. [Google Scholar]
- Cai, L.; Verbin, E.; Yang, L. Firefighting on trees: (1- 1/e)–approximation, fixed parameter tractability and a subexponential algorithm. In Proceedings of the International Symposium on Algorithms and Computation; Springer: Berlin, Germany, 2008; pp. 258–269. [Google Scholar]
- Iwaikawa, Y.; Kamiyama, N.; Matsui, T. Improved approximation algorithms for firefighter problem on trees. IEICE Trans. Inf. Syst.
**2011**, 94, 196–199. [Google Scholar] [CrossRef] [Green Version] - Adjiashvili, D.; Baggio, A.; Zenklusen, R. Firefighting on trees beyond integrality gaps. ACM Trans. Algorithms (TALG)
**2018**, 15, 1–33. [Google Scholar] - Bazgan, C.; Chopin, M.; Cygan, M.; Fellows, M.R.; Fomin, F.V.; Van Leeuwen, E.J. Parameterized complexity of firefighting. J. Comput. Syst. Sci.
**2014**, 80, 1285–1297. [Google Scholar] [CrossRef] - Bonato, A.; Janssen, J.; Roshanbin, E. Burning a graph as a model of social contagion. In Proceedings of the International Workshop on Algorithms and Models for the Web-Graph; Springer: Berlin, Germany, 2014; pp. 13–22. [Google Scholar]
- Bessy, S.; Bonato, A.; Janssen, J.; Rautenbach, D.; Roshanbin, E. Burning a graph is hard. Discret. Appl. Math.
**2017**, 232, 73–87. [Google Scholar] [CrossRef] - García-Díaz, J.; Pérez-Sansalvador, J.C.; Rodríguez-Henríquez, L.M.X.; Cornejo-Acosta, J.A. Burning graphs through farthest-first traversal. IEEE Access
**2022**, 10, 30395–30404. [Google Scholar] [CrossRef] - Kempe, D.; Kleinberg, J.; Tardos, É. Maximizing the spread of influence through a social network. In Proceedings of the Proceedings of the Ninth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Washington, DC, USA, 24–27 August 2003; pp. 137–146. [Google Scholar]
- Banerjee, S.; Jenamani, M.; Pratihar, D.K. A survey on influence maximization in a social network. Knowl. Inf. Syst.
**2020**, 62, 3417–3455. [Google Scholar] [CrossRef] [Green Version] - López-García, Á.O.; Rodríguez-Gómez, G.; López-López, A. A Physarum-Inspired Approach for Influence Maximization. In Proceedings of the International Conference on Metaheuristics and Nature Inspired Computing; Springer: Berlin, Germany, 2021; pp. 18–32. [Google Scholar]
- García-Díaz, J.; Rodríguez-Henríquez, L.M.X.; Pérez-Sansalvador, J.C.; Pomares-Hernández, S.E. Graph Burning: Mathematical Formulations and Optimal Solutions. Mathematics
**2022**, 10, 2777. [Google Scholar] [CrossRef] - QMKPy: A Python Testbed for the Quadratic Multiple Knapsack Problem. arXiv
**2022**, arXiv:2211.17222. - A two-stage algorithm for the Virtual Network Embedding problem. In Proceedings of the 2021 IEEE 46th Conference on Local Computer Networks (LCN), Edmonton, AB, Canada, 4–7 October 2021.

**Figure 2.**State of the matrices defined by the MIQCP for the optimal solution of the instance defined in Figure 1. Here, ${T}_{S}=1$, $B=3$, and $D=2$.

**Figure 3.**Running time with one initial fire (

**left**) and three initial fires (

**right**). The x axis shows the number of vertices in the input graph, and the y axis shows the running time in seconds. The solid lines represent the average values over ten random instances, and the shaded regions are the confidence intervals for a confidence level of $95\%$.

**Figure 4.**Numbers of burnt vertices with one initial fire (

**left**) and three initial fires (

**right**). The x axis shows the number of vertices in the input graph, and the y axis shows the number of burnt vertices at the end of the process. The solid lines represent the average values over ten random instances, and the shaded regions are the confidence intervals for a confidence level of $95\%$.

Reference | Contributions |
---|---|

[1] | Hartnell introduces the Firefighter Problem (FP). |

[9,11,22,23,24] | The FP is NP-hard for different graph families. |

[22,24,25] | Instances where the FP is in P. |

[8,26,27,28,29] | Approximation results for the FP. |

[30] | The FP is W[1]-hard on general graphs with more than one firefighter. |

[6] | Presents an integer linear program (ILP) for the FP. |

[7] | Presents a version of the FP with a variable number of firefighters. |

[9,11] | Present the S-Fire version of the FP, which aims to protect a subset of the vertices. |

[8,13] | A version of the FP where the protection propagates from defended nodes. |

[14] | Version of the FP with nondeterministic fire propagation. |

[5] | Introduces the Fractional Firefighter Problem. |

[16] | An Online version of the Fractional Firefighter Problem. |

[6,10] | Examine a two-player version of the FP called the k-Firefighter. |

[12,15,17] | The Geometric Firefighter Problem. |

[18] | Presents the Traveling Firefighter Problem (${L}_{2}$-TSP) |

[31,32,33] | Investigate the relation between the FP and the Graph Burning Problem. |

$\mathit{G}=(\mathit{V},\mathit{E})$ | Input graph. |

F | Set of vertices where the fire breaks out. |

a | Firefighters’ depot or anchor point. |

$\tau $ | Travel time function. |

f | Number of firefighters. |

${T}_{S}$ | Length of the time slots (burning round). |

$\langle G,F,$$a,\tau ,f,{T}_{S}\rangle $ | Instance of the 1-MFP. |

$\langle G,F\rangle $ | Instance of the 1-FP. |

$\mathcal{S}=(a,{u}_{1},\dots ,{u}_{l})$ | Defending sequence. |

${\beta}_{{\mathcal{S}}_{i}}$ | Time when vertex ${u}_{i}$ burns, given the truncated defending sequence ${\mathcal{S}}_{i}=(a,{u}_{1},\dots ,{u}_{i-1})$. |

$\mathbb{S}=\{{\mathcal{S}}_{1},\dots ,{\mathcal{S}}_{f}\}$ | Set of defending sequences for $f>1$. |

B | Upper bound on the number of burning rounds (or time slots). |

D | Upper bound on the number of vertices defended within a single burning round. |

${b}_{i,j}$ | Binary variable that indicates whether ${v}_{i}$ is burning at the j-th burning round. |

${d}_{i,j}$ | Binary variable that indicates whether ${v}_{i}$ is defended at the j-th burning round. |

${d}_{j,i,k}^{\prime}$ | Binary variable that indicates whether ${v}_{i}$ is defended at the k-th defense round of the j-th burning round. |

${p}_{j,i,k}$ | Binary variable that indicates whether ${v}_{i}$ was the last defended vertex at the k-th defense round of the j-th burning round. |

${t}_{j}$ | Continuous variable that indicates the time needed to carry out a defending sequence within the $j$-th burning round. |

$\mathbf{b}$ | $n\times B$ matrix that contains the ${b}_{i,j}$ binary variables. |

$\mathbf{d}$ | $n\times B$ matrix that contains the ${d}_{i,j}$ binary variables. |

${{\mathbf{d}}^{\prime}}_{j}$ | $n\times D$ matrix that contains the ${d}_{j,i,k}^{\prime}$ binary variables. |

${\mathbf{p}}_{j}$ | $n\times D$ matrix that contains the ${p}_{j,i,k}$ binary variables. |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Gutiérrez-De-La-Paz, B.R.; García-Díaz, J.; Menchaca-Méndez, R.; Montenegro-Meza, M.A.; Menchaca-Méndez, R.; Gutiérrez-De-La-Paz, O.A.
The Moving Firefighter Problem. *Mathematics* **2023**, *11*, 179.
https://doi.org/10.3390/math11010179

**AMA Style**

Gutiérrez-De-La-Paz BR, García-Díaz J, Menchaca-Méndez R, Montenegro-Meza MA, Menchaca-Méndez R, Gutiérrez-De-La-Paz OA.
The Moving Firefighter Problem. *Mathematics*. 2023; 11(1):179.
https://doi.org/10.3390/math11010179

**Chicago/Turabian Style**

Gutiérrez-De-La-Paz, Bruno R., Jesús García-Díaz, Rolando Menchaca-Méndez, Mauro A. Montenegro-Meza, Ricardo Menchaca-Méndez, and Omar A. Gutiérrez-De-La-Paz.
2023. "The Moving Firefighter Problem" *Mathematics* 11, no. 1: 179.
https://doi.org/10.3390/math11010179