Free Flood-It Game Analysis
- Free Flood-It is a combinatorial graph recoloring game defined by its ability to flood any vertex, transforming an initial multicolor graph into a monochromatic state.
- The game exhibits diverse computational behaviors: it is solvable in polynomial time for two colors but becomes NP-hard with three or more colors on many graph classes.
- Algorithmic approaches, including spanning tree reductions and dynamic programming, provide key insights into move optimization, parameterized complexity, and approximation bounds.
Free Flood-It is a combinatorial graph recoloring game with significant connections to algorithmic graph theory, parameterized complexity, and discrete mathematics. Generalizing the classic Flood-It puzzle played on rectangular grids, Free Flood-It allows flooding from any vertex (zone), rather than being confined to a fixed origin. The central optimization objective is to transform an initial coloring into a monochromatic state by performing the minimum number of flooding (recoloring) operations. The computational study of Free Flood-It exposes sharp tractability/intractability phenomena governed by the number of colors, structural restrictions on the underlying graph, and the allowed operations.
1. Formal Definition and Game Mechanics
Let be a finite, connected, undirected graph, and let be a finite set of colors; a coloring is a function . In each move of Free Flood-It, one chooses a vertex and a color . All vertices in the monochromatic component of (i.e., the maximal connected subset containing with ) are recolored to . Adjacent regions (components) of color merge. The sequence continues until the graph is monochromatic, with the goal of minimizing the number of moves.
This dynamic is defined succinctly in (Clifford et al., 2010, Rosenke et al., 31 Jan 2026, Meeks et al., 2012). Typical notations include for the optimal move count.
2. Complexity Landscape and Dichotomy
The computational complexity of Free Flood-It depends critically on the number of colors:
- For : The game is trivial; the board is already monochromatic.
- For : Free Flood-It is solvable in polynomial time on any graph. The minimal move count equals the radius of a certain reduced graph formed from the initial coloring and the game's dynamic is closely tied to repeated neighborhood contractions at graph centers (Lagoutte, 2010, Clifford et al., 2010, Meeks et al., 2011).
- For : The problem is NP-hard on a wide range of graphs, including grids, trees, split graphs, and height-2 boards (Clifford et al., 2010, Meeks et al., 2011, Belmonte et al., 2018, Rosenke et al., 31 Jan 2026). This intractability manifests even for structurally simple instances.
A subset of structural classes—most notably co-gem-free graphs and graphs with polynomially many connected subgraphs—admits efficient algorithms for arbitrary color counts (Rosenke et al., 31 Jan 2026, Meeks et al., 2012).
| Number of Colors | General Graphs | Grids (≥3x n) | 2×n Boards |
|---|---|---|---|
| 1 | Polynomial (trivial) | Polynomial | Polynomial |
| 2 | Polynomial (Lagoutte, 2010) | Polynomial | Polynomial |
| ≥3 | NP-hard (Clifford et al., 2010) | NP-hard | FPT in c (Meeks et al., 2011) / NP-hard for unbounded c |
| Cographs, co-gem-free | Polynomial (Rosenke et al., 31 Jan 2026) | Polynomial | Polynomial |
3. Algorithmic Results and Structural Insights
Two Colors (2-FREE-FLOOD-IT):
- For any properly 2-colored graph, the optimal number of moves equals the radius of the reduced graph defined on monochromatic zones.
- Successive optimal moves contract a center of , reducing the radius by one per move until a single zone remains.
- The entire process is implementable in time, with explicit BFS/DFS-based routines to construct zones, adjacencies, and compute eccentricities (Lagoutte, 2010).
General Colors:
- The minimum number of Free Flood-It moves required on a graph with coloring and color set is given by
where denotes the set of spanning trees of and is the minimum moves required to flood to color (Meeks et al., 2012). This spanning-tree reduction is extensively exploited in algorithmic design.
- If the graph admits only polynomially many connected induced subgraphs (e.g., subdivisions of fixed graphs), dynamic programming over all subgraphs yields a polynomial-time solution.
Special Graph Classes and FPT Results:
- On 2×n boards, for fixed color count , a dynamic programming approach based on path and tree decompositions yields an time fixed-parameter tractable (FPT) algorithm (Meeks et al., 2011).
- For co-gem-free graphs, canonical painting (resp. flooding) plans exist and can be constructed by enumerating induced dominating subgraphs serving as hubs. These plans admit polynomial-time search via bounding the number of critical “tail” moves (Rosenke et al., 31 Jan 2026).
4. Hardness, Parameterized Bounds, and Approximation
- NP-hardness for is established by reductions from classical string problems such as Shortest Common Supersequence, leveraging elaborate gadget constructions on grids, even for simple graphs like trees and height-2 boards (Clifford et al., 2010, Meeks et al., 2011).
- When parameterized by the solution length , Free Flood-It is W[2]-hard; under the Exponential Time Hypothesis, no time algorithm exists (Belmonte et al., 2018).
- The optimum in Free Flood-It is always within a factor 2 of the optimum for Fixed Flood-It (where moves are restricted to a single pivot): , and this bound is tight (Belmonte et al., 2018).
- For fixed-height boards and bounded color count, additive approximation algorithms provide , enabling efficient estimation within a small additive factor (Meeks et al., 2011).
5. Connections to Generalizations and Variants
Recent works generalize Free Flood-It through the lens of brush-based "Miniature Painting," formulating an equivalent optimal painting sequence problem (with shortest possible sequence of colorings to match a template), which is structurally a reversal of Free Flood-It (Rosenke et al., 31 Jan 2026). This equivalence allows transfer of hardness and algorithms between the settings.
Impartial versions, such as the Flag Coloring game, reinterpret Free Flood-It as a two-player impartial game, with Sprague–Grundy values providing a theoretical framework for analyzing game positions. The generalized game is shown to be PSPACE-complete for , highlighting the inherent computational hardness even in the impartial variant (Burke et al., 2022).
6. Open Problems and Future Directions
Several open problems persist:
- Determining the precise complexity status of Free Flood-It on k×n boards for small, fixed k (especially ) and three colors.
- Sharp characterization of tractable graph classes beyond co-gem-free graphs; current maximality results suggest that the next tractable case is pinned down at this class (Rosenke et al., 31 Jan 2026).
- Improved algorithms for parameterized and approximation settings; the existence and tightness of FPT algorithms under varying parameter sets (color count, treewidth, clique-width, neighborhood diversity) remain active research areas (Belmonte et al., 2018).
- Examination of extremal properties, e.g., which colorings maximize the required number of moves for a given graph, and combinatorial properties of random colorings and worst-case constructions (Meeks et al., 2011, Meeks et al., 2011).
These directions reflect the intersection of combinatorial optimization, parameterized algorithms, and game-theoretic analysis characterizing the Free Flood-It game and its generalizations.