We introduce the Red-Blue Separation problem on graphs, where we are given a graph $G=(V,E)$ whose vertices are colored either red or blue, and we want to select a (small) subset $S \subseteq V$, called red-blue separating set, such that for every red-blue pair of vertices, there is a vertex $s \in S$ whose closed neighborhood contains exactly one of the two vertices of the pair. We study the computational complexity of Red-Blue Separation, in which one asks whether a given red-blue colored graph has a red-blue separating set of size at most a given integer. We prove that the problem is NP-complete even for restricted graph classes. We also show that it is always approximable in polynomial time within a factor of $2\ln n$, where $n$ is the input graph's order. In contrast, for triangle-free graphs and for graphs of bounded maximum degree, we show that Red-Blue Separation is solvable in polynomial time when the size of the smaller color class is bounded by a constant. However, on general graphs, we show that the problem is $W[2]$-hard even when parameterized by the solution size plus the size of the smaller color class. We also consider the problem Max Red-Blue Separation where the coloring is not part of the input. Here, given an input graph $G$, we want to determine the smallest integer $k$ such that, for every possible red-blue coloring of $G$, there is a red-blue separating set of size at most $k$. We derive tight bounds on the cardinality of an optimal solution of Max Red-Blue Separation, showing that it can range from logarithmic in the graph order, up to the order minus one. We also give bounds with respect to related parameters. For trees however we prove an upper bound of two-thirds the order. We then show that Max Red-Blue Separation is NP-hard, even for graphs of bounded maximum degree, but can be approximated in polynomial time within a factor of $O(\ln^2 n)$.
翻译:我们在图形中引入红色- 蓝色分隔问题, 在图形中给我们给出一个图形 $G= (V,E) 的计算复杂度, 在其中我们研究红蓝色分隔的计算复杂度, 在其中我们询问给定的红蓝色颜色图形是否以红色- 美元为颜色或蓝色为颜色, 我们想要选择一个( 小的)子子 $S\ subseteque V$, 被称为红色- 蓝色分离的设置, 在每一个红色蓝色的顶端, 在每双蓝色的顶端, 在每双蓝色的顶端, 在每平面的顶端, 我们有一个顶端的顶端, 在每平面的顶端, 在红色的顶端, 在红色的顶端, 我们的底色的底端, 在红色的底端, 在红色的底端, 最底层的底端, 我们的底端, 在红色的底部, 最底部, 显示一个固定的底部, 的底部, 当我们平面的底部, 的底色的底部, 当我们平面, 显示一个固定的底部, 的底色的底部, 的底色的底部, 显示一个直色的底部, 。