---
title: Free Flood-It Game Analysis
url: https://www.emergentmind.com/topics/free-flood-it-game
type: topic
---

# Free Flood-It Game Analysis

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 \( G = (V, E) \) be a finite, connected, undirected graph, and let \( C \) be a finite set of colors; a coloring is a function \( f_0: V \to C \). In each move of Free Flood-It, one chooses a vertex \( v \in V \) and a color \( c \in C \). All vertices in the monochromatic component \( K \) of \( v \) (i.e., the maximal connected subset containing \( v \) with \( f(w) = f(v) \)) are recolored to \( c \). Adjacent regions (components) of color \( c \) merge. The sequence continues until the graph is monochromatic, with the goal of minimizing the number of moves.

This dynamic is defined succinctly in [1001.4420], [2602.00690], [1203.2538]. Typical notations include \( OPT_+(G, f_0) \) 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 \( c = 1 \): The game is trivial; the board is already monochromatic.
- For \( c = 2 \): 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 [1008.3091], [1001.4420], [1101.5876].
- For \( c \geq 3 \): The problem is NP-hard on a wide range of graphs, including grids, trees, split graphs, and height-2 boards [1001.4420], [1101.5518], [1804.08236], [2602.00690]. 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 [2602.00690], [1203.2538].

| Number of Colors | General Graphs           | Grids (≥3x n)      | 2×n Boards      |
|------------------|-------------------------|--------------------|-----------------|
| 1                | Polynomial (trivial)    | Polynomial         | Polynomial      |
| 2                | Polynomial [1008.3091]  | Polynomial         | Polynomial      |
| ≥3               | NP-hard [1001.4420]     | NP-hard            | FPT in c [1101.5518] / NP-hard for unbounded c              |
| Cographs, co-gem-free | Polynomial [2602.00690] | 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 \( R(G_{red}) \) of the reduced graph defined on monochromatic zones.
- Successive optimal moves contract a center of \( G_{red} \), reducing the radius by one per move until a single zone remains.
- The entire process is implementable in \( O(nm) \) time, with explicit BFS/DFS-based routines to construct zones, adjacencies, and compute eccentricities [1008.3091].

### General Colors:
- The minimum number of Free Flood-It moves required on a graph \( G \) with coloring \( c \) and color set \( C \) is given by
  \[
  M_G(G, c, d) = \min_{T \in T(G)} M_T(T, c, d)
  \]
  where \( T(G) \) denotes the set of spanning trees of \( G \) and \( M_T(T, c, d) \) is the minimum moves required to flood \( T \) to color \( d \) [1203.2538]. 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 \( c \), a dynamic programming approach based on path and tree decompositions yields an \( O(n^{10} 2^c) \) time fixed-parameter tractable (FPT) algorithm [1101.5518].
- For co-gem-free graphs, canonical painting (resp. flooding) plans exist and can be constructed by enumerating induced dominating \( P_4 \) subgraphs serving as hubs. These plans admit polynomial-time search via bounding the number of critical “tail” moves [2602.00690].

## 4. Hardness, Parameterized Bounds, and Approximation

- NP-hardness for \( c \ge 3 \) 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 [1001.4420], [1101.5518].
- When parameterized by the solution length \( k \), Free Flood-It is W[2]-hard; under the Exponential Time Hypothesis, no \( n^{o(k)} \) time algorithm exists [1804.08236].
- 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): \( OPT_+(G, c_0) \leq OPT_\times(G, c_0, p) \leq 2 \cdot OPT_+(G, c_0) \), and this bound is tight [1804.08236].
- For fixed-height \( k \times n \) boards and bounded color count, additive approximation algorithms provide \( m(B) - c(k-1) \leq A \leq m(B) \), enabling efficient estimation within a small additive factor [1101.5876].

## 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 [2602.00690]. 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 \( k \geq 2 \), highlighting the inherent computational hardness even in the impartial variant [2212.10631].

## 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 \( k = 3 \)) 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 [2602.00690].
- 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 [1804.08236].
- 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 [1101.5518], [1101.5876].

These directions reflect the intersection of combinatorial optimization, parameterized algorithms, and game-theoretic analysis characterizing the Free Flood-It game and its generalizations.

Source: https://www.emergentmind.com/topics/free-flood-it-game