Manuscript Offprint
arXiv:2609.04122Synchronization Strings over the Optimal Alphabet
Abstract
Synchronization strings attach deterministic position labels to a stream that survive insertions and deletions. Haeupler and Shahrasbi introduced these objects, and subsequent work proved that four symbols suffice for some fixed parameter , whereas two symbols cannot support arbitrarily long synchronization strings. We resolve the remaining ternary case: every length admits a ternary 2001/2002-synchronization string. Thus three is the exact minimum constant alphabet size. A computer-assisted refinement based on a larger 54-uniform family yields ternary -synchronization strings for every .
The previous four-symbol construction uses a ternary square-free backbone to exclude short repetitions and a fourth symbol to carry long-range synchronization marks. Our main technical contribution is a local-entropy transfer theorem: every square-free block-local source with positive conditional min-entropy supports synchronization strings with a fixed gap. We instantiate this theorem using occurrence-wise branching in a Brinkhuis family. Every outcome remains ternary and square-free, while every long interval retains linear conditional min-entropy after all choices outside it are exposed. A deletion-ball estimate converts this entropy into anti-concentration for high longest common subsequences, and an asymmetric Lovász Local Lemma enforces all interval constraints simultaneously. The same framework also yields exponentially many valid words, a Las Vegas polynomial-time construction, synchronization circles, and synchronization within a class of extremal square-free words.
1 Introduction
Synchronization strings restore coordinates after insertions and deletions by attaching a deterministic label to each position. Four labels were known to suffice for a fixed synchronization gap, and two were known not to suffice; whether three labels suffice was left open. We prove that they do.
The problem joins two themes: coding against insertions and deletions, where one needs a low-cost index that survives a loss of alignment, and pattern avoidance, where three symbols are exactly what is needed to exclude repeated blocks.
Synchronization strings were introduced by Haeupler and Shahrasbi as a deterministic coordinate system for this setting [HS17]. A fixed label is attached to each transmitted position; even after insertions and deletions, the surviving labels allow the receiver to recover approximate positions and reduce synchronization errors to erasures and corruptions. This reusable indexing layer has since been used in coding, document exchange, channel simulation, interactive communication, and edit-distance indexing [HS18, Hae19, HSV18, HRS19, HS21].
The combinatorial definition is local. For words and , let be their insertion–deletion distance.
Definition 1.1 (Synchronization string). For , a word is an -synchronization string if, for every ,
The number is the synchronization gap.
The central requirement is that the alphabet be fixed independently of the length of .
Why the interval condition restores coordinates. The inequality in definition 1.1 rules out the basic ambiguity created by a position shift. Suppose a received subsequence could plausibly be aligned both to positions just before a boundary and to positions just after it. Those two explanations would exhibit a long common subsequence between the adjacent label intervals and . The synchronization inequality says that every such cross-boundary match must discard a fixed fraction of the two intervals. Consequently, a decoder can charge a substantial amount of alignment loss to each persistent displacement and convert insertions and deletions into a controlled number of ordinary symbol errors or erasures. Our focus is the combinatorial object that makes these reductions possible; the cited synchronization-string literature develops the corresponding decoders and coding applications.
The inequality must hold simultaneously at every boundary and at every scale, from single symbols to intervals spanning a constant fraction of the word. A construction must therefore combine short-range pattern avoidance with long-range separation on the same alphabet.
1.2 Pattern avoidance and the extremal alphabet question
A square is a nonempty word repeated twice consecutively, ; for example, 012012 is the square of 012. A word is square-free if it contains no such factor. Synchronization strings with must be square-free, since the two copies of a square have edit distance zero. Thue's classical theorem shows that arbitrarily long square-free words exist over three symbols, already suggesting why three is the natural lower limit.
Haeupler and Shahrasbi established the first constant-alphabet synchronization strings. Cheng, Haeupler, Li, Shahrasbi, and Wu subsequently studied the extremal alphabet question: they proved that four symbols suffice for some fixed , whereas binary alphabets cannot support arbitrarily long synchronization strings [CHL19, Section 1.3.2 and Theorem 6.4]. Thus the minimum alphabet was known to be either three or four. The subsequent survey still listed the ternary case as open [HS21, Section 3.1]; the later four-symbol result discussed below did not change this.
The distinction matters because the index alphabet is side information attached to every transmitted symbol. In a packed representation, moving from four labels to three reduces the idealized label cost from 2 to bits per position. The total coding rate also depends on the synchronization parameter and the outer code; here we determine the alphabet threshold. Combinatorially, the question is whether the first alphabet that escapes the local repetition obstruction already supports the stronger linear separation required at every scale.
Square-freeness alone is nevertheless too weak. Let and be adjacent words of the same length , and let denote the length of their longest common subsequence. Square-freeness says only that , and hence . This loss of one symbol can occur even in the square-free word 0102012021020120, whose two displayed length-eight halves have a common subsequence of length seven. Thus excluding does not exclude adjacent blocks that become identical after one deletion from each side. The relative deficit vanishes with the interval length. By contrast, synchronization requires a fixed linear deficit .
The remaining extremal question is therefore:
Does the ternary alphabet support synchronization strings of every length for one fixed parameter ?
An affirmative answer would show that the first alphabet large enough to avoid exact repetitions is already large enough to prevent approximate repetitions at every scale. A negative answer would exhibit a genuine gap between these two notions of pattern avoidance.
Our main theorem gives an affirmative answer.
1.3 Our results
Theorem 1.2 (Ternary synchronization strings and optimality). For every integer , there is a ternary -synchronization string of length . Consequently, three is the minimum constant alphabet size supporting synchronization strings of all lengths for some fixed .
The proof uses the corrected 18-uniform Brinkhuis family, comprising two images for each of the three outer letters. Square-freeness controls bounded scales, while the occurrence-wise choices separate long intervals. The binary impossibility theorem of Cheng et al. [CHL19, Section 1.3.2] then makes the alphabet size optimal.
Comparison with the four-symbol construction. The construction of Cheng, Haeupler, Li, Shahrasbi, and Wu separates the two scales by using two distinct resources [CHL19, Section 6.2]:
a ternary square-free backbone rules out exact repetitions and handles the bounded scales. Occurrences of one backbone letter are then split into two output symbols according to a binary weak synchronization string; this adds a fourth symbol and stores the long-range marking independently of the backbone. Our construction remains ternary throughout. Instead, it chooses independently among several square-free-preserving images at each occurrence of an outer letter. After conditioning outside one interval, the remaining choices give anti-concentration against a high-LCS match on the adjacent interval. Thus the issue resolved here is the one left open by the four-symbol method: maintaining ternary square-freeness while simultaneously obtaining a linear edit-distance gap at every scale. Cheng et al. also show that iterating a fixed uniform morphism cannot by itself generate arbitrarily long synchronization strings, so the occurrence-wise variation is essential to how our construction escapes that obstruction.
Why the standard ternary approaches fall short. Randomness and square-free morphisms provide opposite halves of what is needed. An independently random ternary word has long-range anti-concentration, but with overwhelming probability it contains short squares. Conditioning on global square-freeness destroys the product structure used by the usual interval-by-interval local-lemma analysis.
A fixed square-free word, or an iterate of a fixed square-free morphism, guarantees local pattern avoidance but supplies no random choices with which to rule out approximate copies having LCS . Fixed uniform morphisms also face the obstruction proved in the four-symbol work, while encoding an external binary mark by changing ternary letters need not preserve square-freeness.
Brinkhuis families combine the two properties. After the outer word is fixed they expose independent local choices, every combination of choices preserves ternary square-freeness, and a long interval contains linearly many unrevealed choices. The corrected 18-uniform family originating with Ekhad and Zeilberger permits two independent images at every outer-letter occurrence while preserving square-freeness for every choice vector [EZ98, EZ01, Gri01, SDL16]. These choices were introduced for counting square-free words. We condition on the choices outside an interval and use the choices that remain inside as local randomness. Comparing their conditional min-entropy with an LCS deletion ball turns the branching substitution into a synchronization mechanism.
Every choice vector gives a square-free word. After the choices outside one interval are fixed, linearly many 's remain free inside it; these are the long-range synchronization resource.
Figure 1: The resource used by the construction. The output alphabet is always ternary: long-range separation is encoded by branching within the square-free language rather than by a fourth marking symbol.
A local-entropy transfer principle. The long-interval argument uses only two quantitative resources: a bounded spatial scale for the independent choices and a positive conditional min-entropy rate inside every interval. We separate these assumptions from the Brinkhuis construction. Informally, a block-local source is generated by independent bounded-length blocks and retains a linear min-entropy lower bound inside every interval, even after the other blocks are fixed.
Theorem 1.3 (Local-entropy transfer, informal). Every square-free block-local source with fixed block size and positive interval conditional min-entropy rate contains a synchronization string for one fixed parameter . Quantitatively, the achievable LCS deficit is governed by comparing the source entropy rate with , where is binary entropy. This is an explicit upper bound on the exponential rate of a high-LCS deletion ball; the theorem adds finite-scale and local-dependency terms.
The formal transfer theorem and its scalar sufficient conditions appear in theorem 5.2. A uniform occurrence-wise square-free substitution with block length and choices supplies entropy rate and boundary loss , so the earlier substitution criterion follows immediately. For the explicit ternary family, the same analysis also gives exponentially many successful choices and a randomized construction.
A second source: extremal square-free words. A square-free word is extremal if inserting any letter at any position creates a square. Extremality makes the word maximally fragile under one insertion, whereas synchronization asks adjacent intervals to remain far apart under insertions and deletions. The next result shows that these two properties are compatible.
Theorem 1.4 (Extremal square-free synchronization strings). For every integer , there is a ternary word of length that is simultaneously extremal square-free and a 200001/200002-synchronization string.
The input here is the Thue-digraph substitution of Mol and Rampersad, whose two occurrence-wise images have lengths 41 and 52. Pairing consecutive occurrences as or exposes one binary choice on a fixed length-93 block while preserving extremality. A bounded-imbalance length decomposition reaches every , and the transfer theorem converts the resulting local entropy into synchronization. This is an unequal-length application of the transfer principle, distinct from the uniform Brinkhuis family used in the alphabet theorem.
A quantitative refinement.
Theorem 1.5 (Computer-assisted quantitative strengthening). For every integer , there exists a word such that, for all ,
Consequently, for every , ternary -synchronization strings exist for every length. In particular, one may take .
By corollary D.8, the same inequality holds for an infinite ternary word. The 54-uniform family, together with finite checks of the bounded deletion shells, gives this bound.
The transparent 2001/2002 theorem is independent of these computations. For the quantitative refinement, the 54/952 codebook and exact-arithmetic verifiers for the finite shell checks and local-lemma calculations are available in the accompanying GitHub repository.
The value 227/228 ≈ 0.995614 improves on the recent explicit four-symbol value 0.999606 from [BDG⁺26, Corollary 1.10]. The direct predecessor for the alphabet question is the qualitative four-symbol theorem of Cheng et al. [CHL⁺19].
In definition 1.1, a smaller value of is stronger because the guaranteed normalized edit distance is . The six-codeword 2001/2002 bound settles the alphabet question using the six displayed codewords. The 227/228 bound uses more branching and finite bounded-scale verification to obtain a larger explicit gap. The threshold is sharp; optimizing the synchronization parameter remains open.
Synchronization circles. A synchronization circle must remain a synchronization string after every cyclic rotation. Cheng et al. [CHL⁺19, Theorem 3.4] constructed such circles of every length over alphabets of size by joining two synchronization strings over disjoint alphabets. We address the extremal alphabet question for unbounded circle lengths. The occurrence-wise argument extends to this setting: a circularly square-free outer word produces a circularly square-free output, and the same conditional-entropy local lemma controls the long cyclic arcs. Since ternary circularly square-free words exist at every length at least 18, we obtain a ternary 2001/2002-synchronization circle of every length 18N with . Hence three is also the exact minimum alphabet size supporting synchronization circles of unbounded length. Appendix C strengthens this by a computer-assisted argument: every length admits a ternary 5201/5202-synchronization circle.
Abundance and algorithmic construction.
Theorem 1.6 (Computer-assisted quantitative consequences). For every , at least words in satisfy Equation (2). Moreover, a word satisfying Equation (2) can be generated by a Las Vegas randomized algorithm in expected time and space .
The counting and randomized assertions are proved as corollary 7.2 and theorem 7.4 in Section 7. The product form of the local lemma yields the count, and Moser–Tardos resampling gives the algorithm.
1.4 Proof overview
The proof separates bounded scales from long scales. Ternary square-free words exclude exact adjacent copies, which is enough at every bounded scale, but may leave only one unmatched symbol. Independent random ternary words separate long intervals, but almost surely contain short squares. A Brinkhuis family combines the two resources: every outcome is square-free, while occurrence-wise choices provide fresh randomness on each long interval. A final deterministic reduction passes from equal adjacent blocks to intervals of unequal lengths.
We first prove theorem 1.2 from six explicitly displayed codewords. We then refine the same argument using the larger 54-uniform family and a finite analysis of the remaining bounded scales.
Warm-up: why equal adjacent blocks are the right events. Suppose and are adjacent intervals of the same length . The standard identity between edit distance and longest common subsequence gives . Thus a fixed relative LCS deficit is exactly a fixed normalized edit-distance gap for equal blocks. It is therefore enough at first to rule out events of the form
There are quadratically many such events and their variable sets overlap heavily, so a union bound is not adequate. The local lemma will be used only after we obtain an exponentially small probability for each event and keep track of its scale.
Equal blocks also expose the role of square-freeness. If , then is a square. Hence in a square-free word , and therefore . For , this is already the relative deficit . Square-freeness therefore settles all scales up to a cutoff without probability or enumeration. What remains is to replace the vanishing deficit by a constant deficit when .
The random object lives inside the square-free language. Fix a ternary square-free outer word . For each occurrence , choose a bit independently and replace that occurrence by the length-18 word from the corrected Brinkhuis family. The resulting word is . The Brinkhuis guarantee holds for every outer square-free word and every occurrence-wise choice vector. Consequently the support of our probability space consists entirely of ternary square-free words. We may use the choices to attack long approximate repetitions without ever reintroducing an exact short repetition.
This is the crucial difference from a fixed morphism. A fixed morphism assigns one image to each outer letter, so after is chosen the output has no local entropy. Here two occurrences of the same outer letter may use different images. The labels are not additional output symbols: they select among ternary blocks and are visible only through the resulting ternary word. In this sense the construction stores synchronization information in the branching of the square-free language itself; see Figure 1.
Conditioning around one bad interval. Fix the event in Equation (3), and write its two intervals as and . Reveal every except those whose complete macroblocks lie inside . Then and the boundary blocks are fixed, while every unrevealed macroblock lies entirely inside . An interval of length contains at least complete macroblocks, so that many independent fair bits remain.
The two images available for a fixed outer letter are distinct. Once the macroblock boundaries and are fixed, different remaining choice vectors therefore give different values of the corresponding portion of . Conditioned on everything already revealed, every exact candidate value of has probability at most
This is a local min-entropy statement: it remains valid no matter how the word outside X has been fixed. That robustness under conditioning is what allows overlapping interval events to be handled later.
Counting the competitors with high LCS. We next ask how many length- ternary words can have LCS more than with the now fixed word . If the LCS deficit is , one may specify such a word by choosing the positions deleted from , the positions deleted from the candidate , and the ternary symbols placed at the latter positions. This standard deletion-ball encoding gives the upper bound
Multiplying Equation (5) by the point-mass bound Equation (4) shows that the fixed adjacent pair is bad with probability at most for an absolute once is sufficiently small. For the six-codeword family we take ; elementary estimates verify the required numerical inequality. Its content is simple: the deletion ball has entropy rate tending to zero with , whereas the occurrence-wise Brinkhuis choices supply a fixed positive entropy rate.
Ignoring the two boundary macroblocks, the six-codeword family supplies nats of choice entropy per output character. The leading entropy term in the deletion-ball bound is , where ; it is about 0.0169 at . This strict entropy margin drives the long-scale argument. The formal proof also retains the boundary losses, integer roundings, and local-lemma charge.
Why all scales can be enforced simultaneously. The interval events are not independent, but their dependencies are geometric. An event at scale is determined only by macroblock choices meeting a character interval of length . At another scale , only starting positions can overlap it. Assigning an exponentially decaying charge to a scale- event makes the total charge of all its neighbors summable over .
An asymmetric Lovázs Local Lemma argument in the variable model formalizes this calculation. The proof uses the actual scale of each neighbor rather than bounding all events by the smallest probability. The exponential event tail pays for the linear number of positions at every scale, and the product of the remaining local-lemma factors stays large enough. We conclude that there is one occurrence-wise choice vector for which no long event Equation (3) occurs. Together with square-freeness on , this gives the equal-block LCS gap at every scale.
From equal blocks to the synchronization definition. The definition involves arbitrary adjacent intervals, whose lengths need not be equal. Let the shorter length be and let the length imbalance be . The equal-block estimate on the length- pieces adjacent to the common boundary gives an edit-distance lower bound after paying for the unmatched excess; the difference in lengths independently gives the lower bound . Therefore
Dividing by and considering whether is smaller or larger than gives normalized edit distance at least . With this is 1/2001. Taking the slightly smaller strict gap 1/2002 proves that every length has a ternary 2001/2002-synchronization string. Combining this with the known binary obstruction closes the alphabet question.
The entropy-deletion-ball interface. Abstracting the preceding calculation gives the local-entropy transfer theorem. Its main condition is that the exponential rate of a high-LCS deletion ball be smaller than the interval conditional min-entropy rate. Lower-order terms account for block boundaries and overlapping dependencies. The theorem therefore applies whenever a square-free source supplies the required local entropy, regardless of the combinatorial origin of that source.
The quantitative strengthening. For the stronger constant, we use the length-54 family with 952 choices per outer-letter occurrence. Its larger conditional entropy permits a larger long-scale LCS deficit. At bounded scales, however, square-freeness by itself certifies only the first deletion shell. We therefore verify the remaining one- and two-deletion obstructions for the finite codebook and analyze unequal adjacent intervals directly, avoiding the loss in the generic equal-to-unequal conversion. This yields the non-strict normalized edit-distance lower bound 1/227, and hence every parameter ; in particular, one may take 227/228.
The quantitative argument is summarized in Section 6 and proved in Appendix D.
The cyclic extension. On a circularly square-free outer word, the same conditioning and scale-sensitive local lemma apply to cyclic arcs, giving the 18N-length circle result. To reach every sufficiently large length, Appendix C deletes one short factor from the uniform output, proves that every new square is confined to a bounded neighborhood of the resulting seam, and verifies the finitely many boundary configurations.
From the local lemma to abundance and an algorithm. The product form of the local lemma lower-bounds the measure of successful choice vectors; injectivity then converts this bound into exponentially many ternary words. The same bad events can be detected by LCS dynamic programming, and Moser-Tardos resamples the macroblocks of a violated event. The charge calculation bounds the expected number of resamplings, giving the Las Vegas polynomial-time construction.
1.5 Related work
Synchronization strings. Haeupler and Shahrasbi introduced synchronization strings for approaching the Singleton bound under insertions and deletions, and subsequent work developed explicit and locally decodable constructions and applications to channel simulation and indexing [HS17, HS18, HSV18, HRS19]. Cheng, Haeupler, Li, Shahrasbi, and Wu [CHL 19, Section 1.3.2 and Theorem 6.4] proved that four symbols suffice for some fixed , two symbols do not, and the ternary case was left open. Their prescribed-parameter bounds concern the different regime in which the alphabet grows as . Bhattacharya, Dey, Goldenberg, Habib, Haeupler, Karthik C. S., and Koucký [BDG 26, Corollary 1.10] obtained the explicit four-symbol value 0.999606 as a corollary of their Hamming-to-edit embedding construction. Since that construction is quaternary, the ternary extremal case remained open.
Pattern avoidance. Square-free words originate with Thue [Thu06]. Brinkhuis-type substitutions were developed to prove exponential abundance of ternary square-free words [Bri83, EZ98, EZ01, Gri01, SDL16]. We use the corrected occurrence-wise families from this literature, but reinterpret their choices as conditional anti-concentration rather than counting. Avoidance under LCS similarity was also studied by Camungol and Rampersad, who gave an existence bound for sufficiently large alphabets and computational bounds beginning at three symbols [CR16, Theorem 1 and Tables 1–2]. Grytczuk, Kordulewski, and Niewiadomski introduced extremal square-free words, and Mol and Rampersad determined their attainable ternary lengths using a multivalued Thue-digraph substitution [GKN20, MR21]. Our second application uses the occurrence-wise choices in that construction as a new block-local source.
Probabilistic tools. The asymmetric local lemma and the Moser-Tardos resampling theorem are used in their standard forms [EL75, MT10]. Beck's local-lemma construction of binary sequences with separated repeated intervals is conceptually related [Bec84], but it controls a different distance property. The small-alphabet construction of Cheng et al. [CHL 19, Sections 3–4] also combines a nonuniform random source, deletion counting, and the local lemma. The source condition here is different: bounded-range independent variables retain interval conditional min-entropy, and every outcome remains square-free. The local lemma therefore runs entirely inside the square-free support.
1.6 Organization
Section 2 reviews the standard distance and local-lemma tools, and Section 3 introduces the classical Brinkhuis input. Section 4 proves the alphabet theorem, and Section 5 proves the local-entropy transfer principle and its extremal and cyclic consequences. Section 6 presents the stronger explicit parameter, while abundance and the randomized construction appear in Section 7. The appendices contain the general transfer proof, the extremal square-free application, the all-length circle refinement, the quantitative argument, and the finite calculations used by the two computer-assisted statements.
2 Preliminaries
All logarithms are natural. A word has length , and for . Intervals are always nonempty unless stated otherwise.
2.1 Edit distance, common subsequences, and synchronization
The insertion–deletion distance is the minimum number of symbol insertions and deletions transforming into . The longest common subsequence length is denoted by .
We use the standard identity
It follows by deleting to a common subsequence and then inserting the missing symbols; see, for example, [CHL19, Definitions 2.2–2.3].
Definition 2.1 (Square-free word). A square is a nonempty word repeated twice consecutively, XX. A word is square-free if none of its factors is a square.
By definition 1.1, every synchronization string with is square-free. Both square-freeness and every fixed synchronization inequality are inherited by factors: adjacent intervals inside a factor are unchanged adjacent intervals of the original word. In particular, both properties are inherited by prefixes. The next lemma reduces the synchronization condition to an equal-length LCS gap.
Lemma 2.2 (From equal blocks to arbitrary intervals). Let . Suppose a word satisfies
for every available start and length . Then is an -synchronization string whenever . In particular, it has synchronization gap .
Proof. Let be arbitrary adjacent nonempty intervals, put and , and let and be respectively the length- suffix of and prefix of . These are adjacent equal-length intervals, so by Equations (6) and (7). Deleting the excess symbols from the longer interval and using the triangle inequality gives . The difference in lengths also gives ; hence
If , the right-hand side is at least . If , it is at least . Thus every adjacent pair has normalized edit distance at least . Any strictly smaller gap therefore satisfies definition 1.1; in particular, does because .
2.2 Local-lemma tools
Let be a finite family of mutually independent random variables, and let be a finite family of bad events. For each , let be a set of variables determining , and let consist of the events for which . We use the following standard forms of the local lemma and its algorithmic counterpart [EL75, MT10], including the product bound used later in the abundance argument.
Theorem 2.3 (Asymmetric Lovász Local Lemma). If numbers satisfy
Then
Theorem 2.4 (Moser-Tardos). Under the same hypotheses and Equation (8), the algorithm that repeatedly chooses any currently true event and resamples the variables in terminates almost surely. The expected number of times it resamples is at most .
3 The square-free source: Brinkhuis substitutions
Our construction starts from a classical square-free substitution in its occurrence-wise form: different occurrences of the same source letter may choose different images.
Definition 3.1 (Uniform Brinkhuis family). An -Brinkhuis -triple consists of three sets , each of size , such that for every ternary square-free word of length three and every choice , , , the concatenation is square-free.
This is the corrected length-three definition. The original two-block formulation was insufficient; the correction and the resulting occurrence-wise interpretation are due to the subsequent Brinkhuis literature [EZ01]; see also [Gri01, Definition 1] and [SDL16, Definition 1]. We use the following six length-18 words of Ekhad and Zeilberger:
Proposition 3.2 (Classical 18-uniform Brinkhuis family). The six words in Equation (10) form an 18-Brinkhuis 2-triple. More generally, if is any ternary square-free word and , then
is square-free. The map is injective.
Proof. The Brinkhuis assertion, including independent choices at different occurrences, is the corrected 18-uniform construction of Ekhad and Zeilberger and its standard generalized-Brinkhuis interpretation [EZ98, EZ01]; see also [Gri01, Definition 1 and the subsequent discussion] and [SDL16, Definition 1]. For injectivity, the two displayed images of each fixed outer letter are distinct. Since the macroblock boundaries and are fixed, the th macroblock determines .
For every there is a ternary square-free word of length ; for example, take a prefix of Thue's classical infinite word [Thu06]. For the rest of the explicit proof, fix such a word and take independently and uniformly from . Every outcome is square-free by proposition 3.2.
Conditional randomness from the family. The cited works use the occurrence-wise choices to count square-free words. Here they play another role. After conditioning outside a character interval, linearly many independent choices remain inside the interval. The next section turns this conditional entropy into an LCS gap and enforces the gaps simultaneously at every scale.
4 Ternary synchronization strings
We now prove the alphabet theorem from the six codewords in Equation (10). The classical inputs are the Brinkhuis property in proposition 3.2 and the standard local-lemma tools from Section 2.
Theorem 4.1 (The six-codeword construction). For every integer , there is a ternary -synchronization string of length ; equivalently, one may take synchronization gap .
Throughout this section, set and . Fix an outer square-free word and use the random output from Equation (11). The argument compares two exponential quantities at every long scale: the conditional point mass supplied by independent macroblock choices and the volume of an LCS deletion ball. Once the former dominates the latter, a scale-sensitive local-lemma calculation removes all long violations; square-freeness covers the complementary short scales.
The deletion-ball estimate below is the standard LCS-witness count used in earlier probabilistic synchronization-string constructions [HS17, CHL19]; its short proof keeps track of the exponent needed here. The new input is lemma 4.5, which gives a point-mass bound after arbitrary conditioning outside one interval.
4.1 A deletion-ball bound
Lemma 4.2 (Standard high-LCS deletion-ball bound). Fix , where , and let . Then
Proof. If , fix one witnessing common subsequence. It is described by the positions deleted from , the positions deleted from , and the arbitrary symbols in the remaining positions of . There are at most such descriptions. A word may have several descriptions, which only makes this an upper bound. Finally, means ; summing over these integers proves Equation (12).
Lemma 4.3 (Explicit ternary volume). For the parameters fixed above, every and every satisfy
Proof. For , lemma E.7(i)–(ii) gives , while the summand in Equation (12) equals 1. Since , there are at most admissible integers by lemma E.7(iii), and . Hence the right-hand side of Equation (12) is at most , which is strictly smaller than by lemma E.8.
4.2 The probability of one bad interval
For an available character start and an integer , define
Lemma 4.4 (Whole macroblocks). Every character interval of length contains at least complete Brinkhuis macroblocks.
Proof. The interval intersects at most two macroblocks without containing them: one at each endpoint. If it contains complete macroblocks, its characters are covered by these blocks together with at most two further length-18 blocks. Hence , or .
Lemma 4.5 (Conditional point mass). Write the two length- intervals in Equation (14) as . There are choice variables such that, after conditioning on all other choices, is fixed and every exact value of has conditional probability at most .
Proof. Take the choice variables of all complete macroblocks contained in and condition on every other . None of the unconditioned macroblocks meets , so this conditioning fixes , including the choice of a macroblock that might cross the boundary between and . The number of unconditioned variables satisfies the bound in lemma 4.4.
Each unconditioned variable occupies a known full macroblock inside . For its fixed outer symbol, the two possible codewords in Equation (10) are distinct. Therefore an exact value of determines all unconditioned bits. Those bits are independent and uniform, so any one value of has conditional probability at most .
Lemma 4.6 (Exponential event tail). For every event in Equation (14),
Proof. Let be the sigma-field generated by the choices conditioned on in lemma 4.5, and fix an atom of . For the resulting fixed value of , lemma 4.3 bounds the number of bad values of by . Each has conditional probability at most . Using gives
This estimate holds for every atom , so the law of total probability gives the same unconditional bound. The full factor 4 is absorbed uniformly for every by lemma E.9, which turns Equation (16) into Equation (15).
4.3 Eliminating every long bad event
An event is measurable with respect to the choice variables of the length-18 macroblocks intersecting its character support . Join two events when these variable sets intersect. This is the variable-dependency graph used in theorem 2.3. Events whose declared variable sets are disjoint are functions of disjoint families of independent occurrence choices, so this graph has the required dependency property.
Lemma 4.7 (Neighbors at one scale). For a fixed event of length , the number of neighboring events of length is at most .
Proof. Let the fixed support start at and the other support start at . If their variable sets share a macroblock, then the two character supports are separated by fewer than 18 characters. Consequently, , an open interval containing at most integer starts. Counting all of them, including starts that would place the event outside the word or reproduce the fixed event itself, only overestimates the number of neighbors. Because , we have , proving the stated second inequality.
Assign the local-lemma charge
Lemma 4.8 (Neighbor charge). For every event ,
Proof. The actual neighboring events have integral lengths . By lemma 4.7 and Equation (17), adding the nonnegative term at bounds the sum by . The geometric-series evaluation and strict numerical comparison in lemma E.11 show that this quantity is smaller than .
Proposition 4.9 (Long equal blocks). There exists a choice vector for which no event with occurs.
Proof. Every charge in Equation (17) is smaller than . Applying lemma E.12 and then Equation (18) gives . Therefore,
where the first inequality is lemma 4.6 and the middle one uses from lemma E.13. Thus every event satisfies the asymmetric criterion Equation (8). The probability space and event family are finite for the fixed outer word, so theorem 2.3 supplies an outcome avoiding all long bad events.
4.4 All scales and all adjacent intervals
Proposition 4.10 (Uniform equal-length gap). For every output length , there is a ternary word such that every available adjacent equal-length pair of common length satisfies
Proof. Choose an outer word of length and use the outcome from proposition 4.9. For , the absence of the strict bad event Equation (14) gives Equation (19). For , proposition 3.2 makes the full output square-free. Thus , because equality would create the square . A common subsequence of length would use every position of both words and force equality, so , where the second inequality uses . This includes the endpoint . The full output has length ; take its length- prefix. Every adjacent equal-length pair inside that prefix is the identical pair inside the full output, so Equation (19) is inherited directly.
Proof of theorem 4.1. Apply lemma 2.2 to the word in proposition 4.10. Its normalized edit distance between arbitrary adjacent intervals is at least . Thus the strict synchronization inequality holds with gap , or equivalently with parameter .
Proof of theorem 1.2. The existence assertion is theorem 4.1. The binary lower bound in [CHL 19, Section 1.3.2] proves that no fixed permits arbitrarily long binary synchronization strings. Hence the ternary alphabet is optimal.
5 From local entropy to synchronization
The argument uses two properties of its random source: every outcome is square-free, and every interval retains conditional min-entropy after the outside variables are fixed. Isolating these properties gives an explicit entropy-to-synchronization transfer theorem. Uniform occurrence-wise substitutions are one way to produce the required source.
Let denote binary entropy, and define the deletion-ball entropy rate
Definition 5.1 (Block-local square-free source). Let be an alphabet of size . An -block-local square-free source is a random word together with a partition of its positions into consecutive blocks of length at most and one independent random variable per block, such that the contents of a block depend only on its own variable, every word in the support of is square-free, and the following conditional point-mass bound holds.
For every character interval I of length , leave unconditioned the variables of the blocks contained completely in I and condition on all remaining variables. Under every conditioning of positive probability,
Here is the local entropy rate and is a boundary loss.
For integers and real numbers a > 0, define the dependency tail
The next theorem makes the transfer quantitative. Its conditions are one-dimensional numerical inequalities independent of the length M.
Theorem 5.2 (Local-entropy transfer). Let be an -block-local square-free source over an alphabet of size . Fix and let . Suppose that there is an such that
Then the support of W contains a word S such that
for every available and . Consequently, , and every factor of , is an -synchronization string for every .
The condition in theorem 5.2 has a direct interpretation. The source supplies conditional entropy at rate , whereas is the exponential growth rate of the relevant deletion balls. The remaining terms are finite-scale losses: accounts for the boundary blocks, and pays for dependencies among overlapping intervals. The proof, together with an explicit evaluation of , appears in Appendix A.
Definition 5.3 (Uniform occurrence-wise square-free substitution). Let be finite alphabets, let , and let be positive integers. An -uniform occurrence-wise substitution consists of a language containing a word of every positive length and, for each , a family of distinct codewords. It is square-free if, for every and every occurrence-wise choice vector , the concatenation is square-free.
Corollary 5.4 (A general substitution criterion). Every substitution in definition 5.3 with generates -ary synchronization strings of every length for one fixed parameter . More precisely, for every sufficiently small and every requested length, there is an output factor satisfying Equation (24); hence every with is valid.
Proof. For a requested length , fix an outer word of length and choose its occurrence variables independently and uniformly from . The resulting -character word is a block-local source with
Indeed, an interval of length contains at least complete macroblocks, and their distinct images give conditional point mass at most . Every outcome is square-free by definition.
Choose . As , one has , , and . Moreover, and the geometric tail in Equation (22) tends to zero. Thus all conditions in Equation (23) hold for every sufficiently small . Apply theorem 5.2 and take a prefix of the required length.
The six-codeword proof is a direct instance of the transfer theorem.
Proposition 5.5 (The six-codeword instance). The local-entropy transfer theorem applies to the 18-uniform Brinkhuis source with and . Consequently, this source contains words with normalized edit-distance gap at least 1/2001. In particular, it yields the 2001/2002-synchronization strings used in theorem 4.1.
Proof. Here , , , , and . The estimates in lemmas E.1, E.8 and E.11 give
For the third bound, take in lemma E.11 and discard its nonnegative term. Moreover, and . Finally,
where the middle inequality follows from lemma E.13. Thus Equation (23) holds, and theorem 5.2 gives normalized edit-distance gap 1/2001. Taking the smaller strict gap 1/2002 gives synchronization parameter 2001/2002.
The larger 54-uniform Brinkhuis family provides substantially more local entropy and supports a stronger quantitative result. Its bounded scales require an additional finite verification; carrying this out in Section D gives normalized edit-distance gap 1/227, and hence synchronization parameter 227/228.
5.1 An extremal square-free consequence
The transfer theorem also applies to a substitution developed for a different extremal problem. A square-free word is extremal if inserting any letter at any position creates a square. Grytczuk, Kordulewski, and Niewiadomski introduced these words, and Mol and Rampersad constructed them through occurrence-wise choices on a twelve-vertex Thue digraph [GKN20, MR21].
Theorem 5.6 (Extremal square-free synchronization strings). For every integer , there is a ternary word of length that is simultaneously extremal square-free and a 200001/200002-synchronization string.
The Mol–Rampersad substitution offers images and of lengths 41 and 52 at each occurrence . For two consecutive occurrences , restrict the choices to and . These two words are distinct and both have length 93, so every pair exposes one independent bit with fixed character boundaries. A balanced representation with leaves only a constant number of unpaired images. Consequently, an interval of length contains complete random blocks, while every outcome remains extremal square-free. Applying theorem 5.2 with gives the stated parameter. The complete length-balancing, conditional-entropy, and numerical arguments appear in Appendix B.
5.2 A cyclic consequence
The same mechanism also applies when no distinguished starting position is available. Following [CHL19, Definition 2.6], a word is an -synchronization circle if each of its cyclic rotations is an -synchronization string. We call a word circularly square-free if each cyclic rotation is square-free.
Lemma 5.7 (Circular preservation). Let a substitution satisfy definition 5.3, and suppose that contains every square-free word over . If is circularly square-free and has length at least two, then every occurrence-wise substitution output of is circularly square-free.
Proof. Fix the codeword chosen at every occurrence and write the output as . Consider a character rotation of whose cut lies inside . This rotation is a factor of the substitution output of , where the indices are cyclic and the repeated final occurrence uses the same codeword .
It remains to check that is square-free. Every proper factor of has length at most and is a factor of a rotation of . If the whole word were a square of length , then its first and last letters, both equal to , would force positions and of to be equal: position agrees with the last position and position with the first. These adjacent positions lie in the displayed rotation of , contradicting circular square-freeness. Thus is square-free. The substitution guarantee makes its output square-free, and so the chosen rotation of , being a factor, is square-free as well.
Theorem 5.8 (Cyclic substitution criterion). Suppose a substitution in definition 5.3 has and its outer language contains every square-free word over . There is a fixed such that every circularly square-free outer word of length at least two has an occurrence-wise output that is an -synchronization circle.
Proof. Put and , and choose fixed for which the conditions of theorem 5.2 hold. Such a choice exists by the limiting argument in the proof of corollary 5.4. Let , put , and view the independent macroblock choices on a circle of circumference . For every cyclic start and , let be the event that the two consecutive length- arcs at have LCS greater than .
A cyclic arc of length contains at least complete macroblocks. Conditioning on every choice except those complete blocks in the first arc fixes the second arc and gives the same conditional point-mass bound as in lemma A.2. Hence the deletion-ball argument in lemma A.3 gives the identical event probability bound.
Declare an event to depend on every macroblock meeting its two-arc support. For fixed lengths and , the number of cyclic starts of a neighboring length- event is at most . Thus the cyclic dependency neighborhood is no larger than the linear one in lemma A.4. The same charges and the same local-lemma calculation avoid every event with .
By lemma 5.7, every output is circularly square-free. Consequently, at the two cyclic arcs are unequal and have LCS at most . We have therefore enforced the equal-length inequality at every cyclic start and every . After cutting the circle at any character position, these are exactly all equal-length pairs needed in the resulting length- word. The proof of lemma 2.2 now gives non-strict normalized edit distance at least in every rotation. Any fixed strictly smaller gap works, proving the claim.
Corollary 5.9 (Ternary synchronization circles). For every integer , there is a ternary 2001/2002-synchronization circle of length 18N. Hence three is the minimum constant alphabet size supporting synchronization circles of unbounded length for some fixed parameter below one.
Proof. Circularly square-free ternary words exist at every length [Shu10, Theorem 1]. Apply theorem 5.8 to the 18-uniform family. The explicit calculation in Section 4 uses ; its event bounds and dependency estimates are unchanged on the circle, as the preceding proof shows. Thus every rotation has non-strict normalized edit-distance gap 1/2001, and the strictly smaller gap 1/2002 gives parameter 2001/2002. Finally, every cut of a binary synchronization circle is a binary synchronization string, so the binary obstruction of [CHL19, Section 1.3.2] rules out unbounded length over two symbols.
6 A stronger explicit parameter
The six-codeword argument resolves the extremal alphabet question. Applying the same method to the 54-uniform Brinkhuis family gives a stronger numerical parameter. Specifically, theorem 1.5 gives ternary -synchronization strings of every finite length and one infinite such string for every ; in particular, one may take .
The mechanism is the same conditional-entropy argument, with three quantitative refinements. First, the 54-uniform family supplies 952 choices per outer letter instead of two. Second, near the analytic cutoff we retain the exact number of visible choices and exclude the few remaining one-and two-deletion obstructions by finite codebook checks. Third, we place unequal adjacent intervals directly in the local lemma, avoiding the loss in the generic equal-to-unequal conversion. These steps give the non-strict normalized edit-distance lower bound 1/227, and therefore every strict gap below 1/227.
Appendix D gives the probabilistic proof. The bounded-shell statements and numerical inequalities are proved in Appendix E by finite codebook calculations and analytic tail bounds.
7 Abundance and randomized construction
The local-lemma proof gives more than existence. The product conclusion in theorem 2.3 lower-bounds the fraction of occurrence-choice vectors that avoid every bad event, and the injectivity of the substitution converts this probability into a count of distinct words. For the explicit ternary family, tracking the same charges gives the exponential lower bound stated below. The variable-model proof also gives a Las Vegas construction through Moser-Tardos resampling.
7.1 Exponential abundance for a general substitution
Theorem 7.1 (Exponential abundance). Under the hypotheses of corollary 5.4, the cutoff may be chosen so that, for all sufficiently large , at least words in satisfy the resulting fixed synchronization inequality.
Proof. Put and . Choose small enough that Equation (23) holds and, with , the geometric tail is at most . Such a choice exists because and as , whereas remains fixed.
Fix an outer word of length and let be the full output length. For each there are fewer than bad events, one for each possible start. Thus the charges used in the proof of theorem 5.2 have total charge at most . Every charge is at most , so the product form of the local lemma, together with lemma E.12, shows that all bad events are avoided with probability at least , and hence at least . Since the product space has equally likely points, at least choice vectors avoid every bad event. They give distinct full outputs: at each macroblock boundary, the codeword identifies the choice made for the fixed outer letter.
For an arbitrary requested length , take and . The length- prefix contains the first macroblocks in full and hence determines all but possibly the last choice. Every prefix thus has at most full-output preimages. For , the number of distinct good prefixes is at least
because and . Each prefix inherits the equal-length inequalities, and lemma 2.2 gives the same fixed synchronization parameter.
7.2 The strengthened ternary exponent
For the 54-uniform family, the same charges that prove the improved synchronization parameter retain almost all of the occurrence-wise choice entropy.
Corollary 7.2 (Computer-assisted explicit ternary count). For every , at least ternary words of length satisfy Equation (2).
Proof. Let be a full output of the family in proposition D.1. At every ordered length type there are fewer than event starts. The product conclusion of theorem 2.3, with the charges from Equation (35), shows that the probability of avoiding every bad event is greater than . Here we use and lemma D.6.
The choice vectors are equally likely and give distinct outputs. Thus, writing for the set of good full outputs and using lemma E.2,
For a requested length , take . A length- prefix determines all choices except possibly the last, so at most 952 full outputs have the same prefix. The number of distinct good prefixes is therefore larger than . Here , , and the last inequality is equivalent to . Prefixes inherit every adjacent-interval inequality, so each counted word satisfies Equation (2).
7.3 A Las Vegas construction
Lemma 7.3 (Scanning adjacent-interval LCS values). Let be a word of length . All values
can be enumerated in total time using working space.
Proof. Fix a boundary , and put and . The suffix-prefix component of the all semi-local LCS problem for contains exactly the values for all and . The semi-local seaweed representation is computed in time [Tis08, Theorem 4.10 and Algorithm 5.1]. Its suffix-prefix score matrix can be materialized by two-dimensional prefix sums within the same bounds. Summing over all boundaries gives total time; processing one boundary at a time uses at most space.
Theorem 7.4 (Randomized polynomial-time construction). Suppose an -uniform occurrence-wise square-free substitution is fixed and an outer word in of length can be generated in poly time. Then the strings in corollary 5.4 can be generated by a Las Vegas randomized algorithm in expected polynomial time.
For the ternary 54-Brinkhuis 952-triple, the computer-assisted bounds from Section D show that the algorithm returns a word satisfying Equation (2). It has expected running time and space .
Proof. For the general statement, generate the outer word, sample all occurrence choices independently, and scan the equal-block events used in the proof of corollary 5.4. Each event can be recognized exactly in polynomial time by the standard dynamic program for LCS. Whenever an event is violated, resample exactly the macroblock choices meeting its support and restart the scan. The event scopes and charges satisfy the local-lemma criterion by lemma A.6, so the Moser-Tardos theorem applies.
If is the number of resamplings of event and , then
because every charge is at most and the geometric charge tail is fixed. In particular, the algorithm terminates almost surely. At termination no long equal-block event remains; square-freeness handles the omitted short scales, and lemma 2.2 gives the claimed synchronization parameter. This proves the general statement.
For the strengthened ternary system, scan instead every direct unequal event from proposition D.7, resampling its macroblock scope whenever it is violated. The local-lemma verification in that proposition makes this an instance of Moser-Tardos. At termination, square-freeness and length imbalance handle exactly the event types omitted there. Moreover, lemma D.6 gives the sharper estimate . By lemma 7.3, one complete exact scan of all adjacent-interval LCS values takes time and space. Restricting the scan to the ordered pairs in proposition D.7 does not increase this cost. After each resampling we restart the scan; Moser–Tardos permits any rule for selecting a currently violated event. The expected number of scans is , including the initial and final scans. Thus the expected running time is and the space usage is . Since , the claimed bounds follow. A Thue outer prefix can be generated in linear time from its classical morphism [Thu06].
8 Consequences and open directions
This work determines the exact alphabet threshold for synchronization strings. Ternary synchronization strings exist at every length for one fixed parameter below one, while the known binary obstruction shows that three symbols are necessary. The construction stays within the ternary square-free language: occurrence-wise choices in a Brinkhuis family supply the long-range information that the previous four-symbol construction stored in a separate marking layer.
The local-entropy transfer theorem separates this mechanism from the particular substitution. It compares two rates: the conditional min-entropy that remains in an interval after the rest of the source is exposed, and the entropy of a high-LCS deletion ball. Synchronization follows when the former dominates the latter, subject to bounded-scale and dependency conditions. Brinkhuis families meet this criterion, and the unequal-length Mol–Rampersad substitution gives a second application: extremal square-freeness and a fixed synchronization gap can hold simultaneously.
The local-lemma argument also gives exponentially many valid ternary words and a Las Vegas construction with expected running time . A separate computer-assisted analysis of the 54-uniform family proves a non-strict normalized edit-distance gap of 1/227, for every finite length and for one infinite ternary word. Equivalently, it gives synchronization strings for every fixed ; in particular, one may take . For circles, the six-codeword construction already makes three symbols optimal for unbounded lengths, and a further computer-assisted cyclic refinement gives a ternary 5201/5202-synchronization circle at every length at least 10008.
The optimal ternary synchronization gap remains open. Two other directions are suggested by the proof: replacing the finite deletion-shell analysis by a structural argument, and obtaining near-linear-time or locally accessible ternary constructions. More broadly, the transfer theorem turns the search for synchronization strings into a source-design problem: construct a pattern-avoiding language whose interval conditional entropy dominates the corresponding deletion-ball rate.
A Proof of the local-entropy transfer theorem
This appendix proves theorem 5.2. Fix an -block-local square-free source , where , together with and the charge exponent from the theorem. Throughout, put
The hypotheses imply and . Writing and summing the two geometric series gives
A.1 A deletion-ball rate at the target deficit
Lemma A.1 (Deletion-ball entropy rate). For every integer and every ,
Proof. By lemma 4.2, the cardinality in question is at most
For , the standard entropy estimate gives
The first inequality follows by taking in ; the cases follow by continuity. The second inequality uses and the monotonicity of binary entropy on . Also .
Because , one has . The number of integers in the sum is , and . Multiplying this count by the bound for one summand shows that Equation (27) is at most
as claimed.
□
A.2 One bad event
For every available start and every integer , let be the event
Lemma A.2 (Conditional point mass). Let and . Condition on every block variable except those whose blocks are contained completely in the interval of . Then is fixed and, under every conditioning of positive probability,
Proof. Every unconditioned variable affects a block contained in the interval of , so it affects no character of the disjoint interval of . All block variables affecting , including the variable of a block crossing the common boundary, are therefore conditioned, and is fixed. The stated point-mass bound is exactly Equation (21) applied to the interval of .
Lemma A.3 (Bad-event tail). Every event in Equation (28) satisfies
Proof. Condition as in lemma A.2. The right interval has a fixed value . By lemma A.1, at most values of make the event true, and each has conditional probability at most . Hence
Since and , one has . The last display is therefore at most . This bound is independent of the conditioned values, so averaging proves the same unconditional estimate.
A.3 Dependencies across all scales
Declare that depends on the variables of all blocks intersecting its character support . Join two events when their declared variable sets intersect.
Lemma A.4 (Neighbors at one scale). Fix an event of length . For every , the number of its neighbors of length is at most
If , this number is at most .
Proof. Let the fixed event start at and another length- event start at . If their variable sets intersect, one block of length at most meets both character supports. Consequently, . This open interval contains at most integer starts, even before starts outside the word are discarded. If and , then , giving the second bound.
Assign the charge
Lemma A.5 (Total neighboring charge). For every event ,
where is defined in Equation (22).
Proof. At scale , lemma A.4 gives at most neighbors. Extending the finite sum to every integer only increases it. Since , we have . It follows that
Lemma A.6 (Local-lemma closure). Under Equation (23), every event in Equation (28) satisfies the asymmetric local-lemma criterion.
Proof. Every event has length greater than , so . The same upper bound holds for every neighboring charge. For , the elementary inequality gives, using lemma A.5,
Since ,
where the last inequality is lemma A.3. This is the criterion in Equation (8).
A.4 Proof of the transfer theorem
Proof of theorem 5.2. The family Equation (28) is finite. Each event is determined by its declared block variables, and events with disjoint declared variable sets are functions of disjoint families of independent variables. Thus the graph above is a valid variable-dependency graph. By lemma A.6 and theorem 2.3, some outcome avoids every event with . Hence Equation (24) holds at all these scales.
It remains to consider . Every outcome of the source is square-free. The two adjacent length- intervals cannot be equal, for otherwise their concatenation would be a square. Two different words of the same length have LCS at most . Moreover, . Therefore
which proves Equation (24) at every scale.
Apply lemma 2.2 with . Every pair of adjacent intervals has normalized insertion-deletion distance at least . Thus every strictly smaller gap, equivalently every parameter with satisfies the strict definition of a synchronization string. Finally, factors inherit all equal-block inequalities and hence the same conclusion.
B Extremal square-free synchronization strings
An extremal square-free word is a square-free word for which inserting any letter at any position creates a square. This appendix proves theorem 5.6 by applying the local-entropy transfer theorem to a multivalued substitution of Mol and Rampersad.
Let be the twelve-vertex Thue digraph used in the construction of extremal ternary square-free words. Grytczuk, Kordulewski, and Niewiadomski proved that has arbitrarily long square-free walks [GKN20, Lemma 8]. For each vertex , Mol and Rampersad define words and of lengths 41 and 52, as well as a prescribed length-49 left cap at the first vertex and a prescribed length-49 right cap at the last vertex. Their construction has the following property: if is a square-free walk in of length at least two, then every word obtained by choosing or arbitrarily and occurrence-wise at each occurrence of , and then adding the two prescribed caps, is extremal square-free [MR21, Corollary 3.3].
The twelve pairs are obtained by applying the six permutations of the alphabet, with and without reversal, to the base pair
Lemma B.1 (Equal-length pairing). For every ordered pair of vertices of , the words and are distinct and have length 93.
Proof. Both lengths equal . If the two concatenations were equal, their first 41 letters would give . For a vertex obtained without reversal, this is impossible because the base words and first differ in their fifth letter. For a reversed vertex, it would say that is the length-41 suffix of ; direct comparison of the two displayed words shows that their first letters already differ. Alphabet permutations preserve both inequalities.
Lemma B.2 (Balanced lengths). For every integer , there are nonnegative integers such that
Proof. Choose an integer minimizing . Consecutive integers in this residue class differ by 11, and hence
Set
Since and , the congruence implies . Thus is an integer. Reducing modulo two shows that and have the same parity, so and are integers. Moreover, . By Equation (30), , and integrality improves this to . Finally, if , then . Therefore and are nonnegative, and .
Lemma B.3 (A fixed-boundary extremal source). For every , there is a -block-local square-free source of length , all of whose outcomes are extremal, with parameters
Proof. Put and take from lemma B.2. Set . Choose a square-free walk in . Such a walk exists because a prefix of a sufficiently long square-free walk has every prescribed shorter length.
Let . Reserve the first occurrences of the walk for deterministic images: use Q-images if and R-images if . Partition the remaining occurrences into consecutive ordered pairs . Independently at each pair, choose with equal probability one of the words and . By lemma B.1, these are distinct words of length 93. Finally, add the prescribed length-49 caps at the two ends.
Every outcome uses exactly a copies of a Q-image and b copies of an R-image. Its length is therefore . Every outcome belongs to the Mol-Rampersad substitution applied to the same walk w, and hence is extremal square-free.
The two choices above form a random macroblock of length 93. The cap blocks and the at most 46 unpaired images are deterministic and have total length at most . Because the unpaired images were placed first, the random length-93 macroblocks form one contiguous region. The block partition is fixed before the independent fair bits are sampled, and every block has length at most 93.
Let be a character interval of length . Remove its intersection with the deterministic regions and the at most two random macroblocks cut by its endpoints. The interval then contains at least complete random macroblocks. Condition on all other block variables. A specified value of the word on fixes the fair bit in each of these blocks, because the full block lies in and its two possible values are distinct. Hence
This is the required block-local point-mass bound. The deterministic blocks may be assigned degenerate independent variables.
Proof of theorem 5.6. Apply theorem 5.2 to the source in lemma B.3. Put , , and take charge exponent . The elementary estimates in lemma E.1 give , , and . Thus
Consequently,
It remains to bound the dependency tail in Equation (26). Write . Since and for , we have . Also ; the latter inequality follows from the first seven terms of the exponential series, which give . Moreover, . Substitution in Equation (26) gives . Therefore . The remaining hypotheses are immediate: and . The transfer theorem produces an outcome whose normalized insertion–deletion gap is at least . Taking the strictly smaller gap gives synchronization parameter . By lemma B.3, the selected outcome remains extremal square-free.
C All sufficiently large synchronization-circle lengths
This appendix proves theorem C.1. The construction introduces one bounded defect into the 18-uniform output. A stronger outer word makes every square crossing the defect a finite configuration, while a slightly larger cutoff absorbs the occurrence choices fixed near the defect. The finite part reduces to the 306 template-context cases specified by the displayed words and templates below.
Theorem C.1 (Computer-assisted all sufficiently large circle lengths). For every integer , there is a ternary 5201/5202-synchronization circle of length .
C.1 Circular Dejean words and phase recognition
The exponent of a nonempty word is its length divided by its least period. A circular word is -free if none of its factors has exponent strictly greater than 7/4. Currie, Mol, and Rampersad proved that such ternary circular words exist at every length at least 23 [CMR19, Theorems 3.2–3.3]. We use the form of their inductive step. They define morphisms of lengths 19 and 23 with
and obtain the other images by adding the input letter modulo three. Their proof shows that every length has a circular -free word of the form
where is itself circularly -free.
We also use a small recognizability property of the Brinkhuis codebook.
Lemma C.2 (Phase recognition). Every length-14 factor of an occurrence-wise output of the six codewords in Equation (10) determines the phase of its starting position modulo 18. The six codewords are pairwise distinct.
Proof. A length-14 factor meets at most two consecutive macroblocks. It therefore occurs in an output of three outer letters. There are 12 square-free ternary words of length three and eight occurrence-wise choice vectors, for 96 outputs. Exact factor enumeration gives 198 distinct length-14 factors, none occurring at two phases. The bound is sharp: at length 13 the three factors
occur at both phases 8 and 15. Direct comparison of the six displayed codewords also proves their distinctness.
C.2 A bounded defect
Delete one cyclic factor of length from an occurrence-wise output and join its endpoints. We call the new join the defect seam. The inherited macroblock phases jump by modulo 18 at this seam.
Lemma C.3 (Interior seam exclusion). Suppose . A square crossing the defect seam cannot place the seam at distance at least 14 from its start, midpoint, and end.
Proof. Unwrap the square as , with midpoint , and let be the seam in its interior. Suppose first that . The four intervals
lie inside the square and avoid the seam. The first pair is equal, as is the second pair. By lemma C.2, their starts have equal phases. The first translation by crosses the deleted gap in undeleted coordinates and gives ; the second gives . This contradicts the assumption on . If the seam lies in the second copy, compare the same windows with their translates by .
The edge cases become finite because the outer circle avoids exponents just above 7/4.
Lemma C.4 (Equality segment next to the seam). Unwrap a square of root length as in a word obtained by deleting a gap of length , and suppose that the defect seam lies in the interior of the square and within 13 symbols of its start, midpoint, or end. If , then the equality of the two roots contains a pair of equal, seam-free segments of a common length . In the undeleted word, the starts of these segments differ by either or .
Proof. If the seam lies in the first root, write its distance from the start as , where . For root coordinates , the first position is before the seam and its mate at distance is after it; in undeleted coordinates their displacement is . For , both positions are after the seam and their displacement is . Thus the root equality splits into seam-free segments of lengths and . In this case the seam can be within 13 of the start or midpoint only; accordingly, one of these two lengths is at least .
If the seam lies in the second root, let be its distance from the midpoint, where . For , both corresponding positions are before the seam and have undeleted displacement ; for , the two positions lie on opposite sides and have displacement . The segment lengths are again and . Proximity to the midpoint or end makes one of them at least . These cases exhaust the possible position of an interior seam. Since , the selected segment has length at least 14.
Lemma C.5 (Edge-root bound). Let the outer circle be ternary and -free, and delete a gap of length . If a square crossing the defect seam puts the seam within 13 symbols of its start, midpoint, or end, then its root length is at most 288.
Proof. Let be the root length. If , the conclusion is immediate, so assume . By lemma C.4, the two copies contain an ordinary equality segment of length . By lemma C.2, the undeleted displacement between its two starts is for some positive integer . This displacement is either or , and hence .
The equality segment contains at least complete macroblocks. The starts of the corresponding blocks are outer positions apart. Since the codewords are distinct, the two length- outer factors are equal.
Let be the outer circumference. The original square satisfies . If , then . If , then , so the only additional integral possibility is . For we must have : otherwise gives an outer square, while gives a length- conjugate of period at most and exponent .
Put . We have . The two equal outer factors form a factor with and . This factor has length at most ; at the endpoint , its length is . Its exponent is at least . The condition therefore forces . Hence and . If instead , then directly , so the same conclusion holds.
For define
Lemma C.6 (Finite boundary lemma). Let abcd be a square-free ternary word of length four and let . In the outer context
one can fix the 84 Brinkhuis choices periodically, with period at most three, and delete a gap of length beginning within 86 output characters of the central boundary so that no square of root at most 288 crosses the new seam. The period and the position of the gap depend only on , not on abcd.
Proof. Number the 84 letters of the displayed outer context from left to right, and let the central boundary have output coordinate zero. In the following table, repeat the binary word periodically across those 84 letters, starting at the first one, and begin the deleted gap at coordinate .
| r | g_r | h_r | r | g_r | h_r | ||
|---|---|---|---|---|---|---|---|
| 1 | 1 | -66 | 0 | 10 | 10 | 86 | 01 |
| 2 | 2 | 86 | 10 | 11 | 11 | 86 | 0 |
| 3 | 3 | -66 | 1 | 12 | 12 | -61 | 0 |
| 4 | 4 | -61 | 01 | 13 | 13 | -66 | 0 |
| 5 | 5 | -61 | 1 | 14 | 14 | -61 | 10 |
| 6 | 6 | 86 | 01 | 15 | 15 | -61 | 01 |
| 7 | 25 | 86 | 100 | 16 | 16 | -66 | 1 |
| 8 | 8 | 86 | 0 | 17 | 17 | -66 | 1 |
| 9 | 27 | 86 | 100 |
There are 18 square-free ternary words abcd. For each of the 17 rows and each of these 18 contexts, direct comparison of the two halves, for every root and every start whose square interior contains the seam, finds no equality. Thus the table requires template-context cases, using 17 periodic choice templates and three gap coordinates. The shortest left and right context buffers in these checks are 618 and 715 characters, respectively, both larger than ; choices outside the displayed context therefore cannot affect the conclusion.
Proposition C.7 (Square-free defect source). For every and every nonzero residue modulo 18, there is a partially fixed occurrence-wise source whose outputs become circularly square-free after deleting characters.
Proof. Choose the mixed outer circle in Equation (31). If are the last two letters of and the first two letters of , then is a square-free factor of the circular word . Fix the choices and the gap given by lemma C.6; leave all other choices arbitrary.
Before deletion, every output is circularly square-free by lemma 5.7. A square appearing after deletion must therefore cross the new seam. Lemma C.3 excludes the interior geometry, lemma C.5 bounds every remaining root by 288, and lemma C.6 handles those roots.
C.3 The local lemma with a bounded defect
Fix the source of proposition C.7; its remaining choice variables are independent unbiased bits. Put and . For every cyclic start and , let be the event that the two adjacent cyclic length- arcs satisfy .
Lemma C.8 (Rational bounds for the defect calculation). With
we have
Moreover, if and N = 2601, then
Proof. For , put . Integrating the geometric series for gives
Apply this estimate to , with , respectively. Since , direct rational substitution gives the first two displayed bounds.
The upper estimate for from the same calculation gives and hence . Also gives , so . Therefore
Lemma C.9 (Defect event tail). For every such event,
Proof. A cyclic character arc of length contains at least complete undeleted macroblocks. There are at most two partial blocks at its endpoints and at most two surviving macroblock fragments at the defect seam. At most 84 complete blocks have fixed choices, so the first arc contains at least complete macroblocks with free choices. Condition on every other free choice. This fixes , while any value of has conditional probability at most .
By lemma 4.2 and the same binomial estimate used in lemma 4.3, the number of bad values of is at most , where . It follows that
For every integer , the logarithmic margin against is at least its value at 2601, namely
Indeed, after collecting the terms, the left side is , and the first comparison is the direct substitution of lemma C.8. This also shows that the coefficient of is positive, so the margin is increasing.
Assign charge . As in lemma 4.7, an event of scale has at most neighbors of scale r. Removing or fixing variables can only delete dependencies. Hence
Indeed, after division by the left side is decreasing. At , the geometric-series identities give the left side divided by as the expression in lemma C.8, which is below .
All charges are below 1/2, so the neighboring product is greater than . Since 1/135 > 1/150+1/15000, lemma C.9 satisfies the asymmetric local-lemma criterion, and there is an assignment avoiding every event with .
Proof of theorem C.1. The chosen output is circularly square-free by proposition C.7. Therefore, for , adjacent cyclic arcs of length are unequal and have LCS at most . The local lemma gives the same inequality for every larger equal scale up to half the circumference. The equal-to-arbitrary reduction lemma 2.2 yields non-strict normalized edit distance at least in every rotation. The strictly smaller gap gives parameter .
It remains to realize each length. If , use corollary 5.9: its strict gap also implies the smaller strict gap . Otherwise put with , choose from Equation (32), and set . For we have . The construction above has length , completing the proof.
D Quantitative strengthening from the 54-uniform family
The six-codeword proof isolates the mechanism, while the larger 54-uniform Brinkhuis family supplies substantially more local entropy. We use its 952 occurrence-wise choices to control unequal adjacent intervals directly. The calculation also retains the random macroblock fragment crossing the left endpoint of the first interval. The resulting suffix multiplicities and numerical estimates appear in Section E.
The finite statements used in this section are reproducible from the artifact cited after theorem 1.5; its verifiers use integer or exact rational arithmetic. The occurrence-wise square-free property of the 54/952 family is taken from the published result cited below and is not re-proved by the artifact.
We use the following classical family only for this quantitative refinement.
Proposition D.1 (A 54-uniform Brinkhuis family). There is a special 54-Brinkhuis 952-triple in which is closed under reversal, and and are obtained from by one and two cyclic permutations of the alphabet. Consequently, for every ternary square-free outer word and every occurrence-wise choice vector , the word is square-free, and the map from choice vectors to outputs is injective.
Proof. Sollami, Douglas, and Liebmann constructed this special 54-Brinkhuis 952-triple and proved the corrected length-three criterion [SDL16, Theorem 4]. In their displayed construction, the last 476 words of are the reversals of the first 476, so is reversal closed. Independent occurrence-wise substitution then preserves square-freeness, as in proposition 3.2. Injectivity follows because the 952 codewords for a fixed outer letter are distinct and the macroblock boundaries are fixed.
Fix and , and choose independently and uniformly one codeword at every occurrence of a fixed ternary square-free outer word. Write for the resulting word. Every outcome is square-free by proposition D.1.
For , let
This quantity is independent of a: the three codebooks differ only by cyclic permutations of the alphabet. Its exact values are given in lemma E.3.
For an integer and an offset , define
Lemma D.2 (Fragment-aware conditional mass). Let and , where . There is a conditioning which fixes and under which every exact value of has conditional probability at most .
Proof. Let be the offset of in its macroblock. If , leave unconditioned all macroblocks contained in and condition on every other occurrence choice. None of these blocks meets , so is fixed. Distinctness of the 952 codewords implies that an exact value of determines each unconditioned choice. Its conditional probability is therefore at most .
Suppose and put . The macroblock containing the first character of contributes a suffix of length . Because , this block ends strictly before begins. Leave its choice and all later macroblocks wholly contained in unconditioned, and condition on every other choice. Again is fixed. There are later complete blocks. The visible suffix is compatible with at most choices, while the value of every complete block determines its choice. Independence and uniformity therefore give the upper bound . Taking the maximum over the possible offset proves the claim.
D.1 Direct control of unequal intervals
The usual equal-to-unequal reduction would lose a constant factor from the preceding equal-block deficit. We obtain a stronger final constant by placing the unequal interval events themselves in the local lemma.
The local-lemma calculation becomes effective once the intervals expose enough macroblock entropy. Before that point, parity and square-freeness leave only finite families of one- and two-deletion obstructions. The following exact properties of the codebook remove both families.
Lemma D.3 (The bounded one-deletion shells are absent). Let be any occurrence-wise output of the 54-uniform 952-family applied to a ternary square-free outer word. Let be odd with . If adjacent factors have lengths , then .
Proof. Fix and put . If , deleting one position from the length- factor gives the length- factor. Fix the orientation, the offset of the combined length- factor in its first macroblock, and the deleted position. Equality of the surviving words gives coordinate equalities between the macroblocks met by the factor. Up to a cyclic permutation of the alphabet, it remains only to enumerate the square-free outer contexts meeting that factor.
Group the coordinate equalities according to the pair of macroblocks that they compare. For one group and one cyclic difference between its two outer letters, record whether the exact relation on the two 952-element choice sets is empty. The resulting three-bit labels form a finite mask graph on the met macroblocks.
The finite reduction in lemma E.4 considers the 2,211,084 orientation/offset/deletion patterns, rather than treating every outer context as a new codebook calculation. Every mask graph has no square-free outer coloring, with one structured exception: 280 patterns at , belonging to only 12 mask-graph types. In every exceptional type, two mask edges force the outer context to have the form ; square-freeness makes distinct. After normalizing the alphabet this leaves exactly 344 contexts. Each contains an arc-inconsistent subsystem on at most three macroblock edges, and the subsystem remains inconsistent after all but at most 14 character equalities are removed. Thus every full equality system is inconsistent. The reduction leaves 48 coordinate-core types, each of which is inconsistent by the same finite relation test.
Lemma D.4 (The bounded two-deletion shells are absent). Let be as in lemma D.3. If adjacent factors satisfy and , then .
Proof. If the lengths differ by two, edit distance two would delete two positions from the longer factor and recover the shorter one. If the lengths are equal, square-freeness excludes edit distance zero, while edit distance two would delete one position from each factor and leave equal subsequences. For total 456 the three modes have lengths (229, 227), (227, 229), and (228, 228); for total 462 they are (232, 230), (230, 232), and (231, 231); for total 464 they have lengths (233, 231), (231, 233), and (232, 232).
For each mode, fix the offset in the first macroblock and the two deleted positions, and group the surviving coordinate equalities by their ordered pair of macroblocks, exactly as in lemma D.3. At total 456, all 5,626,584 normalized offset/deletion patterns contain a coordinate group incompatible for every cyclic outer-letter difference. At total 462, all 5,775,462 normalized offset/deletion patterns contain a coordinate group incompatible for every cyclic outer-letter difference. At total 464 there are 5,825,520 patterns, of which 5,813,074 have such a universal conflict. The remaining 12,446 patterns collapse to 216 mode-specific mask graphs: 52 for each imbalanced orientation and 112 for the equal-length mode. None of these graphs has a square-free outer coloring, so no equality system is satisfiable. The reduction is proved in lemma E.5.
Put and . For positive integers with total length , , and , define
For such a pair, set
Lemma D.5 (Direct unequal-event bound). For every admissible as above, .
Proof. The imbalance condition implies , so lemma D.2 applies to the left interval and fixes the right interval while giving point mass at most .
For any bad pair, put , , and . Then and . Conversely, for fixed , choose the deleted positions in and and fill the deleted positions of ; this gives at most possible exact values of . The case would give the square and has probability zero because every outcome is square-free. Summing the remaining cases and multiplying by the conditional point-mass bound gives after averaging over the conditioning. Reverse the entire output and interchange the two intervals. The family is closed under reversal; moreover, reversal merely permutes the uniformly chosen codewords within each outer-letter family. The reversed outer word is square-free, so the reversed random output has exactly the same form as the original one and the same argument gives . Taking the smaller of the two valid bounds proves the claim.
If , the preceding lemma gives probability zero. Since the finite product space is uniform and every choice vector has positive mass, is empty. We discard all such events. From this point on, a retained direct event means an admissible type with ; in particular, every charge below is strictly positive.
Assign the charge
Lemma D.6 (Unequal-event charge envelopes). Every charge in Equation (35) is smaller than 1/6000, and
Proof. This is the exact finite calculation and analytic tail proved in lemma E.6.
Proposition D.7 (Direct normalized edit-distance gap). For every there is a word such that every pair of adjacent nonempty intervals satisfies
Proof. Fix the requested length , put , and choose a ternary square-free outer word of length . Apply the 54-uniform family to obtain a random word of length 54N as above.
Declare that depends on every macroblock variable meeting its support of length . A fixed event has at most neighbors of any fixed ordered length type of total , by the same support-overlap argument as lemma A.4. Thus
Together with lemma D.5 and Equation (35), this gives
The asymmetric local lemma supplies an outcome avoiding every retained direct bad event.
It remains to check pairs not represented by an event. If , then unequal lengths give , while equal lengths give by square-freeness. Now let . If , the imbalance either gives the desired bound, the pair is one of the avoided retained events, or and the direct event is empty by lemma D.5. If , failure of the imbalance bound forces ; edit distance has odd parity, and a violation of the bound must have edit distance one, contrary to lemma D.3. At , failure of the imbalance bound leaves differences zero and two. Square-freeness excludes edit distance zero, while lemma D.4 excludes edit distance two. Thus every adjacent pair in has the claimed non-strict bound. Finally take its length- prefix; every adjacent pair in the prefix is the same pair in , so the inequality is inherited.
Proof of theorem 1.5. Apply proposition D.7. The strict synchronization inequality holds for every ; in particular one may take .
Corollary D.8 (An infinite ternary synchronization string). There exists an infinite ternary word whose every finite adjacent interval pair satisfies the non-strict normalized edit-distance lower bound . Consequently it is an -synchronization string for every .
Proof. Let be the set of ternary words of length satisfying the stated bound for every adjacent interval pair. Each is nonempty by proposition D.7, and every prefix of a word in belongs to the corresponding earlier level. The union of the , ordered by the prefix relation, is therefore an infinite finitely branching tree with a nonempty level at every depth. König's lemma supplies an infinite branch. Every finite adjacent interval pair on that branch lies in one of its finite prefixes and hence satisfies the weak gap. The strict synchronization statement follows because whenever .
E Exact calculations for the ternary parameters
This appendix proves the analytic inequalities and finite reductions used in Sections 4 and D. The finite claims below concern the published 54-uniform codebook from proposition D.1; every comparison is expressed through the exact relations defined here.
Lemma E.1 (Elementary logarithmic bounds). The following strict inequalities hold:
Proof. Finite lower truncations of the exponential series give
These imply the four upper bounds. For the lower bound, the elementary estimate for yields, with ,
so 69/100 < log 2.
Lemma E.2 (Logarithms for the 54-uniform family). One has
Proof. The positive exponential series gives
For the opposite direction, for every , and hence
The lower bound on e gives
so . Also
Taking logarithms proves the claim.
Lemma E.3 (Suffix fibers of the 54-uniform family). For the special 54-Brinkhuis 952-triple in proposition D.1, the suffix multiplicities defined in Section D are as follows:
| s | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 952 | 952 | 952 | 952 | 952 | 952 | 642 | 642 | 642 | 444 | 444 | 233 | 211 | |
| s | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 211 | 198 | 132 | 100 | 100 | 85 | 85 | 66 | 37 | 37 | 33 | 26 | 25 | |
| s | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |
| 22 | 15 | 15 | 13 | 10 | 9 | 9 | 7 | 7 | 6 | 5 | 5 | 4 | |
| s | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 |
| 3 | 3 | 3 | 2 | 2 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
Proof. For each , partition the 952 words in by their suffix of length and take the largest class. Direct enumeration gives the displayed row. The other two codebooks are obtained from by bijective alphabet permutations, which preserve equality of suffixes and hence preserve every fiber size.
We will use the following elementary rational enclosure in the finite calculation. For every rational ,
Indeed, beginning with the term of degree 81, the ratio of consecutive terms is at most , so the positive tail is bounded by the displayed geometric series.
Lemma E.4 (Finite verification of the bounded one-deletion shells). The conclusion of lemma D.3 holds for the 54-uniform 952-family.
Proof. We reduce the claim to finite relations among codeword choices. Fix an odd and put . If adjacent lengths and have deletion distance one, deleting one of the positions in the longer word makes the two surviving length- words equal. A case is specified by the orientation, one of the 54 offsets of the combined factor in its first macroblock, the deleted position, and the square-free outer context met by the factor.
Equality after the deletion imposes character equalities. Group them by the ordered pair of macroblocks containing the two characters, and let be the resulting list of local-coordinate pairs. For , define the exact choice relation
The three codebooks are cyclic alphabet translates, so if the two outer letters differ by , this is precisely the relation that their two occurrence choices must satisfy. Label edge by the three-bit mask
For the fixed orientation, offset, and deletion position, these labels form a mask graph on the met outer occurrences. An outer context can support the putative equality only if its difference on every edge avoids that edge's mask.
There are
orientation/offset/deletion patterns. Exact finite-set comparison constructs 13,288 distinct mask graphs. Recursively generating normalized square-free colorings of each graph shows that every graph has no such coloring except for 280 patterns at total . These exceptions belong to 12 mask-graph types. Each contains edges and with mask , forcing and . The factor meets five macroblocks, and square-freeness now forces the normalized outer context to be 01201 or 02102. Across the 280 patterns this gives exactly 344 residual contexts.
For a residual context, give each occurrence the domain [952] and put the exact relation on every edge. Repeatedly delete a choice having no support across an incident relation. This arc-consistency operation preserves every satisfying assignment. A minimal edge subsystem is already inconsistent: 338 residual contexts have a two-edge core and the remaining six have a three-edge core. Removing redundant coordinate equalities from these relations leaves 48 core types, each involving at most 14 character equalities, and every core still empties a domain.
For each of the 48 reduced cores, repeated arc-consistency deletion empties one of the finite domains. The cores contain at most 14 character equalities and cover all 344 residual contexts arising from the mask-graph classification. Hence no residual context admits a satisfying assignment, and every one-deletion shell in the stated range is empty.
Lemma E.5 (Finite verification of the bounded two-deletion shells). The conclusion of lemma D.4 holds for the 54-uniform 952-family.
Proof. We first enumerate the three modes at total 456. Their lengths are (229, 227), (227, 229), and (228, 228), so the numbers of normalized offset/deletion patterns are
Every one of these 5,626,584 patterns contains a coordinate group for which the exact relation from lemma E.4 is empty for all three cyclic outer-letter differences . Hence every pattern is impossible independently of the outer context.
At total 462 the three modes have lengths (232, 230), (230, 232), and (231, 231), so the numbers of normalized offset/deletion patterns are
For every one of these 5,775,462 patterns, one coordinate group has for all three possible cyclic outer-letter differences. Thus every pattern is impossible independently of the outer context.
At total 464, for lengths (233, 231), choose the two deleted positions in the left factor; for (231, 233) choose them in the right factor; for (232, 232) choose one deleted position in each factor. Together with the 54 offsets in the first macroblock, the numbers of normalized offset/deletion patterns are
Their sum is 5,825,520.
For each pattern, group the surviving coordinate equalities by their ordered pair of macroblocks and form the relations from the preceding proof. In 1,456,707, 1,456,707, and 2,899,660 patterns, respectively, one group has an empty exact relation for all three possible cyclic differences between the two outer letters. These 5,813,074 patterns are therefore impossible for every outer context.
For each remaining pattern form the three-bit mask graph from the preceding proof. The 2,805 left-longer patterns collapse to 52 mask graphs, the 2,805 right-longer patterns to 52, and the 6,836 equal-length patterns to 112. Exact generation of normalized square-free outer colorings shows that none of these 216 mode-specific graphs has a surviving coloring. Thus all 12,446 residual patterns are inconsistent without any search over codeword choices.
The half-family contains 476 words; adjoining their reversals gives 952 distinct words. Forming the exact relations for these finite codebooks gives the counts above at all three totals, and every pattern or residual context contains the claimed disjoint relation. Hence no edit-distance-two pair exists in any stated shell.
Lemma E.6 (Exact bounds for the direct unequal events). The charges in Equation (35) satisfy
Proof. We again separate an exact finite calculation from a uniform tail. Total lengths in are absent by lemmas E.4 and E.5. For every with , put . Apply the rational exponential upper bound Equation (36) with ; it is valid because . For every ordered pair with , compute from Equation (33) and lemma E.3 and compute the two integer volumes in Equation (34). The term is rounded upward to the next multiple of . There are 34,788 nonzero terms in this range after the zero-volume types are discarded. Exact integer addition gives
Here and below in this calculation, admissibility means , , and . The factor 6000/5999 is valid because the first inequality implies . As above, these are finite comparisons of explicitly defined rational numbers.
For the tail, let and . If and , then . Since , it is enough in the tail to bound this first conditioning direction. By lemma A.2, the complete-block point mass is at most . We next bound the unequal deletion volume. Put . Vandermonde's identity gives , and . There are fewer than possible integer values of . Using lemma E.7 and monotonicity at therefore gives
The already proved bound and the integer comparison imply . Hence . Combining this with gives the positive rational margin
Since and , every tail charge satisfies
For each total , fewer than ordered pairs satisfy . Applying the exact first- and second-moment geometric formulas with from onward shows that the tails contributed to and are, respectively, smaller than and . These are direct rational comparisons using
In particular all tail charges are below 1/6000. Finally, Equations (38) and (39) and these tail bounds give
and . Therefore
as required.
Lemma E.7 (Elementary binomial and monotonicity estimates). Let be a positive integer.
(i) For every integer , .
(ii) The function is strictly increasing on .
(iii) For every real , one has .
Proof. For (i), use and the standard bound . Part (ii) follows from . For (iii), the function vanishes at and has positive derivative for , using lemma E.1.
Lemma E.8 (Deletion-ball exponent). For ,
Proof. Because , we have . Together with lemma E.1, this gives
Lemma E.9 (Event-decay exponent). For every integer ,
Proof. Set . After taking logarithms, it suffices to show . Since , , and , we have . Consequently,
The last rational is larger than 9/500, because . This proves the logarithmic inequality and hence the displayed exponential inequality.
Lemma E.10 (Geometric series and first moment). For and an integer ,
Proof. The first identity is the geometric-series formula. For the second, write and use and .
Lemma E.11 (Geometric neighbor tail). Let . For every ,
Proof. The positive exponential series gives . Taking reciprocals yields . Hence and . By lemma E.10, with and ,
In the second estimate we used and . Since , and . Therefore
The terms through degree six of the positive exponential series give
because . Consequently . Finally,
which is equivalent to and proves the claim.
Lemma E.12 (Products of small complementary charges). If , then . Consequently, for any finite family with ,
Proof. Let . On , and , so . Summing this inequality over and exponentiating gives the product bound.
Lemma E.13 (Local-lemma and synchronization margins). The comparisons
hold for .
Proof. Both comparisons follow from the exact identities
References
[BDG 26] Sudatta Bhattacharya, Sanjana Dey, Elazar Goldenberg, Mursalin Habib, Bernhard Haeupler, Karthik C. S., and Michal Koucký. Constant rate isometric embeddings of Hamming metric into Edit metric. In 53rd International Colloquium on Automata, Languages, and Programming (ICALP 2026), volume 374 of Leibniz International Proceedings in Informatics (LIPIcs), pages 32:1–32:19. Schloss Dagstuhl–Leibniz-Zentrum für Informatik, 2026.
[Bec84] József Beck. An application of Lovász local lemma: There exists an infinite 01-sequence containing no near identical intervals. In Finite and Infinite Sets, volume 37 of Colloquia Mathematica Societatis János Bolyai, pages 103–107. North-Holland, 1984.
[Bri83] Jan Brinkhuis. Non-repetitive sequences on three symbols. The Quarterly Journal of Mathematics, 34(2):145–149, 1983.
[CHL 19] Kuan Cheng, Bernhard Haeupler, Xin Li, Amirbehshad Shahrasbi, and Ke Wu. Synchronization strings: Highly efficient deterministic constructions over small alphabets. In Proceedings of the Thirtieth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 2185–2204. SIAM, 2019.
[CMR19] James D. Currie, Lucas Mol, and Narad Rampersad. Circular repetition thresholds on some small alphabets: Last cases of Gorbunova's conjecture. The Electronic Journal of Combinatorics, 26(2):P2.31, 2019.
[CR16] Serina Camungol and Narad Rampersad. Avoiding approximate repetitions with respect to the longest common subsequence distance. Involve, a Journal of Mathematics, 9(4):657–666, 2016.
[EL75] Paul Erdős and László Lovász. Problems and results on 3-chromatic hypergraphs and some related questions. In Infinite and Finite Sets, volume 10 of Colloquia Mathematica Societatis János Bolyai, pages 609–627. North-Holland, 1975.
[EZ98] Shalosh B. Ekhad and Doron Zeilberger. There are more than n-letter ternary square-free words. Journal of Integer Sequences, 1(1):Article 98.1.9, 1998.
[EZ01] Shalosh B. Ekhad and Doron Zeilberger. Errata and addenda to “there are more than n-letter ternary square-free words”. Author erratum, 12 June 2001, 2001.
[GKN20] Jaroslaw Grytczuk, Hubert Kordulewski, and Artur Niewiadomski. Extremal square-free words. The Electronic Journal of Combinatorics, 27(1):P1.48, 2020.
[Gri01] Uwe Grimm. Improved bounds on the number of ternary square-free words. Journal of Integer Sequences, 4:Article 01.2.7, 2001.
[Hae19] Bernhard Haeupler. Optimal document exchange and new codes for insertions and deletions. In 60th IEEE Annual Symposium on Foundations of Computer Science (FOCS 2019), pages 334–347. IEEE, 2019.
[HRS19] Bernhard Haeupler, Aviad Rubinstein, and Amirbehshad Shahrasbi. Near-linear time insertion-deletion codes and -approximating Edit distance via indexing. In Proceedings of the 51st Annual ACM SIGACT Symposium on Theory of Computing (STOC), pages 697–708. ACM, 2019.
[HS17] Bernhard Haeupler and Amirbehshad Shahrasbi. Synchronization strings: Codes for insertions and deletions approaching the Singleton bound. In Proceedings of the 49th Annual ACM SIGACT Symposium on Theory of Computing (STOC), pages 33–46. ACM, 2017.
[HS18] Bernhard Haeupler and Amirbehshad Shahrasbi. Synchronization strings: Explicit constructions, local decoding, and applications. In Proceedings of the 50th Annual ACM SIGACT Symposium on Theory of Computing (STOC), pages 841–854. ACM, 2018.
[HS21] Bernhard Haeupler and Amirbehshad Shahrasbi. Synchronization strings and codes for insertions and deletions: A survey. IEEE Transactions on Information Theory, 67(6):3190–3206, 2021.
[HSV18] Bernhard Haeupler, Amirbehshad Shahrasbi, and Ellen Vitercik. Synchronization strings: Channel simulations and interactive coding for insertions and deletions. In 45th International Colloquium on Automata, Languages, and Programming (ICALP 2018), volume 107 of Leibniz International Proceedings in Informatics (LIPIcs), pages 75:1–75:14. Schloss Dagstuhl-Leibniz-Zentrum für Informatik, 2018.
[MR21] Lucas Mol and Narad Rampersad. Lengths of extremal square-free ternary words. Contributions to Discrete Mathematics, 16(1):8–19, 2021.
[MT10] Robin A. Moser and Gábor Tardos. A constructive proof of the general Lovász local lemma. Journal of the ACM, 57(2):11:1–11:15, 2010.
[SDL16] Michael Sollami, Craig C. Douglas, and Manfred Liebmann. An improved lower bound on the number of ternary squarefree words. Journal of Integer Sequences, 19:Article 16.6.7, 2016.
[Shu10] Arseny M. Shur. On ternary square-free circular words. The Electronic Journal of Combinatorics, 17(1):R140, 2010.
[Thu06] Axel Thue. Über unendliche zeichenreihen. Skrifter udgivne af Videnskabsselskabet i Christiania, I. Mathematisk-naturvidenskabelig Klasse, No. 7, pages 1–22, 1906.
[Tis08] Alexander Tiskin. Semi-local string comparison: Algorithmic techniques and applications. Mathematics in Computer Science, 1(4):571–603, 2008.