P.S. Ardra , Jasine Babu , Kritika Kashyap , R. Krithika , Sreejith K. Pallathumadam , Deepak Rajendraprasad
{"title":"Arborescences and shortest path trees when colors matter","authors":"P.S. Ardra , Jasine Babu , Kritika Kashyap , R. Krithika , Sreejith K. Pallathumadam , Deepak Rajendraprasad","doi":"10.1016/j.tcs.2025.115486","DOIUrl":null,"url":null,"abstract":"<div><div>We are given an edge-colored (directed or undirected) graph and our objective is to find a specific type of subgraph, like a spanning tree, an arborescence, a single-source shortest path tree, a perfect matching etc., with constraints on the number of edges of each color. Some of these problems, like color-constrained spanning tree, have elegant solutions and some of them, like color-constrained perfect matching, are longstanding open questions. In this work, we study color-constrained arborescences and shortest path trees. Computing a color-constrained shortest path tree on weighted digraphs turns out to be <span><math><mi>NP</mi></math></span>-hard in general but polynomial-time solvable when all cycles have positive weight. This polynomial-time solvability is due to the fact that the solution space is essentially the set of all color-constrained arborescences of a directed acyclic subgraph of the original graph. While finding color-constrained arborescences of digraphs is <span><math><mi>NP</mi></math></span>-hard in general, we give an efficient algorithm when the input digraph is acyclic. Consequently, a color-constrained shortest path tree on weighted digraphs having only positive weight cycles can be efficiently computed. Our algorithm generalizes to the problem of finding a color-constrained shortest path tree with the minimum total weight. Both our algorithms use a single source shortest path algorithm and a (minimum cost) maximum flow algorithm as subroutines. By using the recent algorithm by van den Brand et al. (FOCS 2023) for these subroutines, our algorithms achieve near-linear running time when the edge weights are integral and polynomially-bounded in the size of the graph. En route, we sight nice connections to colored matroids and color-constrained bases. In fact, our approach can be adapted to find a largest common independent set of two generalized partition matroids in near-linear time.</div></div>","PeriodicalId":49438,"journal":{"name":"Theoretical Computer Science","volume":"1055 ","pages":"Article 115486"},"PeriodicalIF":1.0000,"publicationDate":"2025-07-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Theoretical Computer Science","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0304397525004244","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, THEORY & METHODS","Score":null,"Total":0}
引用次数: 0
Abstract
We are given an edge-colored (directed or undirected) graph and our objective is to find a specific type of subgraph, like a spanning tree, an arborescence, a single-source shortest path tree, a perfect matching etc., with constraints on the number of edges of each color. Some of these problems, like color-constrained spanning tree, have elegant solutions and some of them, like color-constrained perfect matching, are longstanding open questions. In this work, we study color-constrained arborescences and shortest path trees. Computing a color-constrained shortest path tree on weighted digraphs turns out to be -hard in general but polynomial-time solvable when all cycles have positive weight. This polynomial-time solvability is due to the fact that the solution space is essentially the set of all color-constrained arborescences of a directed acyclic subgraph of the original graph. While finding color-constrained arborescences of digraphs is -hard in general, we give an efficient algorithm when the input digraph is acyclic. Consequently, a color-constrained shortest path tree on weighted digraphs having only positive weight cycles can be efficiently computed. Our algorithm generalizes to the problem of finding a color-constrained shortest path tree with the minimum total weight. Both our algorithms use a single source shortest path algorithm and a (minimum cost) maximum flow algorithm as subroutines. By using the recent algorithm by van den Brand et al. (FOCS 2023) for these subroutines, our algorithms achieve near-linear running time when the edge weights are integral and polynomially-bounded in the size of the graph. En route, we sight nice connections to colored matroids and color-constrained bases. In fact, our approach can be adapted to find a largest common independent set of two generalized partition matroids in near-linear time.
我们给定一个边颜色(有向或无向)图,我们的目标是找到一个特定类型的子图,如生成树,树形,单源最短路径树,完美匹配等,每种颜色的边数量都有约束。其中一些问题,如颜色约束生成树,有优雅的解决方案,而另一些问题,如颜色约束完美匹配,是长期存在的开放问题。在这项工作中,我们研究了颜色约束的树形和最短路径树。在加权有向图上计算颜色约束的最短路径树一般来说是np困难的,但当所有环都是正权时,它是多项式时间可解的。这种多项式时间可解性是由于这样一个事实,即解空间本质上是原始图的有向无环子图的所有颜色约束树的集合。一般情况下,寻找有向图的颜色约束树是np困难的,我们给出了一个输入有向图为无环时的有效算法。因此,可以有效地计算只有正权环的加权有向图上的颜色约束最短路径树。我们的算法推广到寻找具有最小总权重的颜色约束的最短路径树的问题。我们的算法都使用单源最短路径算法和(最小成本)最大流量算法作为子程序。通过使用van den Brand等人(FOCS 2023)对这些子程序的最新算法,当边缘权重在图的大小上是积分和多项式有界时,我们的算法实现了近线性的运行时间。在途中,我们看到了与彩色拟阵和颜色受限基的良好连接。事实上,我们的方法可以适用于在近线性时间内找到两个广义划分拟阵的最大公共独立集。
期刊介绍:
Theoretical Computer Science is mathematical and abstract in spirit, but it derives its motivation from practical and everyday computation. Its aim is to understand the nature of computation and, as a consequence of this understanding, provide more efficient methodologies. All papers introducing or studying mathematical, logic and formal concepts and methods are welcome, provided that their motivation is clearly drawn from the field of computing.