Let G_min = a spanning tree with minimal # black edges.
Let G_max = spanning tree with maximal # black edges.
Let k_min = # black edges in G_min
Let k_max = # black edges in G_max
Evidence. Set G = G_min. Repeat for each black edge in G_max:
1) If the edge is already in G, do nothing.
2) If the edge is not in G, add it to G and remove another edge
from the cycle thus induced in G. Remove one not in G_max.
Step 2 is always possible, because at least one edge is not in G_max in each cycle.
This algorithm supports the spanning tree G when it goes. He adds no more than one black edge per step, so G shows a spanning tree with k black edges for all k between k_min and k_max as it passes.
source
share