We address here spanning tree problems on a graph with binary edge weights. For a general weighted graph the minimum spanning tree is solved in super-linear running time, even when the edges of the graph are pre-sorted. A related problem, of finding a spanning tree with a pre-specified sum of weights, is NP-hard. In contrast, for a graph with binary weights associated with the edges, it is shown that the minimum spanning tree and finding a spanning tree with a given total sum, are solvable in linear time with simple algorithms.
翻译:本文研究具有二进制边权重的图上的生成树问题。对于一般加权图,即使边已预排序,最小生成树的求解时间仍为超线性。另一个相关问题——寻找具有预设权重和的生成树——是NP难的。相比之下,对于边关联二进制权重的图,本文证明通过简单算法可在线性时间内求解最小生成树以及寻找具有给定总和的生成树。