The FRT tree dominates the metric and has expected stretch at most 16 H_n full
This proof shows: correctness, termination.
Let d be a metric on the points 0,…,n−1, n≥1. Lines L1 to L9 are those of the pseudocode on the page. Since every quantity in the algorithm scales with dmin, assume dmin=1 (for n=1 there are no pairs and nothing to scale). Then δ is the smallest integer ≥1 with 2δ≥dmax when n≥2, and δ=0 when n=1; the radius at level i is βi=β2i−1 with β∈[1,2); and an edge from level i+1 to level i weighs 2i+1. For a point x and level i write ci(x) for the first w in π with d(w,x)≤βi, and Ni(x) for the value of node(x) after the pass of line L4 for level i, with Nδ(x) the root.
Lemma 1 (termination and well-definedness). The algorithm stops after δ passes of the loop of line L4, each of n iterations. Line L6 always finds ci(x), and for 0≤i<δ the clusters C(a)={x:Ni(x)=a} over the nodes a at level i partition the points, each refining a cluster of level i+1.
Proof. The loops are bounded. Since d(x,x)=0≤βi, the scan of π in line L6 meets x at the latest. By line L8, Ni(x) is a child of Ni+1(x), so the parent of the cluster of x at level i is the cluster of x at level i+1. By line L7, two points x,y get the same node at level i exactly when Ni+1(x)=Ni+1(y) and ci(x)=ci(y), so the clusters at level i are the classes of an equivalence relation that refines the one at level i+1. □
Lemma 2 (radius). If x and y are in one cluster at level i<δ, then d(x,y)≤2βi<2i+1.
Proof. They share the center w=ci(x)=ci(y), so d(x,y)≤d(x,w)+d(w,y)≤2βi=β2i<2i+1, since β<2. □
Lemma 3 (leaves). The nodes at level 0 are leaves holding one point each, so leaf is injective.
Proof. Level 0 is the last pass, so its nodes get no children. If x=y shared a node at level 0, they would share a center w with d(w,x),d(w,y)≤β0=β/2<1. Distances between distinct points are at least dmin=1, so w=x and w=y, a contradiction. □
Lemma 4 (tree distance). Let x=y, and let ℓ be the smallest level at which they are in one cluster, so 1≤ℓ≤δ (they share the root at level δ, and not a node at level 0 by Lemma 3). Then dT(x,y)=2ℓ+2−4.
Proof. By Lemma 1 the tree path from leaf(x) goes up through N0(x),N1(x),…, and the same for y. The nodes Nj(x) and Nj(y) differ for j<ℓ and agree for j≥ℓ, so the path meets at Nℓ(x) and uses, on each side, the edges from level j to level j+1 for 0≤j<ℓ, of weights 2j+1. So dT(x,y)=2∑j=0ℓ−12j+1=2(2ℓ+1−2)=2ℓ+2−4. □
Theorem 1 (dominance). For all points x,y, dT(x,y)≥d(x,y).
Proof. For x=y both sides are 0. Otherwise let ℓ be as in Lemma 4. If ℓ<δ, Lemma 2 gives d(x,y)<2ℓ+1. If ℓ=δ, then d(x,y)≤dmax≤2δ=2ℓ. In both cases d(x,y)≤2ℓ+1≤2ℓ+2−4, because ℓ≥1 gives 2ℓ+1≥4. By Lemma 4 this is dT(x,y). □
Theorem 2 (expected stretch). If π is a uniformly random order and β is uniform on [1,2), independent of π, then E[dT(x,y)]≤16Hnd(x,y) for all points x,y, where Hn=∑s=1n1/s.
Proof. Fix x=y and write D=d(x,y). Say the pair is split at level i, for 0≤i<δ, if x and y share a cluster at level i+1 but not at level i. By Lemma 1 and Lemma 3 the pair is split at exactly one level i, which is ℓ−1 in Lemma 4, and then dT(x,y)=2i+3−4≤2i+3. So
E[dT(x,y)]≤i=0∑δ−12i+3Pr[split at level i]. For each point w let m(w)=min(d(w,x),d(w,y)) and M(w)=max(d(w,x),d(w,y)); by the triangle inequality M(w)−m(w)≤D. Number the points w1,…,wn so that m(w1)≤m(w2)≤⋯≤m(wn), breaking ties by label; this order does not depend on π or β.
Suppose the pair is split at level i. Since x and y share a cluster at level i+1, they share Ni+1, so by Lemma 1 they must have different centers, ci(x)=ci(y). Let w be the first point in π with m(w)≤βi; it exists because m(x)=0. Every point before w in π is farther than βi from both x and y, so ci(x)=w if d(w,x)≤βi, and ci(y)=w if d(w,y)≤βi. If both held, the centers would be equal. So exactly one holds, which means m(w)≤βi<M(w). Call w the cutter.
If the cutter is ws, then (a) βi∈[m(ws),M(ws)), and (b) ws comes before w1,…,ws−1 in π, because each wt with t<s has m(wt)≤m(ws)≤βi and so would be the cutter if it came earlier. Event (a) depends only on β and event (b) only on π, and in a uniform random order each of w1,…,ws is equally likely to come first, so
Pr[split at level i]≤s=1∑ns1Pr[βi∈[m(ws),M(ws))]. Now fix s, write I=[m(ws),M(ws)), an interval of length at most D, and let ∣J∣ denote the length of an interval J. The radius βi=β2i−1 is uniform on Ji=[2i−1,2i), with density 1/2i−1, so Pr[βi∈I]=∣I∩Ji∣/2i−1. Hence
i=0∑δ−12i+3Pr[βi∈I]=i=0∑δ−12i+32i−1∣I∩Ji∣=16i=0∑δ−1∣I∩Ji∣≤16∣I∣≤16D, because the intervals J0,J1,… are pairwise disjoint. Exchanging the two finite sums,
E[dT(x,y)]≤s=1∑ns1i=0∑δ−12i+3Pr[βi∈[m(ws),M(ws))]≤s=1∑ns16D=16HnD.□ Theorem 3 (correctness). The algorithm terminates and returns a rooted tree with positive edge weights whose leaves are the points, one per leaf, such that dT dominates d on every run and E[dT(x,y)]≤16Hnd(x,y)=O(logn)d(x,y) for every pair.
Proof. Termination and the tree structure are Lemma 1, the leaves are Lemma 3, dominance is Theorem 1, and the stretch bound is Theorem 2, with Hn≤1+lnn. Undoing the scaling by dmin multiplies d, the radii and all edge weights by dmin, which changes none of the comparisons. ■