We study the problem of finding, in a directed graph, an st-walk of length r mod q which is edge-minimum, i.e., uses the smallest number of distinct edges. Despite the vast literature on paths and cycles with modularity constraints, to the best of our knowledge we are the first to study this problem. Our main result is a polynomial-time algorithm that solves this task when r and q are constants. We also show how our proof technique gives an algorithm to solve a generalization of the well-known Directed Steiner Network problem, in which connections between endpoint pairs are required to satisfy modularity constraints on their length. Our algorithm is polynomial when the number of endpoint pairs and the modularity constraints on the pairs are constants.
翻译:我们研究在有向图中寻找长度为模q余r的st-游走(st-walk)且使其边最小化的问题,即使用最少的不同边。尽管关于带模约束的路径和环已有大量文献,但据我们所知,我们是首个研究该问题的团队。我们的主要成果是当r和q为常数时,能解决该任务的多项式时间算法。我们还展示了如何通过证明技术得到解决著名有向斯坦纳网络(Directed Steiner Network)问题推广形式的算法,其中端点对之间的连接需满足其长度的模约束条件。当端点对数量及各对的模约束为常数时,我们的算法具有多项式时间复杂度。