Introduction

We study how faithfully distances between strings can be represented by distances in ℓ1\ell_1. The distance on strings is ordinary edit distance: ED⁡(x,y)\operatorname{ED}(x,y) is the least number of single-symbol insertions, deletions and substitutions that transform xx into yy, with every operation costing one. An insertion or deletion changes the positions of an entire suffix. As a result, the distance depends on the best alignment of the two strings, and a useful representation must account for alignments over all scales.

For a finite alphabet Σ\Sigma and an integer d≥1d \ge1, let Σ≤d\Sigma^{\le d} be the set of all strings of length at most dd, including the empty string. The cap restricts the endpoints; intermediate strings in an edit script may have any length. Write ℓ1\ell_1 for the real space of absolutely summable sequences and define

EΣ(d)=inf⁡f:Σ≤d↪ℓ1(max⁡x≠y∥f(x)−f(y)∥1ED⁡(x,y))(max⁡x≠yED⁡(x,y)∥f(x)−f(y)∥1).E_\Sigma(d)=\inf_{f:\Sigma^{\le d}\hookrightarrow\ell_1}\left(\max_{x\ne y}\frac{\lVert f(x)-f(y)\rVert_1}{\operatorname{ED}(x,y)}\right)\left(\max_{x\ne y}\frac{\operatorname{ED}(x,y)}{\lVert f(x)-f(y)\rVert_1}\right).

The infimum is over injective maps. It imposes no restriction on target dimension or on the cost of computing the map. Equivalently, an embedding has distortion at most DD when it can be rescaled so that every image distance lies between ED⁡(x,y)/D\operatorname{ED}(x,y)/D and ED⁡(x,y)\operatorname{ED}(x,y).

Theorem 1.1. There are absolute constants c,C>0c,C>0 and an integer d0d_0 such that, for every integer d≥d0d\ge d_0 and every finite alphabet Σ\Sigma with ∣Σ∣≥2|\Sigma|\ge2,

exp⁡(clog⁡dlog⁡log⁡d)≤EΣ(d)≤exp⁡(Clog⁡dlog⁡log⁡d).\exp\left(c\sqrt{\log d\log\log d}\right)\le E_\Sigma(d)\le\exp\left(C\sqrt{\log d\log\log d}\right).

The lower bound is witnessed by a subset of binary strings of one common length at most dd. The same bounds hold for sup⁡2≤∣Σ∣<∞EΣ(d)\sup_{2\le|\Sigma|<\infty}E_\Sigma(d).

Logarithms are natural unless a base is specified. The constants and threshold in the theorem are independent of the alphabet, including when its size grows with dd. The conclusion determines the order of log⁡EΣ(d)\log E_\Sigma(d); the constants in the exponent remain unspecified.

The earlier bounds

The single-symbol error model is classical. Levenshtein studied codes correcting insertions, deletions and substitutions [4], and Wagner and Fischer described edit scripts through increasing traces [10]. Their alignment language will be useful below: any lower bound must control every increasing matching of equal symbols, including matchings that cross the boundaries used to construct the strings.

Ostrovsky and Rabani [8] proved the upper scale in Theorem 1.1 for fixed-length binary strings by recursively comparing collections of overlapping substrings. They also noted extensions to larger alphabets and varying lengths. We use their fixed-length theorem and give complete reductions with constants uniform over all finite alphabets and with the empty string included.

For lower bounds, Andoni, Deza, Gupta, Indyk and Raskhodnikova [1] constructed binary subsets whose L1L_1 distortion approaches 3/2. Khot and Naor [2] obtained an Ω(log⁡d/log⁡log⁡d)\Omega(\sqrt{\log d}/\log\log d) lower bound by studying cuts and Fourier analysis of noisy shifts. Their insertion–deletion metric is within a factor of two of the convention used here. Krauthgamer and Rabani [3] then proved an Ω(log⁡d)\Omega(\log d) lower bound for binary strings of length dd. The construction below reaches the scale of the Ostrovsky–Rabani exponent.

How the lower bound works

The construction joins a geometric fact about strings to an analytic fact about ℓ1\ell_1. At the geometric level, a word is a long list of rows. Each row contains a payload made of lower-level words, followed by a long marker consisting of a fresh symbol. The payload has fixed slots; each slot has its own alphabet tag, so different slots cannot match. The lower-level words depend on states. In each component, repeatedly adding one distinguished step cycles the state with a prime period; different components use different primes. Advancing every component by one state step shifts the row list by one, which costs only the deletion and insertion of one row.

Advancing the distinguished component behaves differently. We repeat that component in many separately tagged slots. For any proposed pair of rows, either those repeated slots remain separated or the row shift that aligns them leaves many of the other prime-period components separated. A global alignment can still send one source payload into several target rows. In that event, the matching skips a complete target marker: the source payload contains no copy of the marker symbol. The skipped markers for different payloads are disjoint. This turns the row comparison into a lower bound for arbitrary alignments.

The analytic comparison concerns the average image distance produced by a group displacement. Proposition 2.2 bounds the displacement in the distinguished component by the simultaneous step and the average component steps. The proof expresses a finite ℓ1\ell_1 metric as a nonnegative sum of cut metrics, then expands each cut in Fourier characters. A character involving few components is detected by the simultaneous step: distinct prime denominators prevent its phase from being an integer. A character involving many components is detected by the sum of the component averages.

Relative to word length, the guaranteed pointwise separation decreases by a fixed factor at each level. Under the same normalization, the analytic inequality forces the allowed averaged image displacement to decrease much faster: after kk levels, the ratio between these two bounds is exp⁡(Ω(klog⁡k))\exp(\Omega(k\log k)). Meanwhile, the logarithmic word length is O(k2log⁡k)O(k^2\log k). A delimiter code transfers the words to binary with a loss polynomial in kk, and choosing kk directly from the cap dd supplies a witness for every sufficiently large dd.

Section 2 proves the alignment facts and the prime-product displacement inequality. Section 3 builds the words and proves their separation and analytic recurrence together. Section 4 supplies the delimiter at the binary transfer and completes the parameter calculation. Section 5 derives the uniform upper bound by hashing the alphabet, padding to one binary length, and averaging over all hash maps.

The companion manuscripts on circle constructions [6] and tree constructions [7] give independent lower-bound mechanisms and additional binary coding results. No result from a companion manuscript is used; the upper bound uses the stated external theorem.

Alignments and a displacement inequality

The word construction will be measured first by insertion–deletion distance. Its advantage is that every possible comparison has a concrete description as an increasing matching. We then state the analytic inequality that will be applied at each level of the construction.

Distances from increasing matchings

Write Δ(x,y)\Delta(x,y) for the minimum number of single-symbol insertions and deletions transforming xx into yy. An increasing matching is a list of pairs of equal-symbol positions, strictly increasing in both coordinates. Let LCS⁡(x,y)\operatorname{LCS}(x,y) be its maximum size. These are the classical trace and subsequence descriptions of string correction [10].

Lemma 2.1. For arbitrary finite strings, including the empty string,

