Algorithm Search⌘K

Proofs: FRT tree embedding

These are the human proofs of FRT tree embedding, at full length.

The FRT tree dominates the metric and has expected stretch at most 16 H_n full

This proof shows: correctness, termination.

Let dd be a metric on the points 0,…,n−10, \ldots, n - 1, n≥1n \ge 1. Lines L1 to L9 are those of the pseudocode on the page. Since every quantity in the algorithm scales with dmin⁡d_{\min}, assume dmin⁡=1d_{\min} = 1 (for n=1n = 1 there are no pairs and nothing to scale). Then δ\delta is the smallest integer ≥1\ge 1 with 2δ≥dmax⁡2^\delta \ge d_{\max} when n≥2n \ge 2, and δ=0\delta = 0 when n=1n = 1; the radius at level ii is βi=β2i−1\beta_i = \beta 2^{i-1} with β∈[1,2)\beta \in [1, 2); and an edge from level i+1i + 1 to level ii weighs 2i+12^{i+1}. For a point xx and level ii write ci(x)c_i(x) for the first ww in π\pi with d(w,x)≤βid(w, x) \le \beta_i, and Ni(x)N_i(x) for the value of node(x)node(x) after the pass of line L4 for level ii, with Nδ(x)N_\delta(x) the root.

Lemma 1 (termination and well-definedness). The algorithm stops after δ\delta passes of the loop of line L4, each of nn iterations. Line L6 always finds ci(x)c_i(x), and for 0≤i<δ0 \le i < \delta the clusters C(a)={x:Ni(x)=a}C(a) = \{x : N_i(x) = a\} over the nodes aa at level ii partition the points, each refining a cluster of level i+1i + 1.

Proof. The loops are bounded. Since d(x,x)=0≤βid(x, x) = 0 \le \beta_i, the scan of π\pi in line L6 meets xx at the latest. By line L8, Ni(x)N_i(x) is a child of Ni+1(x)N_{i+1}(x), so the parent of the cluster of xx at level ii is the cluster of xx at level i+1i + 1. By line L7, two points x,yx, y get the same node at level ii exactly when Ni+1(x)=Ni+1(y)N_{i+1}(x) = N_{i+1}(y) and ci(x)=ci(y)c_i(x) = c_i(y), so the clusters at level ii are the classes of an equivalence relation that refines the one at level i+1i + 1. □\square

Lemma 2 (radius). If xx and yy are in one cluster at level i<δi < \delta, then d(x,y)≤2βi<2i+1d(x, y) \le 2\beta_i < 2^{i+1}.

Proof. They share the center w=ci(x)=ci(y)w = c_i(x) = c_i(y), so d(x,y)≤d(x,w)+d(w,y)≤2βi=β2i<2i+1d(x, y) \le d(x, w) + d(w, y) \le 2\beta_i = \beta 2^i < 2^{i+1}, since β<2\beta < 2. □\square

Lemma 3 (leaves). The nodes at level 0 are leaves holding one point each, so leafleaf is injective.

Proof. Level 0 is the last pass, so its nodes get no children. If x≠yx \ne y shared a node at level 0, they would share a center ww with d(w,x),d(w,y)≤β0=β/2<1d(w, x), d(w, y) \le \beta_0 = \beta / 2 < 1. Distances between distinct points are at least dmin⁡=1d_{\min} = 1, so w=xw = x and w=yw = y, a contradiction. □\square

Lemma 4 (tree distance). Let x≠yx \ne y, and let ℓ\ell be the smallest level at which they are in one cluster, so 1≤ℓ≤δ1 \le \ell \le \delta (they share the root at level δ\delta, and not a node at level 0 by Lemma 3). Then dT(x,y)=2ℓ+2−4d_T(x, y) = 2^{\ell+2} - 4.

Proof. By Lemma 1 the tree path from leaf(x)leaf(x) goes up through N0(x),N1(x),…N_0(x), N_1(x), \ldots, and the same for yy. The nodes Nj(x)N_j(x) and Nj(y)N_j(y) differ for j<ℓj < \ell and agree for j≥ℓj \ge \ell, so the path meets at Nℓ(x)N_\ell(x) and uses, on each side, the edges from level jj to level j+1j + 1 for 0≤j<ℓ0 \le j < \ell, of weights 2j+12^{j+1}. So dT(x,y)=2∑j=0ℓ−12j+1=2(2ℓ+1−2)=2ℓ+2−4d_T(x, y) = 2 \sum_{j=0}^{\ell-1} 2^{j+1} = 2(2^{\ell+1} - 2) = 2^{\ell+2} - 4. □\square

Theorem 1 (dominance). For all points x,yx, y, dT(x,y)≥d(x,y)d_T(x, y) \ge d(x, y).

Proof. For x=yx = y both sides are 0. Otherwise let ℓ\ell be as in Lemma 4. If ℓ<δ\ell < \delta, Lemma 2 gives d(x,y)<2ℓ+1d(x, y) < 2^{\ell+1}. If ℓ=δ\ell = \delta, then d(x,y)≤dmax⁡≤2δ=2ℓd(x, y) \le d_{\max} \le 2^\delta = 2^\ell. In both cases d(x,y)≤2ℓ+1≤2ℓ+2−4d(x, y) \le 2^{\ell+1} \le 2^{\ell+2} - 4, because ℓ≥1\ell \ge 1 gives 2ℓ+1≥42^{\ell+1} \ge 4. By Lemma 4 this is dT(x,y)d_T(x, y). □\square

