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.
翻译:受同名爱好的启发,我们引入微缩绘画作为一个计算问题:根据给定的模板$t \colon V \rightarrow C$(该模板将颜色集$C$分配给图$G=(V,E)$的顶点)对图进行着色。在此设定下,目标是通过尽可能短的笔触序列实现模板,其中每个笔触用$C$中的一种颜色覆盖一个连通顶点子集。我们证明该问题等价于对经典的自由泛滥染色游戏进行逆向操作——后者要求用最少的步数将彩色图单色化。这种等价性使得自由泛滥染色的已知复杂性结果可直接迁移至微缩绘画问题,包括在严格结构限制下的NP困难性(例如当$G$为网格图、树或分裂图时)。我们的主要贡献是提出了在无诱导共宝石图(该类图严格推广了补图)上求解微缩绘画问题的多项式时间算法。作为直接推论,自由泛滥染色在无共宝石图上同样具有多项式时间可解性,且与初始着色方案无关。