ED⁡(x,y)≤Δ(x,y)≤2ED⁡(x,y),Δ(x,y)=∣x∣+∣y∣−2LCS⁡(x,y).(1)\operatorname{ED}(x,y) \le\Delta(x,y) \le2\operatorname{ED}(x,y), \qquad\Delta(x,y) = \lvert x\rvert+ \lvert y\rvert- 2\operatorname{LCS}(x,y). \tag*{(1)}

For two strings of the same length nn, define their one-sided deficit by

rn(x,y)=n−LCS⁡(x,y)=12Δ(x,y).r_n(x,y) = n - \operatorname{LCS}(x,y) = \frac{1}{2}\Delta(x,y).

A matching of size n−En-E leaves exactly EE unmatched positions on each side.

Proof. An insertion–deletion script is an edit script, and replacing each substitution by one deletion and one insertion proves the two inequalities. Deleting the unmatched source positions in an increasing matching and inserting the unmatched target positions realizes its total loss ∣x∣+∣y∣−2∣M∣\lvert x\rvert+ \lvert y\rvert- 2\lvert M\rvert. Conversely, the original positions that survive an insertion–deletion script form an increasing matching; its loss is at most the number of operations. Minimizing the loss gives the identity. The equal-length assertions follow directly.

The comparison to be proved

For a finite abelian group GG and a map H:G→ℓ1H:G \to\ell_1, set

VH(g)=Ez∈G∥H(z+g)−H(z)∥1.(2)V_H(g) = \mathbb{E}_{z\in G} \lVert H(z+g)-H(z)\rVert_1. \tag*{(2)}

Every expectation over a finite set uses the uniform probability measure. The following proposition compares a shift in one component with a simultaneous shift and with shifts averaged inside the separate components. In the word construction, the simultaneous shift will move the row list by one; the component averages will be bounded at the preceding level.

Proposition 2.2 (Prime-product displacement inequality). Let b,h≥1b,h \ge1 be integers, let P≥1P \ge1, and let G1,…,GbG_1,\ldots,G_b be finite abelian groups. Suppose vj∈Gjv_j \in G_j has order pjp_j, where p1,…,pbp_1,\ldots,p_b are distinct primes in [P,2P][P,2P]. In G=∏j=1bGjG=\prod_{j=1}^{b}G_j, use the same notation vjv_j for the element acting only in coordinate jj, and put τ=∑j=1bvj\tau=\sum_{j=1}^{b}v_j. Then every H:G→ℓ1H:G\to\ell_1 and every integer uu satisfy

VH(uv1)≤(2P)2hVH(τ)+2h∑j=1bEa∈Z/pjZVH(avj).(3)V_H(uv_1) \le(2P)^{2h}V_H(\tau)+\frac{2}{h}\sum_{j=1}^{b}\mathbb{E}_{a\in\mathbb{Z}/p_j\mathbb{Z}}V_H(av_j). \tag*{(3)}

We prove the proposition after recording two elementary forms of the cut and Fourier methods. The cut representation is standard [5], Section 4. Its summability statement below permits an unrestricted sequence-space target.

Lemma 2.3 (Finite cut decomposition). Let XX be finite and H:X→ℓ1H:X\to\ell_1. There are finite numbers cA≥0c_A\ge0, indexed by the nonempty proper subsets of XX, such that

∥H(x)−H(y)∥1=∑∅≠A⊊XcA∣1A(x)−1A(y)∣(x,y∈X).(4)\lVert H(x)-H(y)\rVert_1=\sum_{\varnothing\ne A\subsetneq X}c_A\lvert1_A(x)-1_A(y)\rvert\qquad(x,y\in X). \tag*{(4)}

Moreover,

∑∅≠A⊊XcA≤∑{x,y}⊂Xx≠y∥H(x)−H(y)∥1,\sum_{\varnothing\ne A\subsetneq X}c_A\le\sum_{\substack{\{x,y\}\subset X\\x\ne y}}\lVert H(x)-H(y)\rVert_1,

where the right sum is over unordered pairs.

Proof. For ∣X∣≤1\lvert X\rvert\le1 all the sums are empty. Otherwise, for coordinate nn of HH, list its distinct values on XX as tn,1<⋯<tn,knt_{n,1}<\cdots<t_{n,k_n}. Put

An,r={x:Hn(x)>tn,r},an,r=tn,r+1−tn,r(1≤r<kn).A_{n,r}=\{x:H_n(x)>t_{n,r}\},\qquad a_{n,r}=t_{n,r+1}-t_{n,r}\qquad(1\le r<k_n).

The consecutive gaps telescope:

∣Hn(x)−Hn(y)∣=∑r=1kn−1an,r∣1An,r(x)−1An,r(y)∣.\lvert H_n(x)-H_n(y)\rvert=\sum_{r=1}^{k_n-1}a_{n,r}\lvert1_{A_{n,r}}(x)-1_{A_{n,r}}(y)\rvert.

Group all terms with the same cut by setting cA=∑n,r:An,r=Aan,rc_A=\sum_{n,r:A_{n,r}=A}a_{n,r}, initially allowing the value +∞+\infty. Nonnegativity allows the coordinate series to be interchanged with the finite sum over unordered pairs. Hence

∑∅≠A⊊XcA∣A∣∣X∖A∣=∑{x,y}⊂Xx≠y∑n=1∞∣Hn(x)−Hn(y)∣=∑{x,y}⊂Xx≠y∥H(x)−H(y)∥1<∞.\sum_{\varnothing\ne A\subsetneq X}c_A\lvert A\rvert\lvert X\setminus A\rvert =\sum_{\substack{\{x,y\}\subset X\\x\ne y}}\sum_{n=1}^{\infty}\lvert H_n(x)-H_n(y)\rvert =\sum_{\substack{\{x,y\}\subset X\\x\ne y}}\lVert H(x)-H(y)\rVert_1<\infty.

Each indexed cut separates at least one pair, so ∣A∣∣X∖A∣≥1\lvert A\rvert\lvert X\setminus A\rvert\ge1. The displayed equality proves that all the weights are finite and bounds their total. Summing the coordinate identity and grouping its nonnegative terms now gives (2.4). □\square

Lemma 2.4 (Finite Fourier displacement identity). Let T=∏j=1bZ/pjZT=\prod_{j=1}^{b}\mathbb{Z}/p_j\mathbb{Z}, where the integers pjp_j are at least two. For λ∈T\lambda\in T, set

χλ(t)=exp⁡(2πi∑j=1bλjtjpj),F^(λ)=Et∈TF(t)χλ(t)‾.\chi_\lambda(t)=\exp\left(2\pi i\sum_{j=1}^{b}\frac{\lambda_jt_j}{p_j}\right),\qquad\widehat{F}(\lambda)=\mathbb{E}_{t\in T}F(t)\overline{\chi_\lambda(t)}.

For every F:T→CF:T\to\mathbb{C} and l∈Tl\in T,

Et∈T∣F(t+l)−F(t)∣2=∑λ∈T∣F^(λ)∣24sin⁡2(π∑j=1bljλjpj).(5)\mathbb{E}_{t\in T}\lvert F(t+l)-F(t)\rvert^2=\sum_{\lambda\in T}\lvert\widehat{F}(\lambda)\rvert^2 4\sin^2\left(\pi\sum_{j=1}^{b}\frac{l_j\lambda_j}{p_j}\right). \tag*{(5)}

