alphaFeedback

WorksMathematics

Upper bounds for the Chvátal–Sankoff constants γk\gamma_k, k≥3k\ge3

AI contributions
  • Anthropic Claude Opus
View details

Abstract

Lueker (J. ACM 56(3), 2009) constructed a family of finite-state machines Mh\mathcal{M}_h whose associated transfer matrices yield upper bounds on the Chvátal–Sankoff constants γk\gamma_k, and proved (his Theorem 3.26) that these bounds converge to γk\gamma_k for every alphabet size kk. He published values only for k=2k=2. For k≥3k\ge3 the best upper bounds we were able to find in the literature in September 2026 were still those of Dančík's 1994 thesis: subsequent work generalising Lueker has generalised his Section 2, the lower bound. We implement Mh\mathcal{M}_h for arbitrary kk. One ingredient has no binary analogue — the generating function of a truncation class when both sides of a minimal match pair are truncated — and we derive it. We then give a reduction by relative forms under which the transition multiplicities of the transfer matrix are falling factorials in kk; one alphabet-free construction consequently determines the exact matrix for every kk. We obtain improved upper bounds for k=3,…,15k=3,\dots,15, each supported by a Collatz–Wielandt certificate verified in exact rational arithmetic, among them γ5≤0.645033\gamma_5\le0.645033. A note added on 31 October 2026 compares these values with those of a repository made public by L. Jack on 25 October 2026.

Results

Let Σ={0,…,k−1}\Sigma= \{0, \ldots, k - 1\} and let Ln,nL_{n,n} be the length of a longest common subsequence of two independent uniform random words of length nn over Σ\Sigma. By subadditivity E[Ln,n]/n→γk\mathbb{E}[L_{n,n}]/n \to\gamma_k [1]. The constants are not known.

kkhhDančík 1994this notegaingain
340.7658030.7478862760.0179172.34%
440.7082360.6890639470.0191722.71%
540.6644280.6450327870.0193952.92%
630.6293160.6182568220.0110591.76%
730.6001840.5894567260.0107271.79%
830.5754070.5650411500.0103661.80%
930.5539370.5439372750.0100001.81%
1030.5348550.5254169420.0094381.76%
1130.5178420.5089640250.0088781.71%
1230.5025910.4941998960.0083911.67%
1330.4888000.4808389340.0079611.63%
1430.4761980.4686606280.0075371.58%
1530.4646190.4574913570.0071281.53%

Table 1.

Every bound in the fourth column is certified in the sense of § 6: it is the value of 2log⁡(kz0)/log⁡λ2\log(kz_0)/\log\lambda for an explicit rational z0z_0 and an explicit rational λ\lambda for which the inequality Az0v≤λvAz_0v \le\lambda v has been checked coordinatewise in exact rational arithmetic.

Background, and why the gap existed

The framework is that of Chvátal and Sankoff [1]: writing G(n,ℓ)G(n,\ell) for the number of pairs of words of total length nn whose longest common subsequence has length at least ℓ\ell, if G(2n,yn)=o(k2n)G(2n,yn)=o(k^{2n}) then γk≤y\gamma_k \le y. All published upper bounds bound GG by counting lists of minimal match pairs, the difficulty being to control the overcounting.

Dančík [2] and Dančík–Paterson [3] control it by domination; for k=2k = 2 a hand-built 52-state automaton gives γ2≤0.837623\gamma_2 \le0.837623, and a much coarser three-class system gives the values for 3≤k≤153 \le k \le15 that are still quoted today (see for instance [7]).

Lueker [6] replaces domination by canonicity: the canonical longest common subsequence obtained by backtracking through the dynamic programming table with the fixed priority (up, left, diagonal). Every pair of words has exactly one canonical decomposition (his Lemma 3.4), which domination does not provide — indeed his Conjecture 3.19, that a pair is generated by only one undominated list, is false for every k≥3k \ge3, and he gives counterexamples. His machine Mh\mathcal{M}_h remembers the last hh characters of each word and the last hh differences in the final row and column of the table. His Theorem 3.26 states that the bounds converge to γk\gamma_k for arbitrary kk; his Table II is binary.

