# The Firefighter problem with dynamic defence costs

**Authors:** Ethan Hunter, Jessica Enright, Hoda Bidkhori, Jan Rychtář, Jan Rychtář

PMC · DOI: 10.1371/journal.pone.0341222 · PLOS One · 2026-02-06

## TL;DR

This paper introduces a new version of the Firefighter problem where defending vertices has dynamic costs, and explores its computational complexity and heuristic performance.

## Contribution

The paper introduces the first Firefighter problem variant with dynamic vertex defence costs and analyzes its tractability and heuristic performance.

## Key findings

- The Cost Function Firefighter Problem is computationally hard even on tractable tree classes.
- The problem is fixed-parameter tractable with respect to treewidth, budget, and maximum time step.
- State-based heuristics outperform degree-based ones on most graph structures.

## 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)nℓ−2)-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.

## Full-text entities

- **Diseases:** diseases (MESH:D004194)

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12880756/full.md

## Figures

21 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12880756/full.md

## References

33 references — full list in the complete paper: https://tomesphere.com/paper/PMC12880756/full.md

---
Source: https://tomesphere.com/paper/PMC12880756