A fast algorithm for minimum spanning trees when edge lengths are constrained?

后端 未结 2 1707
感动是毒
感动是毒 2020-12-20 14:20

Suppose that you have a directed graph with nonnegative, integer edge lengths that are in the range 0 to U - 1, inclusive. What is the fastest algorithm for computing a min

2条回答
  •  情话喂你
    2020-12-20 14:31

    Fredman–Willard gave an O(m + n) algorithm for integer edge lengths on the unit-cost RAM.

    That's arguably not much of an improvement: without the restriction on edge lengths (i.e., the lengths are an opaque data type that supports only comparisons), Chazelle gave an O(m alpha(m, n) + n) algorithm (alpha is the inverse Ackermann function) and Karger–Klein–Tarjan gave a randomized O(m + n) algorithm.

    I don't think Darren's idea leads to a O(m + n + U)-time algorithm. Jarnik ("Prim") does not use its priority queue monotonically, so buckets may be scanned multiple times; Kruskal requires a disjoint-set data structure, which cannot be O(m + n).

提交回复
热议问题