Given a multigraph $G$ whose edges are colored from the set $[q]:=\{1,2,\ldots,q\}$ (\emph{$q$-colored graph}), and a vector $\alpha=(\alpha_1,\ldots,\alpha_{q}) \in \mathbb{N}^{q}$ (\emph{color-constraint}), a subgraph $H$ of $G$ is called \emph{$\alpha$-colored}, if $H$ has exactly $\alpha_i$ edges of color $i$ for each $i \in[q]$. In this paper, we focus on $\alpha$-colored arborescences (spanning out-trees) in $q$-colored multidigraphs. We study the decision, counting and search versions of this problem. It is known that the decision and search problems are polynomial-time solvable when $q=2$ and that the decision problem is NP-complete when $q$ is arbitrary. However the complexity status of the problem for fixed $q$ was open for $q > 2$. We show that, for a $q$-colored digraph $G$ and a vertex $s$ in $G$, the number of $\alpha$-colored arborescences in $G$ rooted at $s$ for all color-constraints $\alpha \in \mathbb{N}^q$ can be read from the determinant of a symbolic matrix in $q-1$ indeterminates. This result extends Tutte's matrix-tree theorem for directed graphs and gives a polynomial-time algorithm for the counting and decision problems for fixed $q$. We also use it to design an algorithm that finds an $\alpha$-colored arborescence when one exists. Finally, we study the weighted variant of the problem and give a polynomial-time algorithm (when $q$ is fixed) which finds a minimum weight solution.
翻译:给定一个多重图$G$,其边从集合$[q]:=\{1,2,\ldots,q\}$着色(称为\emph{$q$-着色图}),以及一个向量$\alpha=(\alpha_1,\ldots,\alpha_{q}) \in \mathbb{N}^{q}$(称为\emph{颜色约束}),若$G$的子图$H$对每个$i \in[q]$恰好包含$\alpha_i$条颜色为$i$的边,则称$H$为\emph{$\alpha$-着色子图}。本文聚焦于$q$-着色多重有向图中$\alpha$-着色的树形图(生成外向树)。我们研究了该问题的判定、计数与搜索版本。已知当$q=2$时,判定与搜索问题可在多项式时间内求解;而当$q$为任意值时,判定问题是NP完全的。然而对于固定$q>2$的情况,该问题的复杂度状态此前尚未明确。我们证明:对于$q$-着色有向图$G$及其顶点$s$,所有颜色约束$\alpha \in \mathbb{N}^q$下以$s$为根的$\alpha$-着色树形图数量,可通过一个含$q-1$个未定元的符号矩阵的行列式求得。该结果推广了有向图的Tutte矩阵-树定理,并为固定$q$时的计数与判定问题提供了多项式时间算法。基于此,我们进一步设计了在存在时寻找$\alpha$-着色树形图的算法。最后,我们研究了问题的加权变体,并给出了在固定$q$时可寻找最小权值解的多项式时间算法。