The subsequent literature generalised the other half of his paper. Kiwi and Soto [5] extended his Section 2 — the lower-bound recurrence — to arbitrary alphabet size and number of strings, and that extension has become the standard tool for lower bounds. Section 3 was apparently never revisited for k≥3k \ge3. Professor Kiwi has confirmed (personal communication, 19 September 2026) that they neither implemented nor considered it, and that they know of no obstruction.

The machine

We recall Mh\mathcal{M}_h only as far as needed. A minimal match pair is p=(ua,va)p = (ua, va) with a∈Σa \in\Sigma, a∉alph⁡(u)∪alph⁡(v)a \notin\operatorname{alph}(u) \cup\operatorname{alph}(v) and alph⁡(u)∩alph⁡(v)=∅\operatorname{alph}(u) \cap\operatorname{alph}(v) = \varnothing. The map μ\mu truncates each side of pp from the left to at most hh characters; M0M_0 denotes the (finite) set of minimal match pairs with both sides of length at most hh. A state is q=(x,y,dx,dy)q = (x, y, d_x, d_y) with x,y∈Σhx, y \in\Sigma^h and dx,dy∈{0,1}hd_x, d_y \in\{0,1\}^h, and δ\delta is computed as in [6 Fig. 7]: the limited-history table is extended, missing entries being replaced by the lower bounds available, and the input is accepted exactly when the canonical backtracking from the new corner returns to the stored corner.

Remark 1 (implementation note). The canonicity test of [6 Fig. 7] is printed as while i ≥ h and j ≥ h. Read literally the loop continues past (h,h)(h,h) into the region where the limited-history table holds no values, and every input is rejected. The intended semantics — backtrack while strictly outside the stored corner, then test arrival at (h,h)(h,h) — is while i > h or j > h. With this reading the machine reproduces Table II of [6] exactly; see § 7.

By [6 Thm. 3.3], if z∈(0,1/k)z \in(0,1/k) and λ(z)∈(0,1)\lambda(z) \in(0,1) bounds the growth of the generating function of accepted lists, then

γk≤2log⁡(kz)log⁡λ(z)(1)\gamma_k \le\frac{2\log(kz)}{\log\lambda(z)} \tag*{(1)}

Both logarithms are negative, so the right-hand side is increasing in λ\lambda: overestimating λ\lambda overestimates the bound, which is the safe direction. This is what makes the certificates of § 6 sufficient.

The truncation weights for k≥3k \ge3

