In a vertex-colored graph $G = (V, E)$, a subset $S \subseteq V$ is said to be consistent if every vertex has a nearest neighbor in $S$ with the same color. The problem of computing a minimum cardinality consistent subset of a graph is known to be NP-hard. On the positive side, Dey et al. (FCT 2021) show that this problem is solvable in polynomial time when input graphs are restricted to bi-colored trees. In this paper, we give a polynomial-time algorithm for this problem on $k$-colored trees with fixed $k$.
翻译:在顶点染色图 $G = (V, E)$ 中,若每个顶点在 $S$ 中都有一个颜色相同的最近邻,则称子集 $S \subseteq V$ 是一致的。计算图的最小基数一致子集问题已知是NP难的。从正面来看,Dey等人(FCT 2021)证明,当输入图限制为双色树时,该问题可在多项式时间内求解。本文针对固定颜色数 $k$ 的 $k$ 色树,给出了该问题的一个多项式时间算法。