Given a rectilinear grid $G$, in which cells are either assigned a single color, out of $k$ possible colors, or remain white, can we color white grid cells of $G$ to minimize the total number of corners of the resulting colored rectilinear polygons in $G$? We show how this problem relates to hypergraph visualization, prove that it is NP-hard even for $k=2$, and present an exact dynamic programming algorithm. Together with a set of simple kernelization rules, this leads to an FPT-algorithm in the number of colored cells of the input. We additionally provide an XP-algorithm in the solution size, and a polynomial $\mathcal{O}(OPT)$-approximation algorithm.
翻译:给定一个矩形网格 $G$,其中每个单元要么被赋予 $k$ 种可能颜色中的一种颜色,要么保持白色,我们能否对 $G$ 中的白色网格单元进行着色,以最小化 $G$ 中最终生成的彩色矩形多边形中角点的总数?我们展示了该问题与超图可视化的关联,证明了即使对于 $k=2$ 该问题也是NP难的,并提出了一种精确的动态规划算法。结合一组简单的核化规则,该算法在输入中彩色单元数量上实现了FPT算法。此外,我们还提供了一种关于解规模的XP算法,以及一个多项式时间的 $\mathcal{O}(OPT)$ 近似算法。