Theorem 2 (expected stretch). If π\pi is a uniformly random order and β\beta is uniform on [1,2)[1, 2), independent of π\pi, then E[dT(x,y)]≤16Hn d(x,y)\mathbf{E}[d_T(x, y)] \le 16 H_n \, d(x, y) for all points x,yx, y, where Hn=∑s=1n1/sH_n = \sum_{s=1}^{n} 1/s.

Proof. Fix x≠yx \ne y and write D=d(x,y)D = d(x, y). Say the pair is split at level ii, for 0≤i<δ0 \le i < \delta, if xx and yy share a cluster at level i+1i + 1 but not at level ii. By Lemma 1 and Lemma 3 the pair is split at exactly one level ii, which is ℓ−1\ell - 1 in Lemma 4, and then dT(x,y)=2i+3−4≤2i+3d_T(x, y) = 2^{i+3} - 4 \le 2^{i+3}. So

E[dT(x,y)]≤∑i=0δ−12i+3Pr⁡[split at level i].\mathbf{E}[d_T(x, y)] \le \sum_{i=0}^{\delta - 1} 2^{i+3} \Pr[\text{split at level } i].

For each point ww let m(w)=min⁡(d(w,x),d(w,y))m(w) = \min(d(w, x), d(w, y)) and M(w)=max⁡(d(w,x),d(w,y))M(w) = \max(d(w, x), d(w, y)); by the triangle inequality M(w)−m(w)≤DM(w) - m(w) \le D. Number the points w1,…,wnw_1, \ldots, w_n so that m(w1)≤m(w2)≤⋯≤m(wn)m(w_1) \le m(w_2) \le \cdots \le m(w_n), breaking ties by label; this order does not depend on π\pi or β\beta.

Suppose the pair is split at level ii. Since xx and yy share a cluster at level i+1i + 1, they share Ni+1N_{i+1}, so by Lemma 1 they must have different centers, ci(x)≠ci(y)c_i(x) \ne c_i(y). Let ww be the first point in π\pi with m(w)≤βim(w) \le \beta_i; it exists because m(x)=0m(x) = 0. Every point before ww in π\pi is farther than βi\beta_i from both xx and yy, so ci(x)=wc_i(x) = w if d(w,x)≤βid(w, x) \le \beta_i, and ci(y)=wc_i(y) = w if d(w,y)≤βid(w, y) \le \beta_i. If both held, the centers would be equal. So exactly one holds, which means m(w)≤βi<M(w)m(w) \le \beta_i < M(w). Call ww the cutter.

If the cutter is wsw_s, then (a) βi∈[m(ws),M(ws))\beta_i \in [m(w_s), M(w_s)), and (b) wsw_s comes before w1,…,ws−1w_1, \ldots, w_{s-1} in π\pi, because each wtw_t with t<st < s has m(wt)≤m(ws)≤βim(w_t) \le m(w_s) \le \beta_i and so would be the cutter if it came earlier. Event (a) depends only on β\beta and event (b) only on π\pi, and in a uniform random order each of w1,…,wsw_1, \ldots, w_s is equally likely to come first, so

Pr⁡[split at level i]≤∑s=1n1sPr⁡[βi∈[m(ws),M(ws))].\Pr[\text{split at level } i] \le \sum_{s=1}^{n} \frac{1}{s} \Pr[\beta_i \in [m(w_s), M(w_s))].

Now fix ss, write I=[m(ws),M(ws))I = [m(w_s), M(w_s)), an interval of length at most DD, and let ∣J∣|J| denote the length of an interval JJ. The radius βi=β2i−1\beta_i = \beta 2^{i-1} is uniform on Ji=[2i−1,2i)J_i = [2^{i-1}, 2^i), with density 1/2i−11 / 2^{i-1}, so Pr⁡[βi∈I]=∣I∩Ji∣/2i−1\Pr[\beta_i \in I] = |I \cap J_i| / 2^{i-1}. Hence

∑i=0δ−12i+3Pr⁡[βi∈I]=∑i=0δ−12i+3∣I∩Ji∣2i−1=16∑i=0δ−1∣I∩Ji∣≤16∣I∣≤16D,\sum_{i=0}^{\delta-1} 2^{i+3} \Pr[\beta_i \in I] = \sum_{i=0}^{\delta - 1} 2^{i+3} \frac{|I \cap J_i|}{2^{i-1}} = 16 \sum_{i=0}^{\delta-1} |I \cap J_i| \le 16 |I| \le 16 D,

because the intervals J0,J1,…J_0, J_1, \ldots are pairwise disjoint. Exchanging the two finite sums,

E[dT(x,y)]≤∑s=1n1s∑i=0δ−12i+3Pr⁡[βi∈[m(ws),M(ws))]≤∑s=1n16Ds=16HnD.□\mathbf{E}[d_T(x, y)] \le \sum_{s=1}^{n} \frac{1}{s} \sum_{i=0}^{\delta-1} 2^{i+3} \Pr[\beta_i \in [m(w_s), M(w_s))] \le \sum_{s=1}^{n} \frac{16 D}{s} = 16 H_n D. \qquad \square

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 dTd_T dominates dd on every run and E[dT(x,y)]≤16Hn d(x,y)=O(log⁡n) d(x,y)\mathbf{E}[d_T(x, y)] \le 16 H_n \, d(x, y) = O(\log n) \, 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+ln⁡nH_n \le 1 + \ln n. Undoing the scaling by dmin⁡d_{\min} multiplies dd, the radii and all edge weights by dmin⁡d_{\min}, which changes none of the comparisons. ■\blacksquare

Back to FRT tree embedding