Spanning-tree prefix exchange
ID: spanning-tree-prefix-exchange
Suppose two spanning trees have the same first edges in nondecreasing weight order. If the first tree's next edge is no heavier than the second tree's next edge, it can be inserted into the second tree while preserving the common prefix and without increasing any sorted edge weight. If already occurs there, it ties for the next position. Otherwise its fundamental cycle contains an edge outside the prefix, since the prefix together with is acyclic. Every such is at least as heavy as . Exchanging for preserves the spanning tree. Replacing a multiset entry by a no-larger entry cannot increase any order statistic. Tied edges can be ordered to preserve the prescribed prefix.
New to topics? Read the docs here!