Fanciful Figurines flip Free Flood-It -- Polynomial-Time Miniature Painting on Co-gem-free Graphs
Inspired by the eponymous hobby, we introduce Miniature Painting as the computational problem to paint a given graph $G=(V,E)$ according to a prescribed template $t \colon V \rightarrow C$, which assigns colors $C$ to the vertices of $G$. In this setting, the goal is to realize the template using a shortest possible sequence of brush strokes, where each stroke overwrites a connected vertex subset with a color in $C$. We show that this problem is equivalent to a reversal of the well-studied Free Flood-It game, in which a colored graph is decolored into a single color using as few moves as possible. This equivalence allows known complexity results for Free Flood-It to be transferred directly to Miniature Painting, including NP-hardness under severe structural restrictions, such as when $G$ is a grid, a tree, or a split graph. Our main contribution is a polynomial-time algorithm for Miniature Painting on graphs that are free of induced co-gems, a graph class that strictly generalizes cographs. As a direct consequence, Free Flood-It is also polynomial-time solvable on co-gem-free graphs, independent of the initial coloring.
💡 Research Summary
The paper introduces the Miniature Painting problem, where a graph G with a prescribed color template t must be realized using the smallest possible number of brush strokes. A stroke consists of selecting a connected vertex set A and recoloring all vertices in A with a single color c. The authors prove a precise equivalence between Miniature Painting and the well‑studied Free Flood‑It game: a graph that can be painted in s strokes from an empty canvas can be flooded to a monochrome state in s − 1 moves when initially colored according to t, and vice‑versa. This equivalence immediately transfers all known hardness results for Free Flood‑It to Miniature Painting, establishing NP‑hardness even on highly restricted graph families such as grids, trees, and split graphs, and confirming that the problem remains intractable for three‑color templates unless P = NP.
The central contribution is a polynomial‑time algorithm for both problems on co‑gem‑free graphs. A co‑gem is a P₄ (path on four vertices) together with an additional independent vertex; forbidding this induced subgraph yields a class that strictly contains cographs. The authors observe that in any connected co‑gem‑free graph every induced P₄ forms a dominating set. Leveraging this structural property, they first normalize any painting plan into a “recursive” form where each stroke paints a monochromatic region that already constitutes a color component. This normalization avoids complications when reversing strokes into Flood‑It moves.
The algorithm then proceeds by a divide‑and‑conquer strategy based on dominating sets. Because any two distinct dominating sets in a connected co‑gem‑free graph partition the vertex set, the graph can be recursively split into smaller subgraphs whose optimal painting can be computed independently. For each subgraph the recursive strokes are applied, and the solutions are merged while preserving optimality. The overall running time is O(n³) for a graph with n vertices.
Through the established equivalence, the same algorithm yields an optimal Flood‑It strategy on co‑gem‑free graphs, independent of the initial coloring. Consequently, the paper not only expands the tractable frontier for Free Flood‑It but also provides a fresh perspective by framing the problem as a painting task, which proves instrumental in designing the algorithm. The work highlights how subtle structural restrictions—here the absence of co‑gems—can turn a generally hard combinatorial game into a polynomial‑time solvable problem, enriching both graph algorithm theory and the study of combinatorial games.
Comments & Academic Discussion
Loading comments...
Leave a Comment