The squared sine is independent of the chosen integer representatives.

Proof. The geometric-series identity

1p∑a=0p−1e2πiqa/p={1,p∣q,0,p∤q\frac{1}{p}\sum_{a=0}^{p-1}e^{2\pi iqa/p}= \begin{cases} 1, & p\mid q,\\ 0, & p\nmid q \end{cases}

shows, coordinate by coordinate, that the ∣T∣\lvert T\rvert characters are orthonormal for the inner product ⟨F1,F2⟩=EtF1(t)F2(t)‾\langle F_1,F_2\rangle=\mathbb{E}_tF_1(t)\overline{F_2(t)}. They form a basis because the function space has dimension ∣T∣\lvert T\rvert. Thus F(t)=∑λF^(λ)χλ(t)F(t)=\sum_{\lambda}\widehat{F}(\lambda)\chi_\lambda(t), and the squared norm equals the sum of squared Fourier coefficients. Apply this to

F(t+l)−F(t)=∑λF^(λ)(χλ(l)−1)χλ(t)F(t+l)-F(t)=\sum_{\lambda}\widehat{F}(\lambda)(\chi_\lambda(l)-1)\chi_\lambda(t)

and use ∣e2πiθ−1∣2=4sin⁡2(πθ)\lvert e^{2\pi i\theta}-1\rvert^2=4\sin^2(\pi\theta).

Proof of Proposition 2.2. By Lemma 2.3, each displacement of HH is a nonnegative linear combination of displacements of Boolean cut maps. It is enough to prove (3) for one such map H=1AH=1_A.

Let K=∏j⟨vj⟩≤GK=\prod_j\langle v_j\rangle\leq G. Every shift in the desired inequality preserves every coset of KK. On a fixed coset, choose a representative cc and identify T=∏jZ/pjZT=\prod_j\mathbb{Z}/p_j\mathbb{Z} with that coset through t↦c+∑jtjvjt\mapsto c+\sum_jt_jv_j. The cut becomes F(t)=1A(c+∑jtjvj)F(t)=1_A(c+\sum_jt_jv_j). For Boolean values, absolute difference equals squared difference. With DF(l)=Et∣F(t+l)−F(t)∣D_F(l)=\mathbb{E}_t\lvert F(t+l)-F(t)\rvert, it remains to prove

DF(ue1)≤(2P)2hDF(1)+2h∑j=1bEa∈Z/pjZDF(aej),(6)D_F(ue_1)\leq(2P)^{2h}D_F(\mathbf{1})+\frac{2}{h}\sum_{j=1}^{b}\mathbb{E}_{a\in\mathbb{Z}/p_j\mathbb{Z}}D_F(ae_j), \tag*{(6)}

where 1=(1,…,1)\mathbf{1}=(1,\ldots,1) and eje_j is the jjth coordinate vector.

We compare the multipliers in Lemma 2.4 one frequency at a time. Fix λ∈T\lambda\in T, write S={j:λj≠0}S=\{j:\lambda_j\neq0\} and r=∣S∣r=\lvert S\rvert. When λ1=0\lambda_1=0, the left multiplier vanishes. Assume therefore that λ1≠0\lambda_1\neq0. The left multiplier is at most four.

First suppose r<hr<h. Choose 0≤λj<pj0\leq\lambda_j<p_j and put

q=∏j∈Spj,θ=∑j∈Sλjpj.q=\prod_{j\in S}p_j,\qquad\theta=\sum_{j\in S}\frac{\lambda_j}{p_j}.

For any i∈Si\in S, distinctness of the primes gives qθ≡λi(q/pi)≢0(modpi)q\theta\equiv\lambda_i(q/p_i)\not\equiv0\pmod{p_i}. Thus θ\theta is not an integer. Since its denominator divides qq, its distance δ\delta from the nearest integer satisfies

12≥δ≥1q≥(2P)−r≥(2P)−h.\frac{1}{2}\geq\delta\geq\frac{1}{q}\geq(2P)^{-r}\geq(2P)^{-h}.

Concavity of sine on [0,π/2][0,\pi/2] gives sin⁡(πδ)≥2δ\sin(\pi\delta)\geq2\delta. Consequently the simultaneous-shift multiplier on the right of (6) is at least

(2P)2h4sin⁡2(πθ)=(2P)2h4sin⁡2(πδ)≥16,(2P)^{2h}4\sin^2(\pi\theta)=(2P)^{2h}4\sin^2(\pi\delta)\geq16,

which bounds the left multiplier. Now suppose r≥hr \ge h. For each coordinate, the same geometric-series identity gives

Ea∈Z/pjZ4sin⁡2(πaλjpj)=2−2Re⁡Eae2πiaλj/pj={2,j∈S,0,j∉S.\mathbb{E}_{a\in\mathbb{Z}/p_j\mathbb{Z}} 4\sin^2\left(\frac{\pi a\lambda_j}{p_j}\right)=2-2\operatorname{Re}\mathbb{E}_a e^{2\pi i a\lambda_j/p_j}=\begin{cases}2, & j\in S,\\0, & j\notin S.\end{cases}

The component terms on the right therefore have combined multiplier (2/h)2r≥4(2/h)^{2r} \ge4, again bounding the left. This case includes h=1h=1. Multiplication by ∣F^(λ)∣2|\widehat{F}(\lambda)|^2 and summation over λ\lambda proves (6). Averaging over the equal-size cosets gives the uniform average over GG. Finally, summing the nonnegative cut weights proves the proposition for HH.

The two cases explain the role of distinct periods. A low-support frequency pays for a nonintegral simultaneous phase; a high-support frequency pays for many component variations. The next section turns these two payments into an iterated obstruction.

Recursive words with incompatible displacements

We now build the words to which Proposition 2.2 will be applied. The row list must be long enough that its one-row shift remains inexpensive after multiplication by (2P)2h(2P)^{2h} in that inequality. At the same time, it must be shorter than the product of many component periods, so that a row shift cannot cancel too many prime-period differences. The following choices provide both properties.

Fix a sufficiently large integer kk and set

b=100k,P=b2,h=b/10=10k,L=Pb/2.b=100k,\qquad P=b^2,\qquad h=b/10=10k,\qquad L=P^{b/2}.

Choose bb distinct primes in [P,2P][P,2P], and call their set P\mathcal{P}. The prime number theorem gives π(2P)−π(P)∼P/log⁡P>b\pi(2P)-\pi(P)\sim P/\log P>b for all sufficiently large kk; the explicit interval estimate of Rosser and Schoenfeld [9] also gives this consequence. We use this one pool and the same parameters at every level.

The recursive family and its cheap steps

For every 0≤s≤k0\le s\le k and p∈Pp\in\mathcal{P}, the construction supplies a finite abelian state group Gs,pG_{s,p}, a distinguished element vs,pv_{s,p} of order pp, and a word map

Ws,p:Gs,p⟶As,pns.W_{s,p}:G_{s,p}\longrightarrow\mathcal{A}_{s,p}^{n_s}.

It also supplies a finite list Ss,pS_{s,p} of pairs (e,r)(e,r), where e∈Gs,pe\in G_{s,p} is a step and r>0r>0 is its displacement budget. The word map itself need not be injective. Define

αs=24−s,Q0=2,Qs=2(2P)2hL+Qs−1h.(7)\alpha_s=24^{-s},\qquad Q_0=2,\qquad Q_s=\frac{2(2P)^{2h}}{L}+\frac{Q_{s-1}}{h}. \tag*{(7)}

Proposition 3.1 (Recursive properties). The families can be chosen with

ns=(2(2b−1)L)s,∣As,p∣≤As,A0=2P,As=1+(2b−1)As−1,n_s=(2(2b-1)L)^s,\qquad|\mathcal{A}_{s,p}|\le A_s,\qquad A_0=2P,\qquad A_s=1+(2b-1)A_{s-1},

so that the following assertions hold.

  1. Every listed step is cheap at every state:

Δ(Ws,p(z),Ws,p(z+e))≤nsr((e,r)∈Ss,p, z∈Gs,p).(8)\Delta(W_{s,p}(z), W_{s,p}(z+e)) \le n_s r \qquad((e,r) \in S_{s,p},\ z \in G_{s,p}). \tag*{(8)}
  1. Every nonzero distinguished shift is separated at every state:

Δ(Ws,p(z),Ws,p(z+uvs,p))≥nsαs(z∈Gs,p, 1≤u<p).(9)\Delta(W_{s,p}(z), W_{s,p}(z+u v_{s,p})) \ge n_s \alpha_s \qquad(z \in G_{s,p},\ 1 \le u < p). \tag*{(9)}
  1. If H:Gs,p→ℓ1H:G_{s,p}\to\ell_1 satisfies the averaged budgets VH(e)≤rV_H(e)\le r for all (e,r)∈Ss,p(e,r)\in S_{s,p}, then

VH(uvs,p)≤Qs(1≤u<p).V_H(u v_{s,p}) \le Q_s \qquad(1 \le u < p).

The first two assertions describe the geometry of the words. The third says that any ℓ1\ell_1 map respecting the same cheap-step budgets has small average displacement in the separated direction. We prove the proposition by simultaneous induction on ss, constructing the word maps and the cheap-step lists together.

At level zero, take

G0,p=Z/pZ,v0,p=1,W0,p(z)=(z),S0,p={(e,2):e≠0}.G_{0,p}=\mathbb{Z}/p\mathbb{Z},\quad v_{0,p}=1,\quad W_{0,p}(z)=(z),\quad S_{0,p}=\{(e,2):e\ne0\}.

The single symbols are distinct. Their insertion–deletion distance is two, so the first two assertions hold with n0=1n_0=1 and α0=1\alpha_0=1. The listed budgets give the third assertion with Q0=2Q_0=2. The alphabet has p≤2Pp\le2P symbols.

Suppose the families at level s−1s-1 have been constructed. To build the family indexed by pp, enumerate the pool as p1,…,pbp_1,\ldots,p_b with p1=pp_1=p, and abbreviate

Gj=Gs−1,pj,vj=vs−1,pj,Wj=Ws−1,pj,m=ns−1.G_j=G_{s-1,p_j},\quad v_j=v_{s-1,p_j},\quad W_j=W_{s-1,p_j},\quad m=n_{s-1}.

Set Gs,p=∏j=1bGjG_{s,p}=\prod_{j=1}^{b}G_j and vs,p=(v1,0,…,0)v_{s,p}=(v_1,0,\ldots,0), which has order pp.

For z=(z1,…,zb)z=(z_1,\ldots,z_b), the new word is a concatenation of LL rows, indexed by i=0,…,L−1i=0,\ldots,L-1. Row ii begins with a payload of 2b−12b-1 slots. Its first bb slots contain separately tagged copies of W1(z1+iv1)W_1(z_1+i v_1); its remaining slots contain tagged copies of Wj(zj+ivj)W_j(z_j+i v_j) for j=2,…,bj=2,\ldots,b, in that order. Each slot has its own tag, fixed across all rows and different from every other slot tag. The payload length is B=(2b−1)mB=(2b-1)m. Append a marker #B\#^B, where #\# is absent from all payloads.

More formally, the new alphabet is the disjoint union of {#}\{\#\} and one set {r}×As−1,pj\{r\}\times A_{s-1,p_j} for each slot rr carrying component jj. This also tags every lower-level marker, so none becomes the new symbol #\#. The full length and alphabet bounds are

ns=2BL=2(2b−1)Lns−1,∣As,p∣≤1+(2b−1)As−1.(10)n_s=2BL=2(2b-1)Ln_{s-1},\qquad|A_{s,p}|\le1+(2b-1)A_{s-1}. \tag*{(10)}

There are two kinds of cheap steps. First include the simultaneous step τ=(v1,…,vb)\tau=(v_1,\ldots,v_b) with budget 2/L2/L. Row ii of the word at z+τz+\tau is row i+1i+1 of the word at zz whenever 0≤i<L−10\le i<L-1. Deleting the first row and inserting one final row costs at most 4B=2ns/L4B=2n_s/L.

For the other steps, let c1=bc_1=b and cj=1c_j=1 for j≥2j\ge2, and put

ωj=cjm2B,∑j=1bωj=12.(11)\omega_j=\frac{c_jm}{2B},\qquad\sum_{j=1}^{b}\omega_j=\frac{1}{2}. \tag*{(11)}

The number ωj\omega_j is the fraction of the full word occupied by component jj; markers occupy the other half. For each (e,r)∈Ss−1,pj(e,r)\in S_{s-1,p_j} include its lift e~\tilde e to coordinate jj with budget ωjr\omega_jr. The preceding level’s bound holds at every translated state zj+ivjz_j+i v_j. Editing the LcjLc_j affected slots separately therefore costs at most Lcjmr=nsωjrLc_jmr=n_s\omega_jr. This proves (8).

Separation across row boundaries

We first isolate the matching argument supplied by the fresh markers. It will convert a comparison of every pair of payloads into a comparison of the full row lists.

Lemma 3.2 (Marked payloads). Let T,p,q≥1T,p,q \ge1 be integers, let Γ\Gamma be an alphabet, and let #∉Γ\# \notin\Gamma. For Ua,Vb∈ΓpU_a,V_b \in\Gamma^p with 1≤a,b≤T1 \le a,b \le T, put

X=U1#q⋯UT#q,Y=V1#q⋯VT#q,N=T(p+q).X = U_1\#^q\cdots U_T\#^q,\qquad Y = V_1\#^q\cdots V_T\#^q,\qquad N = T(p+q).

If d≥0d \ge0 and rp(Ua,Vb)≥dr_p(U_a,V_b) \ge d for every a,ba,b, then

rN(X,Y)≥Tdqd+q≥T2min⁡(d,q).(12)r_N(X,Y) \ge\frac{Tdq}{d+q} \ge\frac{T}{2}\min(d,q). \tag*{(12)}

In particular, d≤qd \le q implies Δ(X,Y)≥Td\Delta(X,Y) \ge Td.

Proof. Fix an increasing matching, with EE unmatched positions on each side. No source payload symbol can match a target marker. Let ss be the number of source payloads whose matches reach at least two target payloads.

A source payload whose matches lie in one target payload loses at least dd source positions. A payload with no matches loses p≥dp \ge d positions. Summing over these T−sT-s payloads gives E≥d(T−s)E \ge d(T-s).

For each of the other ss payloads, choose a target marker between two of its matches, as in Figure 1. The entire marker is unmatched: a matched target position between the two chosen matches would have its source partner between their source partners, inside this source payload, where #\# does not occur. The target matched spans of different source payloads are ordered and disjoint, so the chosen markers are distinct. Thus E≥sqE \ge sq.

Diagram showing a source payload and target payloads separated by an unmatched target marker

Figure 1. Two matches from one source payload enclose an unmatched target marker. The arrows represent matched pairs; no alignment of other payload boundaries is assumed.

Combining the two estimates gives E≥d(T−E/q)E \ge d(T-E/q) and hence E≥Tdq/(d+q)E \ge Tdq/(d+q). The latter is at least (T/2)min⁡(d,q)(T/2)\min(d,q). This holds for every matching, including when d=0d=0, and proves (12). Finally Δ(X,Y)=2rN(X,Y)\Delta(X,Y)=2r_N(X,Y). □

We apply the lemma to the words at zz and z+uvsv,pz+uvs_{v,p}, where 1≤u<p11 \le u < p_1. Compare source payload ii with target payload i′i' and write δ=i′−i\delta=i'-i. Their relative shifts are (δ+u)v1(\delta+u)v_1 in component 1 and δvj\delta v_j in component j≥2j \ge2.

At least b/3b/3 slots have a nonzero shift. If p1∤δ+up_1 \nmid\delta+u, all bb copies of component 1 do. Otherwise δ≠0\delta\ne0, since 1≤u<p11 \le u < p_1. Now 0<∣δ∣<L=Pb/20 < |\delta| < L=P^{b/2}, whereas the product of b/2b/2 distinct primes from the pool is at least Pb/2P^{b/2}. Fewer than b/2b/2 pool primes can therefore divide δ\delta. Among components 2,…,b2,\ldots,b, at least b−1−b/2≥b/3b-1-b/2 \ge b/3 have a nonzero shift.

In each such slot the induction hypothesis gives insertion–deletion distance at least mαs−1m\alpha_{s-1}. A matching of the two complete length-mm slot words therefore leaves at least mαs−1/2m\alpha_{s-1}/2 source positions unmatched. Since the slot tags are disjoint, every matching between the two payloads restricts to a matching of the corresponding complete slot words. Its size is bounded by their LCS even if other source payloads use some positions of the same target slot. Thus every pair of payloads has one-sided deficit at least

ds=αs−1bm6.d_s = \frac{\alpha_{s-1}bm}{6}.

We have ds≤Bd_s \le B. Lemma 3.2, with T=LT = L and marker length BB, gives Δ(Ws,p(z),Ws,p(z+uvs,p))≥Lds\Delta(W_{s,p}(z), W_{s,p}(z+uv_{s,p})) \ge Ld_s. Dividing by (10),

Δ(Ws,p(z),Ws,p(z+uvs,p))ns≥αs−1b12(2b−1)≥αs−124=αs.\frac{\Delta(W_{s,p}(z), W_{s,p}(z+uv_{s,p}))}{n_s} \ge\frac{\alpha_{s-1}b}{12(2b-1)} \ge\frac{\alpha_{s-1}}{24} = \alpha_s.

This proves the pointwise separation (9).

The averaged analytic recurrence

Suppose H:Gs,p→ℓ1H : G_{s,p} \to\ell_1 meets the listed averaged budgets. We need the preceding level’s assertion for one component, but its hypotheses concern averages over that component’s entire state group. The right map is a direct sum over all settings of the other components.

For fixed jj, let Yj=∏ℓ≠jGℓY_j = \prod_{\ell\ne j} G_\ell and define

Tj(x)=1ωj∣Yj∣⨁y∈YjH(x,y),x∈Gj.(13)T_j(x) = \frac{1}{\omega_j |Y_j|} \bigoplus_{y \in Y_j} H(x,y), \qquad x \in G_j. \tag*{(13)}

Here H(x,y)H(x,y) means that xx occupies coordinate jj, and the finite direct sum of sequence spaces is identified with ℓ1\ell_1. For every e∈Gje \in G_j, additivity of the sum norm gives

VTj(e)=1ωjEx∈Gj, y∈Yj∥H(x+e,y)−H(x,y)∥1=VH(e~)ωj.(14)V_{T_j}(e) = \frac{1}{\omega_j}\mathbb{E}_{x \in G_j,\,y \in Y_j}\|H(x+e,y)-H(x,y)\|_1 = \frac{V_H(\widetilde e)}{\omega_j}. \tag*{(14)}

The lifted step budgets therefore make TjT_j satisfy all the preceding level’s hypotheses at once. The induction assertion yields

VH(avj)≤ωjQs−1(0≤a<pj),V_H(av_j) \le\omega_j Q_{s-1} \qquad(0 \le a < p_j),

where a=0a = 0 is immediate. No individual slice of HH is required to satisfy those hypotheses.

Apply Proposition 2.2 to the factors GjG_j and their distinguished elements. The simultaneous budget, component control and (11) give

VH(uvs,p)≤(2P)2hVH(τ)+2h∑j=1bEa∈Z/pjZVH(avj)≤2(2P)2hL+2h∑j=1bωjQs−1=2(2P)2hL+Qs−1h=Qs.\begin{aligned} V_H(uv_{s,p}) \le(2P)^{2h}V_H(\tau) + \frac{2}{h}\sum_{j=1}^{b}\mathbb{E}_{a \in\mathbb{Z}/p_j\mathbb{Z}}V_H(av_j) \\ &\le\frac{2(2P)^{2h}}{L} + \frac{2}{h}\sum_{j=1}^{b}\omega_j Q_{s-1} \\ &= \frac{2(2P)^{2h}}{L} + \frac{Q_{s-1}}{h} = Q_s. \end{aligned}

This proves (3.5) and completes the simultaneous induction in Proposition 3.1.

The quotient αs/Qs\alpha_s/Q_s measures the resulting obstruction to embedding the word image. Indeed, let f:Ws,p(Gs,p)→ℓ1f : W_{s,p}(G_{s,p}) \to\ell_1 have distortion DD, normalized so that $\mathbb{E}D(x,y)/D \le |f(x)-f(y)|_1 \le ED⁡(x,y)\operatorname{ED}(x,y). Then H=f∘Ws,p/nsH=f\circ W_{s,p}/n_s satisfies the listed budgets by ED⁡≤Δ\operatorname{ED}\le\Delta and (8). On the other hand, (9) and ED⁡≥Δ/2\operatorname{ED}\ge\Delta/2 give

αs2D≤VH(vs,p)≤Qs,D≥αs2Qs.\frac{\alpha_s}{2D}\le V_H(v_{s,p})\le Q_s,\qquad D\ge\frac{\alpha_s}{2Q_s}.

Thus pointwise word separation can be compared directly with averaged ℓ1\ell_1 displacement. It remains to estimate this quotient and retain it when the growing alphabet is replaced by binary symbols.

Binary encoding and the lower bound

We replace each letter by a binary block of width logarithmic in the alphabet size. For insertion–deletion distance, the code below expands by at most its width and contracts by at most an absolute factor; hence transferring the preceding obstruction to binary words costs only the width times an absolute factor. The delimiter ensures that a code block whose bits all match consecutive positions must match one equal code block. We also prove the variable-length padding statement needed for the upper bound.

Lemma 4.1 (Binary delimiter code). Let A\mathcal{A} have size A≥2A\ge2, let t=⌈log⁡2A⌉t=\lceil\log_2 A\rceil, and put w=2t+3w=2t+3. Assign distinct labels (a1,…,at)∈{0,1}t(a_1,\ldots,a_t)\in\{0,1\}^t to its letters. Let c(a)c(a) be the prefix 110110 followed, in order, by the two-bit words aj0a_j0 for j=1,…,tj=1,\ldots,t. Extend cc by concatenation to all finite strings, with c(ε)=εc(\varepsilon)=\varepsilon. Then

12Δ(x,y)≤Δ(c(x),c(y))≤wΔ(x,y)(x,y∈A∗).(15)\frac{1}{2}\Delta(x,y)\le\Delta(c(x),c(y))\le w\Delta(x,y)\qquad(x,y\in\mathcal{A}^*). \tag*{(15)}

For an integer D≥0D\ge0 and ∣x∣≤D|x|\le D, set cD(x)=c(x)0w(D−∣x∣)∈{0,1}wDc_D(x)=c(x)0^{w(D-|x|)}\in\{0,1\}^{wD}. Then

12Δ(x,y)≤Δ(cD(x),cD(y))≤2wΔ(x,y)(∣x∣,∣y∣≤D).(16)\frac{1}{2}\Delta(x,y)\le\Delta(c_D(x),c_D(y))\le2w\Delta(x,y)\qquad(|x|,|y|\le D). \tag*{(16)}

Proof. We prove both lower bounds at once for U=c(x)0rU=c(x)0^r and V=c(y)0sV=c(y)0^s, where r,s≥0r,s\ge0 are arbitrary integers. The pattern 1111 occurs exactly at the start of a genuine letter block: zeros separate the label bits, every block ends in zero, and the added suffixes contain only zeros.

Fix an increasing bit matching. Let aU,aVa_U,a_V be its unmatched counts on the two sides and put a=aU+aVa=a_U+a_V. Call a genuine block good if all of its bits are matched and their partners occupy consecutive positions. On either one side, at most aa genuine blocks are not good. For the UU side, a block containing an unmatched bit can be charged to one such bit, with distinct charges for distinct blocks; this accounts for at most aUa_U blocks. Any other non-good block has all its bits matched, but some two consecutive block positions have partners separated by a nonempty open interval in VV. Every bit in that interval is unmatched, since a partner would have to lie between consecutive positions in UU. Charge one bit in the interval. The intervals for distinct blocks are disjoint by monotonicity, so this accounts for at most aVa_V more blocks. The argument includes skipped intervals containing whole blocks or padding. Interchanging the two strings gives the same bound on the VV side.

A good block begins with matched bits 1111. Its consecutive partners therefore start at a genuine block boundary on the other side. There are exactly ww partners, so they form that entire block. The two blocks are equal and encode the same letter; the target block is itself good. The same argument in reverse shows that the good blocks on the two sides pair bijectively, in increasing order. They give a letter matching between xx and yy whose loss is the number of non-good genuine blocks, at most 2a2a. Lemma 2.1 yields Δ(x,y)≤2a\Delta(x,y) \le2a. Minimizing the bit loss proves the lower bounds, including empty strings and independently chosen zero suffixes.

For the unpadded upper bound, implement each letter insertion or deletion by ww bit operations. For the padded bound, put r=w(D−∣x∣)r = w(D - |x|) and s=w(D−∣y∣)s = w(D - |y|). Transform the coded prefix while retaining its suffix, then adjust the suffix length:

Δ(c(x)0r,c(y)0s)≤Δ(c(x),c(y))+∣r−s∣≤wΔ(x,y)+w∣∣x∣−∣y∣∣≤2wΔ(x,y).\Delta(c(x)0^{r},c(y)0^{s}) \le\Delta(c(x),c(y)) + |r-s| \le w\Delta(x,y) + w\lvert|x|-|y| \rvert\le2w\Delta(x,y).

The last inequality follows because one insertion or deletion changes length by one.

The quantitative obstruction

First bound the recurrence in Proposition 3.1. For sufficiently large kk, we have 2P≤P3/22P \le P^{3/2} and

η:=2(2P)2hL≤2P3h−b/2=2P−b/5≤P−b/6≤h−k.\eta:= \frac{2(2P)^{2h}}{L} \le2P^{3h-b/2} = 2P^{-b/5} \le P^{-b/6} \le h^{-k}.

For the last inequality, Pb/6=bb/3=b(100/3)k≥(b/10)k=hkP^{b/6} = b^{b/3} = b^{(100/3)k} \ge(b/10)^k = h^k. Since h≥2h \ge2, solving (7) gives

Qk=2h−k+η∑j=0k−1h−j≤2h−k+2η≤4h−k.Q_k = 2h^{-k} + \eta\sum_{j=0}^{k-1} h^{-j} \le2h^{-k} + 2\eta\le4h^{-k}.

The alphabet recurrence gives As≤(2P+1)(2b)sA_s \le(2P+1)(2b)^s: the base case is immediate and 1+(2b−1)As−1≤2bAs−11+(2b-1)A_{s-1} \le2bA_{s-1}. Hence log⁡Ak=O(klog⁡k)\log A_k = O(k\log k). Fix a prime p∈Pp \in\mathcal{P} and apply Lemma 4.1 to the alphabet of Wk,pW_{k,p}, without padding. Write enc⁡\operatorname{enc} for the resulting concatenated code. Its width is w=O(klog⁡k)w = O(k\log k), and all encoded words have the same length

Nk=wnk=w(2(2b−1)Pb/2)k,log⁡Nk≤Clenk2log⁡kN_k = wn_k = w\left(2(2b-1)P^{b/2}\right)^k,\qquad\log N_k \le C_{\mathrm{len}}k^2\log k

for an absolute ClenC_{\mathrm{len}} and all sufficiently large kk.

Proposition 4.2. For all sufficiently large kk, every ℓ1\ell_1 embedding of

Wk={enc⁡(Wk,p(z)):z∈Gk,p}⊆{0,1}Nk\mathcal{W}_k = \{\operatorname{enc}(W_{k,p}(z)):z\in G_{k,p}\} \subseteq\{0,1\}^{N_k}

has distortion at least

(h/24)k16w≥exp⁡(c0klog⁡k)\frac{(h/24)^k}{16w} \ge\exp(c_0 k\log k)

for an absolute constant c0>0c_0 > 0.

Proof. Let ff be an injective embedding of Wk\mathcal{W}_k with distortion DD. Rescale it so that

ED⁡(x,y)D≤∥f(x)−f(y)∥1≤ED⁡(x,y)(x,y∈Wk),\frac{\operatorname{ED}(x,y)}{D} \le\lVert f(x)-f(y)\rVert_1 \le\operatorname{ED}(x,y)\qquad(x,y\in\mathcal{W}_k),

and define H(z)=f(enc⁡(Wk,p(z)))/(wnk)H(z)=f(\operatorname{enc}(W_{k,p}(z)))/(wn_k). For every listed step (e,r)(e,r), the code’s upper bound and (8) give, at each state,

∥H(z+e)−H(z)∥1≤ED⁡(enc⁡(Wk,p(z+e)),enc⁡(Wk,p(z)))wnk≤wΔ(Wk,p(z+e),Wk,p(z))wnk≤r.\lVert H(z+e)-H(z)\rVert_1 \le\frac{\operatorname{ED}(\operatorname{enc}(W_{k,p}(z+e)),\operatorname{enc}(W_{k,p}(z)))}{wn_k} \le\frac{w\Delta(W_{k,p}(z+e),W_{k,p}(z))}{wn_k} \le r.

Thus HH meets the averaged hypotheses of Proposition 3.1.

For v=vk,pv=v_{k,p}, the lower bounds give, again at every state,

∥H(z+v)−H(z)∥1≥ED⁡(enc⁡(Wk,p(z+v)),enc⁡(Wk,p(z)))Dwnk≥Δ(enc⁡(Wk,p(z+v)),enc⁡(Wk,p(z)))2Dwnk≥Δ(Wk,p(z+v),Wk,p(z))4Dwnk≥24−k4Dw.\lVert H(z+v)-H(z)\rVert_1 \ge\frac{\operatorname{ED}(\operatorname{enc}(W_{k,p}(z+v)),\operatorname{enc}(W_{k,p}(z)))}{D w n_k} \ge\frac{\Delta(\operatorname{enc}(W_{k,p}(z+v)),\operatorname{enc}(W_{k,p}(z)))}{2D w n_k} \ge\frac{\Delta(W_{k,p}(z+v),W_{k,p}(z))}{4D w n_k} \ge\frac{2^{4-k}}{4D w}.

In particular, these designated pairs represent distinct words, although other state pairs may coincide. Averaging and using (3.5) and (4.3), we obtain

24−k4Dw≤VH(v)≤4h−k,D≥(h/24)k16w.\frac{2^{4-k}}{4D w} \le V_H(v) \le4h^{-k}, \qquad D \ge\frac{(h/24)^k}{16w}.

Since h=10kh=10k and w=O(klog⁡k)w=O(k\log k), the logarithm of the last expression is klog⁡k−O(k)−O(log⁡k)k\log k-O(k)-O(\log k). It is at least c0klog⁡kc_0k\log k for all sufficiently large kk.

A witness for every sufficiently large cap

Set t=log⁡dt=\log d and fix a>0a>0 small enough that Clena2≤1/2C_{\mathrm{len}}a^2\le1/2. Choose

k=⌊atlog⁡t⌋.k=\left\lfloor a\sqrt{\frac{t}{\log t}}\right\rfloor.

For sufficiently large dd, this depth is available and log⁡k≤log⁡t\log k\le\log t. (4.4) gives

log⁡Nk≤Clenk2log⁡k≤Clena2t≤t,\log N_k\le C_{\mathrm{len}}k^2\log k\le C_{\mathrm{len}}a^2t\le t,

so Nk≤dN_k\le d. After increasing the threshold on dd,

k≥a2tlog⁡t,log⁡k≥13log⁡t,klog⁡k≥a6tlog⁡t.k\ge\frac{a}{2}\sqrt{\frac{t}{\log t}}, \qquad\log k\ge\frac{1}{3}\log t, \qquad k\log k\ge\frac{a}{6}\sqrt{t\log t}.

Proposition 4.2 therefore proves the lower bound in (1.1) for binary strings. This direct choice of kk uses no estimate on gaps between successive lengths NkN_k.

Finally, choose two letters in any finite alphabet Σ\Sigma of size at least two. Their strings form an isometric copy of binary edit distance. One inequality follows because every binary edit script is also a Σ\Sigma-script. For the reverse inequality, project all other letters to one of the chosen letters; each operation in a Σ\Sigma-script becomes at most one binary edit. Restricting an embedding to this subspace gives EΣ(d)≥E{0,1}(d)E_\Sigma(d)\ge E_{\{0,1\}}(d) and completes the lower half of Theorem 1.1.

An upper bound uniform over finite alphabets

The upper proof uses one external embedding theorem. We state the normalized form needed here from Theorem 7, printed page 7, of the August 19, 2005 author manuscript of Ostrovsky and Rabani [8]. Their introduction also notes the larger-alphabet and varying-length extensions. The proof below supplies the complete uniform reduction from this fixed-length binary input.

Theorem 5.1 (Ostrovsky–Rabani, normalized form). There is an absolute constant C0C_0 such that, for every integer m≥3m \ge3, there is a map gm:{0,1}m→ℓ1g_m:\{0,1\}^m \to\ell_1 satisfying

ED⁡(u,v)≤∥gm(u)−gm(v)∥1≤DmED⁡(u,v),Dm=exp⁡(C0log⁡mlog⁡log⁡m).(17)\operatorname{ED}(u,v) \le\lVert g_m(u)-g_m(v)\rVert_1 \le D_m \operatorname{ED}(u,v), \qquad D_m=\exp(C_0\sqrt{\log m\log\log m}). \tag*{(17)}

Here ED⁡\operatorname{ED} permits unit-cost substitutions as well as insertions and deletions.

On the finite domain, the minimum pairwise image-to-edit-distance ratio of an embedding is positive; division by that ratio makes the theorem noncontracting without changing distortion. Its asymptotic expression is written with natural logarithms, and increasing C0C_0 absorbs any finite set of small lengths m≥3m \ge3: mapping each binary string to a distinct coordinate vector has distortion at most mm.

We reduce the alphabet to a number of labels depending only on dd, then use Lemma 4.1 to encode and pad to one binary length. A final direct sum over all label maps will turn the pairwise probability estimate into one embedding of the whole domain.

Proposition 5.2 (Uniform alphabet bound). There is an absolute constant CC such that, for every finite alphabet Σ\Sigma with ∣Σ∣≥2|\Sigma| \ge2,

EΣ(d)≤exp⁡(Clog⁡dlog⁡log⁡d)(d≥3).(18)E_{\Sigma}(d) \le\exp(C\sqrt{\log d\log\log d}) \qquad(d \ge3). \tag*{(18)}

Moreover, EΣ(1)=1E_{\Sigma}(1)=1 and 1≤EΣ(2)≤21 \le E_{\Sigma}(2) \le2.

Proof. Fix d≥1d \ge1 and put q=4d2q=4d^2. Choose a map h:Σ→[q]h:\Sigma\to[q] by assigning independent uniform labels to the letters, and apply it letter by letter to strings. Equal original letters remain equal after relabeling, so every original increasing matching remains valid. Hence, for every outcome,

Δ(h(x),h(y))≤Δ(x,y).(19)\Delta(h(x),h(y)) \le\Delta(x,y). \tag*{(19)}

For a fixed pair x,y∈Σ≤dx,y \in\Sigma^{\le d}, let SS be the set of letters appearing in either string. Since ∣S∣≤2d|S| \le2d, the union bound gives

Pr⁡(h is not injective on S)≤(∣S∣2)q≤(2d)(2d−1)8d2<12.(20)\Pr(h\text{ is not injective on }S) \le\frac{\binom{|S|}{2}}{q} \le\frac{(2d)(2d-1)}{8d^2} < \frac{1}{2}. \tag*{(20)}

When hh is injective on this pair’s letters, equality of symbols is preserved in both directions. The available increasing matchings are then exactly the same, so

Δ(h(x),h(y))=Δ(x,y).(21)\Delta(h(x),h(y)) = \Delta(x,y). \tag*{(21)}

For the alphabet [q][q], use the delimiter code with t=⌈log⁡2q⌉t=\lceil\log_2 q\rceil, w=2t+3w=2t+3, and binary length m=wdm=wd. We have m≥7m \ge7, so Theorem 5.1 applies. For every hh, the padded string cd(h(x))c_d(h(x)) has length mm. The metric comparisons, (4.2) and (5.3) give

∥gm(cd(h(x)))−gm(cd(h(y)))∥1≤DmΔ(cd(h(x)),cd(h(y)))≤2wDmΔ(x,y)≤4wDmED⁡(x,y).(22)\begin{aligned} \lVert g_m(c_d(h(x)))-g_m(c_d(h(y)))\rVert_1 &\le D_m\Delta(c_d(h(x)),c_d(h(y)))\\ &\le2wD_m\Delta(x,y) \le4wD_m\operatorname{ED}(x,y). \tag*{(22)} \end{aligned}

On the event in (5.5), the reverse estimate is

∥gm(cd(h(x)))−gm(cd(h(y)))∥1≥ED⁡(cd(h(x)),cd(h(y)))≥12Δ(cd(h(x)),cd(h(y)))≥14Δ(x,y)≥14ED⁡(x,y).(23)\begin{aligned} \lVert g_m(c_d(h(x)))-g_m(c_d(h(y)))\rVert_1 &\ge\operatorname{ED}(c_d(h(x)),c_d(h(y)))\\ &\ge\frac{1}{2}\Delta(c_d(h(x)),c_d(h(y)))\\ &\ge\frac{1}{4}\Delta(x,y) \ge\frac{1}{4}\operatorname{ED}(x,y). \tag*{(23)} \end{aligned}

Let H\mathcal{H} be the finite set of all q∣Σ∣q^{|\Sigma|} label maps, with probabilities ph=q−∣Σ∣p_h=q^{-|\Sigma|}. Define

F(x)=⨁h∈Hph(gm(cd(h(x)))−gm(0m)).(24)F(x)=\bigoplus_{h\in\mathcal{H}}p_h\left(g_m(c_d(h(x)))-g_m(0^m)\right). \tag*{(24)}

This finite direct sum is an ℓ1\ell_1 vector, and the sum norm gives the exact identity

∥F(x)−F(y)∥1=Eh∥gm(cd(h(x)))−gm(cd(h(y)))∥1.\left\|F(x)-F(y)\right\|_1=\mathbb{E}_h\left\|g_m(c_d(h(x)))-g_m(c_d(h(y)))\right\|_1.

Taking expectations in (22) and (23), using (20), yields

18ED⁡(x,y)≤∥F(x)−F(y)∥1≤4wDmED⁡(x,y).(25)\frac{1}{8}\operatorname{ED}(x,y)\leq\left\|F(x)-F(y)\right\|_1\leq4wD_m\operatorname{ED}(x,y). \tag*{(25)}

Thus FF is injective and has distortion at most 32wDm32wD_m. The empty string has image zero, since its padded code is 0m0^m; its distance bounds are included in the same calculation.

For d≥3d\geq3, w=O(log⁡d)w=O(\log d) and m=O(dlog⁡d)m=O(d\log d) with absolute constants. Therefore

log⁡(32wDm)=O(log⁡log⁡d)+O(log⁡mlog⁡log⁡m)=O(log⁡dlog⁡log⁡d),\log(32wD_m)=O(\log\log d)+O\left(\sqrt{\log m\log\log m}\right)=O\left(\sqrt{\log d\log\log d}\right),

which proves (18), enlarging the absolute constant for finitely many initial values if necessary.

For d=1d=1, all distinct strings in Σ≤1\Sigma^{\leq1} have edit distance one, and x↦ex/2x\mapsto e_x/2 is isometric. In general, every nonzero edit distance between strings of length at most dd lies between one and dd: substitute the common-length part and then insert or delete the remaining symbols. The same coordinate-vector map has distortion at most dd, giving EΣ(2)≤2E_\Sigma(2)\leq2. Distortion is always at least one.

Together with the binary witnesses of Section 4, this proves Theorem 1.1.

References

  1. [1]A. Andoni, M. Deza, A. Gupta, P. Indyk and S. Raskhodnikova. Lower bounds for embedding edit distance into normed spaces. In Proceedings of the Fourteenth Annual ACM–SIAM Symposium on Discrete Algorithms, pages 523–526, 2003. Author manuscript.
  2. [2]S. Khot and A. Naor. Nonembeddability theorems via Fourier analysis. Mathematische Annalen, 334(4):821–852, 2006. doi:10.1007/s00208-005-0745-0. Author final manuscript.DOI
  3. [3]R. Krauthgamer and Y. Rabani. Improved lower bounds for embeddings into L₁. SIAM Journal on Computing, 38(6):2487–2498, 2009. doi:10.1137/060660126.DOI
  4. [4]V. I. Levenshtein. Binary codes capable of correcting deletions, insertions, and reversals. Soviet Physics Doklady, 10(8):707–710, 1966. Russian original: Doklady Akademii Nauk SSSR, 163(4):845–848, 1965. Original publication record.
  5. [5]N. Linial, E. London and Y. Rabinovich. The geometry of graphs and some of its algorithmic applications. Combinatorica, 15(2):215–245, 1995. doi:10.1007/BF01200757.DOI
  6. [6]OpenAI. Finite-Circle Obstructions, Binary Codes, and Histogram Embeddings for Edit Distance. OpenAI Math Release preprint OAI:Finite-Circle-Obstructions-Binary-Codes-and-Histogram-Embeddings-for-Edit-Distance-September-27-2026, 2026.
  7. [7]OpenAI. Tree Constructions for the ℓ₁ Distortion of Binary Edit Distance. OpenAI Math Release preprint OAI:Tree-Constructions-for-the-l1-Distortion-of-Binary-Edit-Distance-September-27-2026, 2026.
  8. [8]R. Ostrovsky and Y. Rabani. Low distortion embeddings for edit distance. Journal of the ACM, 54(5), Article 23, 2007. doi:10.1145/1284320.1284322. Preliminary author manuscript dated August 19, 2005, Theorem 7, printed page 7.DOI
  9. [9]J. B. Rosser and L. Schoenfeld. Approximate formulas for some functions of prime numbers. Illinois Journal of Mathematics, 6(1):64–94, 1962. doi:10.1215/ijm/1255631807.DOI
  10. [10]R. A. Wagner and M. J. Fischer. The string-to-string correction problem. Journal of the ACM, 21(1):168–173, 1974. doi:10.1145/321796.321811.DOI

Paper details

Contents