teeline · algorithms/savings
Savings Construction
Every pairwise edge is ranked by Clarke-Wright savings s(i,j) = d(hub,i) + d(hub,j) − d(i,j) and scanned highest-first. The hub city (★, nearest the centroid) is visited like any other city — it only biases the ordering of candidate merges. Acceptance rules reuse the same Kruskal-style scan as Greedy Edge (degree ≤ 2, no premature sub-cycle).
Union-Find
12 components
{0}
{1}
{2}
{3}
{4}
{5}
{6}
{7}
{8}
{9}
{10}
{11}
accepted edge rejected — degree rejected — cycle closing edge hub (city 8)
Press Step or Run to scan the highest-savings edges first
edges scanned
0/66
accepted
0/12
rejected
0
components
12
partial cost
0
step
0
Savings is parameter-free — no other knobs to tune.