Given an edge-colored graph, the Maximum Rainbow Matching problem asks for a maximum-cardinality matching of the graph that contains at most one edge from each color. We provide the following complexity dichotomy for this problem based on the structure of the color classes: Maximum Rainbow Matching admits a polynomial-time algorithm if almost every color class is a complete multipartite graph and it is NP-hard otherwise. To prove the NP-hardness-part of the dichotomy, we first show that the problem remains NP-hard even if every color class is a subgraph on four vertices that is either a matching of size two, a path on four vertices or a paw. We then leverage this result to all color classes that are not complete multipartite graphs. For this purpose, we introduce color-closed graph classes, which seem to be an appropriate notion for obtaining complexity classifications for rainbow problems and may be of independent interest. To prove the positive part of the dichotomy, we show that the problem essentially reduces to computing a maximum $(l, u)$-matching, where we heavily exploit that almost all color classes are complete multipartite graphs. In the case where all color classes are complete multipartite, we provide a polynomial-time algorithm that computes a maximum matching containing at most $m_i$ edges from each color class $i$.
翻译:给定一个边彩色图,最大彩虹匹配问题要求找到图中一个最大基数的匹配,该匹配从每种颜色中最多取一条边。我们基于颜色类的结构,对该问题给出了以下复杂性二分性:如果几乎每个颜色类都是完全多部图,则最大彩虹匹配问题存在多项式时间算法;否则该问题是NP难的。为了证明二分性中的NP难部分,我们首先证明即使每个颜色类都是四顶点上的子图(要么是大小为2的匹配,要么是四顶点路径,要么是爪子图),该问题仍然是NP难的。然后我们利用这一结果推广到所有不是完全多部图的颜色类。为此,我们引入了颜色封闭图类,这似乎是获得彩虹问题复杂性分类的合适概念,并且可能具有独立的研究价值。为了证明二分性中的正面部分,我们证明该问题本质上可简化为计算最大$(l, u)$-匹配,其中我们充分利用了几乎所有颜色类都是完全多部图这一特性。在所有颜色类都是完全多部图的情况下,我们提供了一个多项式时间算法,该算法计算一个最大匹配,使得从每个颜色类$i$中最多包含$m_i$条边。