The transfer matrix is Az=(aq,q′)A_z=(a_{q,q'}) with aq,q′=∑p∈M0wμ,z(p) [δ(q,p)=q′]a_{q,q'}=\sum_{p\in M_0}w_{\mu,z}(p)\,[\delta(q,p)=q'], where wμ,z(p)=∑μ(p′)=pzs(p′)w_{\mu,z}(p)=\sum_{\mu(p')=p}z^{s(p')} sums over all minimal match pairs truncating to pp [6 eq. (36)]. For k=2k=2 a minimal match pair always has one side of length 1, so at most one side is ever truncated and wμ,zw_{\mu,z} is immediate. For k≥3k\ge3 both sides can be truncated at once, and the two extensions are not independent: they may not share a letter. This is the only step of [6 Sec. 3] that does not carry over verbatim.

Lemma 2. Let p=(ua,va)∈M0p=(ua,va)\in M_0, ℓu=∣ua∣\ell_u=|ua|, ℓv=∣va∣\ell_v=|va|, A=alph⁡(u)A=\operatorname{alph}(u), B=alph⁡(v)B=\operatorname{alph}(v) and f=k−1−∣A∣−∣B∣f=k-1-|A|-|B|. Then

wμ,z(p)={zℓu+ℓv,ℓu<h, ℓv<h,zℓu+ℓv1−(∣A∣+f)z,ℓu=h, ℓv<h,zℓu+ℓv1−(∣B∣+f)z,ℓv=h, ℓu<h,z2h∑r+s≤f(fr)(f−rs)e∣A∣(r)e∣B∣(s),ℓu=ℓv=h,w_{\mu,z}(p)= \begin{cases} z^{\ell_u+\ell_v}, & \ell_u<h,\ \ell_v<h,\\ \dfrac{z^{\ell_u+\ell_v}}{1-(|A|+f)z}, & \ell_u=h,\ \ell_v<h,\\ \dfrac{z^{\ell_u+\ell_v}}{1-(|B|+f)z}, & \ell_v=h,\ \ell_u<h,\\ z^{2h}\sum_{r+s\le f}\binom{f}{r}\binom{f-r}{s}e_{|A|}(r)e_{|B|}(s), & \ell_u=\ell_v=h, \end{cases}

where ea(r)=∑j=0r(rj)(−1)r−j(1−(a+j)z)−1e_a(r)=\sum_{j=0}^{r}\binom{r}{j}(-1)^{r-j}(1-(a+j)z)^{-1}.

Proof. The preimages of pp under μ\mu are the minimal match pairs (w ua,w′ va)(w\,ua,w'\,va) with w,w′∈Σ∗w,w'\in\Sigma^*, subject to a∉alph⁡(wu)∪alph⁡(w′v)a\notin\operatorname{alph}(wu)\cup\operatorname{alph}(w'v) and alph⁡(wu)∩alph⁡(w′v)=∅\operatorname{alph}(wu)\cap\operatorname{alph}(w'v)=\varnothing. Let FF be the set of ff letters outside {a}∪A∪B\{a\}\cup A\cup B. The constraints are exactly alph⁡(w)⊆A∪F\operatorname{alph}(w)\subseteq A\cup F, alph⁡(w′)⊆B∪F\operatorname{alph}(w')\subseteq B\cup F and alph⁡(w)∩alph⁡(w′)∩F=∅\operatorname{alph}(w)\cap\operatorname{alph}(w')\cap F=\varnothing. If ℓu<h\ell_u<h no truncation occurred on the top, so ww is empty; likewise for the bottom. This gives the first three cases, the geometric series counting words over A∪FA\cup F (resp. B∪FB\cup F).

In the fourth case put P=alph⁡(w)∩FP=\operatorname{alph}(w)\cap F and Q=alph⁡(w′)∩FQ=\operatorname{alph}(w')\cap F; the constraint is P∩Q=∅P\cap Q=\varnothing. For fixed PP, the generating function of words ww with alph⁡(w)⊆A∪P\operatorname{alph}(w)\subseteq A\cup P and alph⁡(w)∩F=P\operatorname{alph}(w)\cap F=P is, by inclusion–exclusion over the subsets of PP, ∑P′⊆P(−1)∣P∣−∣P′∣(1−(∣A∣+∣P′∣)z)−1=e∣A∣(∣P∣)\sum_{P'\subseteq P}(-1)^{|P|-|P'|}(1-(|A|+|P'|)z)^{-1}=e_{|A|}(|P|), which depends on PP only through ∣P∣|P|. Summing over ordered pairs of disjoint subsets of FF of cardinalities rr and ss, of which there are (fr)(f−rs)\binom{f}{r}\binom{f-r}{s}, gives the stated expression; the factor z2hz^{2h} accounts for uaua and vava themselves. □

That the summand depends only on the cardinalities r,sr,s is what makes the computation feasible: the double sum has O(f2)O(f^2) terms instead of 3f3^f.

Relative forms, and one construction for every kk

Canonical states have letter set {0,…,m−1}\{0,\ldots,m-1\} for some mm. For p∈M0p\in M_0 let rel⁡m(p)\operatorname{rel}_m(p) be obtained by keeping the letters <m<m and renumbering the letters ≥m\ge m by order of first appearance, reading the top component then the bottom one; let φ(p)\varphi(p) be the number of letters so renumbered.

Lemma 3. Let qq be a canonical state with mm letters.

(i) δ(q,p)\delta(q,p), its canonical class, and the pair (ℓu,ℓv,∣A∣,∣B∣)(\ell_u,\ell_v,|A|,|B|) depend on pp only through relm⁡(p)\operatorname{relm}(p).

(ii) For each relative form rr with φ(r)=φ\varphi(r)=\varphi, the number of p∈M0p\in M_0 with relm⁡(p)=r\operatorname{relm}(p)=r is the falling factorial (k−m)(k−m−1)⋯(k−m−φ+1)(k-m)(k-m-1)\cdots(k-m-\varphi+1), which vanishes as soon as φ>k−m\varphi>k-m.

Proof. Two symbols with the same relative form differ by a permutation of Σ\Sigma fixing {0,…,m−1}\{0,\ldots,m-1\} pointwise. The computation of δ\delta uses only equality tests between characters, so it commutes with any permutation of Σ\Sigma; one fixing the letters of qq leaves qq unchanged, whence (i). For (ii), such a symbol is obtained from rr by choosing the images of its φ\varphi fresh letters among the k−mk-m letters absent from qq, injectively and in the prescribed order of first appearance.

Corollary 4. Each entry of the aggregated transfer matrix is ∑φNφ(k−m)(k−m−1)⋯(k−m−φ+1)\sum_{\varphi}N_{\varphi}(k-m)(k-m-1)\cdots(k-m-\varphi+1), where NφN_{\varphi} is the number of accepted relative forms with φ\varphi fresh letters. A single alphabet-free construction, enumerating relative forms rather than symbols, therefore determines the exact matrix for every kk; the terms with φ>k−m\varphi>k-m vanish of their own accord, and the states that become unreachable are removed by a graph traversal.

Corollary 5. The transition structure is independent of kk once k≥4h−2k\geq4h-2. Indeed m≤2h−1m\leq2h-1, because the two words stored in a state end with the same character—the match character of the last pair read—and φ≤2h−1\varphi\leq2h-1, because a minimal match pair with both sides of length at most hh uses at most (h−1)+(h−1)+1(h-1)+(h-1)+1 distinct letters.

At h=3h=3 both bounds are attained (mmax⁡=φmax⁡=5m_{\max}=\varphi_{\max}=5), so the threshold is exactly 10. We stress what does not stabilise: the multiplicities themselves are polynomials in kk and keep changing. At h=3h=3, 24 628 of the 28 467 entries of the aggregated matrix differ between two consecutive values of kk.

Certificates

For a nonnegative matrix AA and any vector v>0v>0 one has ρ(A)≤max⁡i(Av)i/vi\rho(A)\leq\max_i(Av)_i/v_i (Collatz–Wielandt), whatever the provenance of vv; this is the criterion Lueker uses [6 eq. (41)]. We take z0z_0 rational, compute an approximate Perron vector in floating point, round it to a rational vector v>0v>0 with denominator 10810^8, and then evaluate λ=max⁡i(Az0v)i/vi\lambda=\max_i(Az_0v)_i/v_i and verify Az0v≤λvAz_0v\leq\lambda v coordinatewise in exact rational arithmetic. By the monotonicity noted after (1), 2log⁡(kz0)/log⁡λ2\log(kz_0)/\log\lambda is then a valid upper bound for γk\gamma_k. No floating-point error analysis is required.

kkhhstatesentriesz0z_0λ\lambda (exact, shown truncated)bound
34511636637018207/1000000.1984477973220.747886276
44942729149731753/125000.1867573818430.689063947
5411093705333911493/1000000.1794741834750.645032787
63316284662281/250000.1424112850450.618256822
73316284678027/1000000.1414419381030.589456726
83316284673593/500000.1409314173390.565041150
93316284676519/1000000.1407724260860.543937275
103316284672987/500000.1407192070430.525416942
1133162846769/12500.1407962707610.508964025
123316284671027/200000.1409338039490.494199896
133316284671201/250000.1411224522380.480838934
143316284671129/250000.1413408581760.468660628
153316284674263/1000000.1415960147200.457491357

Table 2.

Validation

Reproduction of Table II. Our implementation, run for k=2k = 2, returns 7, 98 and 1020 accepting states at h=2,3,4h = 2, 3, 4, matching [6 Table II], and certified values λ=0.131204212\lambda= 0.131204212, 0.177752613, 0.217017514 against the published 0.131204211, 0.177752610, 0.217017510. Our values exceed the published ones — the safe direction — by less than 4⋅10−94 \cdot10^{-9}, the difference being the rounding of the certificate vector. The resulting bounds 0.845855, 0.839250, 0.835072 agree with the published six decimals.

Thirteen further published values. The framework (1) was calibrated beforehand against the Chvátal–Sankoff bounds of 1975 and 1983 for k=2,…,6k = 2, \ldots, 6 — computed 0.905118, 0.829982, 0.772908, 0.727666, 0.690556 and 0.866595, 0.786473, 0.729705, 0.686117, 0.650983 against published 0.90512, 0.82999, 0.77291, 0.72767, 0.69056 and 0.86660, 0.78648, 0.72971, 0.68612, 0.65099 — and against the values attributed to Deken in [2 Fig. 4.2] for k=3,4,5k = 3, 4, 5, obtained by taking minimal match pairs alone: 0.776817, 0.718092, 0.673221 against 0.77682, 0.71810, 0.67323.

Remark 6. For k=2k = 2 the same computation gives λ(z)=2z2(1+z)/(1−z)\lambda(z) = 2z^2(1 + z)/(1 - z) and hence 0.860191, not the 0.85750 listed for Deken in [2 Fig. 4.2]. The reconstruction of [2 Sec. 4.2] therefore does not reproduce that particular entry, and it should not be used as a calibration point.

End-to-end test. For all pairs of words over Σ\Sigma up to a given length we computed the canonical decomposition directly from the dynamic programming table and checked that Mh\mathcal{M}_h accepts it; and, conversely, that lists of minimal match pairs of total size at most hh that are not canonical are rejected, as required by [6 Def. 3.12(2)]. Over (k,h)(k, h) equal to (2,3)(2, 3), (2,4)(2, 4), (2,6)(2, 6), (3,3)(3, 3), (3,4)(3, 4) and (4,3)(4, 3) this covers 56 788 canonical decompositions: none is rejected, and of the 195 short lists tested (four of them not canonical) none is wrongly accepted. This is the test that would invalidate the bounds, since coverage of Σ∗\Sigma^* is what [6 Thm. 3.3] requires.

The falling-factorial law. Corollary 4 was checked against direct constructions: 85 401 comparisons of individual matrix entries at k=7,8,9k = 7, 8, 9, no discrepancy. The alphabet-free construction was then compared entry by entry with the direct one for k=3,4,5,7,10,15k = 3, 4, 5, 7, 10, 15: identical state sets (including the smaller ones, 249 states at k=3k = 3 and 309 at k=4k = 4) and identical multiplicities throughout.

Internal consistency. The bounds are strictly decreasing in kk. Kiwi, Loebl and Matoušek [4] proved k γk→2\sqrt{k}\,\gamma_k \to2; our k×\sqrt{k} \times bound increases monotonically and stays below 2:

kkboundk⋅\sqrt{k}\cdotboundk⋅\sqrt{k}\cdotDančík
30.7478862761.295381.32641
40.6890639471.378131.41647
50.6450327871.442341.48571
60.6182568221.514411.54150
70.5894567261.559561.58794
80.5650411501.598181.62750
90.5439372751.631811.66181
100.5254169421.661511.69136
110.5089640251.688041.71749
120.4941998961.711961.74103
130.4808389341.733691.76239
140.4686606281.753571.78177
150.4574913571.771861.79946

Table 3.

Limitations

The bounds for k≥6k \ge6 are computed at h=3h = 3, the first rung of the ladder. At k=3k = 3 the ladder reads 0.764971 (h=2h = 2), 0.754807 (h=3h = 3), 0.747886 (h=4h = 4); at k=4k = 4, 0.696850 (h=3h = 3) and 0.689064 (h=4h = 4); at k=5k = 5, 0.653114 (h=3h = 3) and 0.645033 (h=4h = 4). Each further rung is worth roughly 0.007–0.008. We did not reach h=4h = 4 for k≥6k \ge6: the number of relative forms per state at h=4h = 4 is 81, 414, 1895, 7740, 28 149, 91 226, 264 699, 693 480 for m=0,…,7m = 0, \ldots, 7, and with some 10410^4 states this puts k=6k = 6 at about 4⋅1084 \cdot10^8 evaluations of δ\delta and k=7k = 7 at about 2⋅1092 \cdot10^9. These are not bounds of the method, only of the hardware used here; anyone with more compute will improve every line of the table.

For k=2k = 2 we reproduce [6] and add nothing: his h=8h = 8 machine has 6.4 million accepting states and gives γ2≤0.826280\gamma_2 \le0.826280.

Code

A single self-contained script, VERIF_CS.py, rebuilds the machine from scratch, self-tests against Table II of [6], and re-verifies Az0v≤λvA_{z_0}v \le\lambda v in exact rational arithmetic. It shares no code with the program that produced the bounds. As distributed it covers twelve of the thirteen lines of the table — the ten lines at h=3h = 3, together with k=3k = 3 and k=4k = 4 at h=4h = 4 — in a few minutes, and reproduces each of them to the last digit printed here. The thirteenth line, k=5k = 5 at h=4h = 4, has 11 093 states and some 7⋅1067 \cdot10^6 matrix entries and does not fit in a single short session; it was re-verified with the script’s own routines in a checkpointed run of about a quarter of an hour, which reconstructs the same automaton (11 093 states, 7 053 339 entries) and the same certificate. All thirteen lines have thus been reproduced, to the last digit printed here, along a second code path. We note the limit of this independence in any case: the two programs were written by the same author from the same reading of [6 Fig. 7], so they are independent as code paths, not as readings. The script is attached to this deposit as anc/VERIF_CS.py (Python 3 and numpy, no argument); the line k=5k = 5, h=4h = 4 is obtained by uncommenting one line.

Note added, 31 October 2026

This note was circulated in the version above on 20 and 21 September 2026. On 25 October 2026, L. Jack made public a repository [8] with upper bounds for 3≤k≤153 \le k \le15 obtained from the same machine of Lueker. For k=3,4k = 3, 4 (h≤4h \le4) and k=6,…,15k = 6, \ldots, 15 (h=3h = 3) it reports the same numbers of states and the same bounds to six decimals as the present note, and for k=5k = 5, h=3h = 3 the bound 0.653115, which agrees with the value 0.653114 of § 8 up to the rounding of the last digit: an independent confirmation of these computations. It also reports γ3<0.737495\gamma_3 < 0.737495 (h=7h = 7) and γ4<0.679701\gamma_4 < 0.679701 (h=6h = 6), which improve the values of the present note for k=3,4k = 3, 4. For k=5k = 5 it stops at h=3h = 3; to our knowledge the bound γ5≤0.645033\gamma_5 \le0.645033 (h=4h = 4) above is the best published one, and for 6≤k≤156 \le k \le15 the two sets of values coincide.

Acknowledgements

I thank Professor Marcos Kiwi for two prompt replies, and in particular for confirming that Section 3 of [6] had been neither implemented nor considered for k≥3k \ge3, and that no obstruction was known to him. The computations and the drafting of this note were carried out with the assistance of an AI system (Claude, Anthropic); every statement attributed to the literature has been checked against the primary source cited, and every numerical claim is backed by the certificates of § 6.

References

  1. [1]V. Chvátal and D. Sankoff, Longest common subsequences of two random sequences, J. Appl. Probab. 12 (1975), 306–315.
  2. [2]V. Dančík, Expected length of longest common subsequences, Ph.D. dissertation, Department of Computer Science, University of Warwick, 1994.
  3. [3]V. Dančík and M. Paterson, Upper bounds for the expected length of a longest common subsequence of two binary sequences, Random Structures Algorithms 6 (1995), no. 4, 449–458.
  4. [4]M. Kiwi, M. Loebl and J. Matoušek, Expected length of the longest common subsequence for large alphabets, Adv. Math. 197 (2005), no. 2, 480–498.
  5. [5]M. Kiwi and J. Soto, On a speculated relation between Chvátal–Sankoff constants of several sequences, Combin. Probab. Comput. 18 (2009), no. 4, 517–532.
  6. [6]G. S. Lueker, Improved bounds on the average length of longest common subsequences, J. ACM 56 (2009), no. 3, Article 17, 38 pp.
  7. [7]M. Rosenfeld, Upper bounds on the average edit distance between two random strings, arXiv:2407.18113 (2024).arxiv.org/abs/2407.18113
  8. [8]L. Jack, Improved upper bounds on the Chvátal–Sankoff constants for alphabets of size 3 to 15, GitHub repository leandrejack-afk/chvatal–sankoff-bound, version ipl–2026, 25 October 2026.

Paper details

vlnc:W_9ctuca55
v1 · latestHistory (1)

published · Fresh — published within the last 30 days

Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

CC BY 4.0

Original source

  • Mathematics

Anthropic Claude Opus · View statement →

Looking for related papers…
Contents