Manuscript Offprint
arXiv:2611.07346GreedTok is a Constant-Factor Approximation for Partition-Cover Tokenization
Abstract
GREEDTok (Lim, Tan, Choo and Lauw, NeurIPS 2025) builds a tokenizer vocabulary greedily for the partition-cover objective: choose tokens so as to maximize the number of adjacent character pairs merged when the corpus is segmented optimally. The objective is neither submodular nor supermodular, so the classical analysis does not apply, and a worst-case guarantee was left open. We prove that GREEDTok is a constant-factor approximation: on every corpus and for every budget it achieves at least 0.2752 of the optimum, and it is optimal for . The bound holds for both the exact greedy loop and the lazy priority-queue loop of the published algorithm and its code. The key ingredient is a shift lemma: if two occurrences of a not-yet-chosen token overlap and both are still usable, they offer exactly the same gain, so GREEDTok's left-to-right scoring loses nothing when occurrences collide. A per-occurrence charging argument, with window distributions certified in exact arithmetic or given in closed form, completes the proof. In the other direction, we construct corpora on which GREEDTok, with adversarial tie-breaking, achieves at most a fraction of the optimum tending to (below 0.5380 when every greedy choice is unique). Finally, we show that the objective is NP-hard to approximate within , to our knowledge the first inapproximability result for it.
Code, certificates and result files: Zenodo, doi:10.5281/zenodo.23954767 (Appendix E).
1 Introduction
A tokenizer fixes the units in which a language model reads text. Its vocabulary is chosen once and then used on every input, so a vocabulary that segments text into fewer tokens gives shorter sequences, less computation and more text per context window. Choosing the vocabulary is a combinatorial optimization problem, and the methods used in practice solve it greedily. It is natural to ask how far a greedy vocabulary can be from the best one. For bottom-up, merge-based tokenizers such as BPE this question has recently been studied in depth: Zouhar et al. [6] bound greedy BPE in terms of an instance-dependent curvature, and Kozma and Voderholzer [4] gave the first constant-factor bounds. In this paper we answer the question for GREEDTok, a greedy algorithm for a different and more direct formulation of tokenization.
The problem. Lim, Tan, Choo and Lauw [1] cast tokenization as a partition-cover problem. We are given a corpus of words with counts and a budget , and we choose a set of at most tokens, each a string of length at least 2. Every word is then segmented optimally into tokens of and single characters, and the objective counts, weighted by word counts, the adjacent character pairs that end up inside a token. Maximizing is thus the same as minimizing the total number of tokens. The problem is NP-hard [1, 2].
The algorithm. GREEDTOK [1] builds one token at a time, always choosing the candidate with the largest score, where a score is computed by scanning the candidate's occurrences from left to right. Unlike max-coverage greedy, GREEDTOK's choices also fix where a token is used: its occurrences are frozen, and later tokens may absorb them but not cut through them. We write for the gain of the -th choice, for the value after steps, and for the final value with budget .
Why the standard analysis fails. The textbook bound for greedy rests on submodularity: at every step the optimal solution still offers, in total, at least the remaining gap . Here this fails in two ways. The objective is neither submodular nor supermodular [1, App. A], and not even weakly submodular.¹ More importantly, a single commit can make every occurrence of an optimal token unusable, so greedy may destroy more optimal value than it gains. Lim et al. observed good empirical ratios and left a guarantee open: “Although we show that GreedTok achieves an approximation ratio of at least for large , a formal proof is lacking. Nevertheless, this is an intriguing theoretical problem.” [1, §6].
Main results. Write for the optimum with budget .
Lower bound (Theorem 16). On every corpus and for every , , and . This holds for any tie-breaking, for the exact greedy loop and for the lazy priority-queue loop of the published pseudocode and code.
Upper bound (Proposition 18). There are corpora on which GREEDTOK, with adversarial tie-breaking, achieves at most a fraction of that tends to . With every greedy choice unique, there are instances with ratio below 0.5380 for arbitrarily large .
Hardness (Theorem 20). Maximizing with an unrestricted vocabulary is NP-hard to approximate within .
Hence the worst-case ratio of GREEDTOK lies in , and the best ratio achievable in polynomial time lies in .
Contributions. The new ideas are a shift lemma for overlapping occurrences (Lemma 4), a charging argument over random substrings (“windows”) of the optimal tokens (Section 4), two families of bad instances (Section 5), and the first inapproximability reduction for this objective (Section 6).
Related work. Worst-case guarantees for tokenizers have so far concerned bottom-up (merge-based) tokenization. Zouhar et al. [6] showed that greedy BPE is a -approximation for an instance-dependent curvature . Kozma and Voderholzer [4] proved the pair-encoding problem
¹For the single word xaby, and give but , so the submodularity ratio is 0.
APX-complete and bounded BPE's worst-case ratio between 1/3 and 0.625; the extended version of their paper [5] lowers the upper bound to . For direct tokenization (choose a vocabulary, then segment optimally), the setting of GREEDTOK, the problem is NP-complete [1, 2], and for the compressed-length objective it is APX-hard even over a binary alphabet [3]. We study the complementary objective, the number of pairs covered, and give the first inapproximability bound for it. ConvexTok [7] rounds an LP relaxation and certifies per-instance optimality gaps, whereas our guarantee is worst-case and instance-independent.
Outline. Section 2 explains the proof in plain words on a running example. Section 3 gives the model. Section 4 proves the lower bound, Section 5 gives the bad instances, and Section 6 the hardness result. Long proofs are in Appendices A–C. Appendix D relates our model to the released implementation, and Appendix E collects all computations.
Running example. Take the single word with count 1 and index its characters ; pair , for , is the pair of characters and . The string occurs at positions 0, 2 and 4, i.e. on the intervals , and .
How GreedTok works. GREEDTOK keeps a set of committed occurrences, and a pair is covered if it lies inside one of them. An occurrence of a new string is valid if neither of its two boundary pairs is covered: a new token may swallow committed occurrences whole, but it may not cut through one. The gain of a valid occurrence is the number of its interior pairs that are still uncovered. To score a string, GREEDTOK scans its occurrences from left to right, places each valid occurrence that does not overlap the previously placed one, and adds up their gains. It then chooses the string with the highest score and commits all placed occurrences; its value is the total number of covered pairs. On the empty state of our example, the scan of abab places , skips because it overlaps , and places , for a score of .
Idea 1: a commit can block optimal occurrences, but only locally. Suppose GREEDTOK commits ba on the empty state. Its scan places [1,3), [3,5) and [5,7), covering pairs 2, 4 and 6 for a gain of 3. Every occurrence of abab now has a covered boundary pair, so none is valid (Figure 1a), and the two disjoint occurrences of abab, worth 6, are lost for good. This is why the standard analysis breaks. The damage is local, however. A covered pair is a boundary pair of at most two disjoint optimal occurrences, and a covered pair inside an optimal occurrence P only blocks those substrings of P that begin or end at it. Instead of crediting greedy with a whole optimal token, we therefore credit it with a random substring of that token, a window; a window whose ends avoid the covered pairs is still valid.
Idea 2: overlapping occurrences do not interfere (the shift lemma). To credit greedy with a window string x, we need GREEDTOK's score of x to be at least the total gain of the window occurrences we have in mind. The left-to-right scan, however, may skip one of them because an overlapping occurrence came first. Suppose GREEDTOK has committed ab, covering pairs 1, 3, 5, 7. The occurrences of abab at 0, 2 and 4 are then all valid, each with gain 1, and the scan places [0,4) and [4,8) but skips [2,6). Nothing is lost, because the blocker [0,4) has the same gain as the

(a) after committing ba

(b) after committing ab
Figure 1: The running example . Shaded boxes are committed occurrences; a filled dot marks a covered pair, an open dot an uncovered one. (a) Committing ba covers pairs 2, 4, 6. Pair 4 is the shared boundary of the two disjoint occurrences of abab, so both become invalid; so does [2, 6). (b) After committing ab, the overlapping occurrences and of abab are both valid. Shifting by maps the interior pairs 1, 2, 3 of to the interior pairs 3, 4, 5 of (arrows), and covered pairs map to covered pairs. So and have the same gain (Lemma 4).
skipped [2, 6). The shift lemma says that this is always so: if and are overlapping valid occurrences of a string not yet chosen, then pair inside is covered exactly when pair is (Figure 1b). Every skipped occurrence can thus be charged to its blocker, and a score equals the largest total gain of any disjoint family of valid occurrences; in particular, scores never increase over time. The proof is an induction over commits. Two overlapping occurrences of the same string force the text to be periodic, and one checks that each commit treats the two periods identically.
Idea 3: averaging over windows gives a recursion. Fix a step . Take an optimal token of length and a random window drawn from a distribution , and let . By the shift lemma, the next greedy gain is at least the total gain of the copies of this window inside the optimal occurrences of . Suppose keeps, in expectation, an fraction of the pairs of , and each covered pair, by being unavailable or by invalidating windows that start or end at it, reduces the expected window gain by at most . Summing over the at most optimal tokens, and noting that greedy has covered pairs, gives
The gap thus shrinks by a factor per step, which yields . Finding a good is a linear program. For our distributions have , which gives 0.2658; using several pairs , and the best one at each step, gives 0.2752. For long tokens we use an explicit family of distributions in which the two ends of the window are tied together by quadratic functions.
The other results. The bad instances of Section 5 lure GREEDTOK into choices that score highly but collect only a single pair per optimal occurrence. It first commits “root cuts”, which take the pair just before some optimal occurrences, and then “group prefixes”, which take the first pair of the others. Together these take one pair at every optimal occurrence, after which no optimal occurrence can be committed whole and each later choice recovers only a third of the value of one optimal token. The hardness result (Section 6) is a reduction from Max-2SAT with bounded occurrences, through Max -Vertex-Cover.
3 Model
Corpus, pairs, occurrences. A corpus is a finite set of words with counts . For , pair of is the adjacent pair . An occurrence of a string () is an interval , , with . Its interior pairs are , its left boundary pair is (if ) and its right boundary pair is (if ). For a token set , cover is the maximum number of interior pairs of a family of pairwise disjoint occurrences of tokens of in , and . Since , where is the alphabet (the single characters) and PARTITION is the minimum number of pieces, maximizing is Problem 1 of [1]. The candidate set is the set of all substrings of length of corpus words, which is the default of the paper and of the implementation. We write .
GreedTok: state, validity, gain. The state of GREEDTOK is, for every word, a family of committed occurrences; a pair is covered if it is an interior pair of some committed occurrence. An occurrence is valid if neither of its boundary pairs is covered (CANCOVER, Alg. 2 of [1]). The gain of a valid occurrence is the number of its uncovered interior pairs (Alg. 3 of [1]).
Score, choice, commit. For a string , the leftmost scan of visits, word by word, the occurrences of in increasing order of start, and places an occurrence iff it is valid and does not overlap the previously placed occurrence of in that word. The score is gain. At step , GREEDTOK picks , with ties broken arbitrarily, and commits every placed occurrence of . Thus , , and the output value is . Appendix D checks that this model matches the released implementation.
Exact and lazy loops. The value of the output is the committed state . Re-encoding the words optimally with the chosen set gives , so every lower bound below also holds for . Algorithm 1 of [1] is lazy: it keeps a priority queue of stored scores and re-computes a score only when its candidate reaches the top. Corollary 17 shows that this changes nothing.
The first lemma collects the basic invariants of the committed state; we use it throughout.
Lemma 1 (Basic structure). At every time: (i) any two committed occurrences in a word are nested or disjoint; (ii) for a valid occurrence of a string not yet chosen, every committed occurrence meeting lies inside , and gain; (iii) committing makes exactly its uncovered interior pairs covered; covered pairs stay covered forever; and .
Proof. If a committed occurrence meets but is not contained in it, then extends past an end of that is not an end of the word, so contains the boundary pair of at that end as an interior pair, and that pair is covered, contradicting validity. This gives the first claim of (ii) and, by induction, (i). Inside the maximal committed occurrences and the uncovered characters partition into consecutive pieces, which are separated by exactly the uncovered interior pairs; so the number of pieces minus one equals the number of uncovered interior pairs. (iii) is immediate from (ii) and the fact that commits only add occurrences. (The hypothesis in (ii) that the string is not yet chosen is not used.)
The case is easy, and it already gives a (weak) bound for every .
Proposition 2 (; elementary bound). , and for every .
Proof. On the empty state every occurrence is valid with gain . The leftmost scan of equal-length intervals places a maximum number of pairwise disjoint occurrences (earliest-finish interval scheduling), so and . For general , restricting an optimal segmentation to the occurrences of one token shows , hence .
4 The constant-factor guarantee
Fix an optimal set with and, in every word, an optimal family of disjoint occurrences of tokens of , so that , where and is the count of the word containing . For we use : offset denotes the pair between the -th and -th character of ; offsets are the interior pairs of , and offsets are its boundary pairs (when they exist). At time let be the covered interior offsets, and let indicate that the left/right boundary pair of exists and is covered.
4.1 Scores and overlapping occurrences
A window string may already have been chosen. The next lemma says that it then contributes nothing, so we never need to credit greedy for it.
Lemma 3 (Chosen strings). If , every valid occurrence of at time has gain 0.
Proof. Let be chosen at step and an occurrence of valid at time . Since covered pairs stay covered, was valid at time . Either the commit pass committed , and then all its interior pairs are covered from then on (gain 0); or it skipped because overlapped the previously committed occurrence of , with . In the second case the left boundary pair of is an interior pair of , covered from time on, and is not valid at time , a contradiction.
The shift lemma is the heart of the proof. It says that two overlapping valid occurrences of an unchosen string see the same pattern of covered pairs (Figure 1b). We need it to show that the leftmost scan loses nothing when it skips an occurrence (Lemma 6).
Lemma 4 (Shift). Let , and let be occurrences of in the same word , both valid at time , with for some . Then for every pair with ,
is covered at time is covered at time .
In particular .
Proof sketch. The map is a bijection from the interior pairs of to those of , which gives the “in particular”. Since and spell the same string, the text is -periodic on . We induct on . When the string is committed at step , one shows three things: shifted copies of valid occurrences of inside (or ) are valid; a placed occurrence that covers a pair inside lies inside ; and an occurrence is placed iff is placed. The last claim is proved by taking a counterexample with leftmost start and deriving a counterexample further left. The full proof is in Appendix A.1.
Remark 5. The proof never uses that the committed string is a maximizer, only that it differs from . So Lemma 4 holds for every sequence of commits of distinct strings.
With the shift lemma, a skipped occurrence can be charged to the occurrence that blocked it.
Lemma 6 (Interference is free). Let and let be any set of pairwise disjoint occurrences of (in any words), all valid at time . Then .
Proof. Each is placed by the scan, or, being valid, is skipped because it overlaps the last placed occurrence before it (); in that case is valid, , and Lemma 4 gives gain. Such a is not in , since it overlaps , and it blocks at most one element of , since two disjoint occurrences of length cannot both start in . So the map (itself if placed, its blocker otherwise) is an injection from into the placed occurrences that preserves gain, while is the count-weighted total gain of the placed occurrences.
Corollary 7 (Scores never increase). For every unchosen , over disjoint families of occurrences valid at time ; hence whenever . Consequently the lazy loop of Algorithm 1 always accepts an exact maximizer, i.e. it is the exact greedy up to tie-breaking.
Proof. “≥” is Lemma 6, and “≤” holds because the placed occurrences form such a family. Validity and gains can only decrease over time, so the maximum can only decrease. In a lazy loop, every unchosen candidate carries a stored score that was its true score at some earlier time, so every stored score is at least the current one. The accepted candidate’s stored score is current and maximal among stored scores, hence at least every current score.
4.2 Windows and the per-step inequality
We now make Idea 3 of Section 2 precise. A window is a substring of a token, given by its two end offsets.
Windows. A window of a length- token is with ; is its number of interior pairs; is the aligned occurrence of inside . For a sub-probability distribution on windows let and . So is the expected length lost if offset invalidates the windows that start or end there, and is the probability that offset lies strictly inside the window.
Definition 8. is -good if , for , and , .
The next lemma bounds, for one optimal occurrence, what a random window still offers greedy.
Lemma 9 (Per-occurrence bound). Let be -good, with , and . Then
Proof. Let . The aligned occurrence is valid iff , and then its gain is . Hence (also when invalid, as ) . Taking expectations, an interior costs , offset (if ) costs , offset costs , and .
The covered pairs charged in Lemma 9 must be paid for by greedy's own value. The next lemma does this; it is where “a covered pair borders at most two optimal occurrences” enters.
Lemma 10 (Charging). Let and let be the (count-weighted) number of covered pairs that are boundary pairs of some . Then and .
Proof. A boundary pair of is not interior to any (that would make overlap). So interior and boundary pairs are disjoint sets of covered pairs, and their total is at most by Lemma 1(iii). A pair is a boundary pair of at most two members of .
Combining the three lemmas gives the recursion and the bound.
Theorem 11 (Greedy step). Suppose that for every there is an -good , with . Then for every corpus and every , .
Proof. Fix , of length and a window ; put . If , apply Lemma 6 to an occurrence of , valid}, which is disjoint since the are: . If , every by Lemma 3, and . Average over (sub-probability; ), apply Lemma 9, sum over the at most tokens of , and use Lemma 10:
(If the scores are all 0 at some , this gives .) With and we get while , and . Hence (if some , then ), i.e. .
4.3 Good window distributions
It remains to exhibit good distributions. For short tokens we compute them; for long tokens we give a closed form.
Lemma 12 (Small lengths). For every there is a -good with rational weights (denominator ), and .
Proof. By computation: for each we solve the linear program over window distributions, round the weights down to multiples of , and verify all constraints of the definition in exact integer arithmetic. The certificates and an independent checker are described in Appendix E.
Lemma 13 (Long tokens). Let . There are explicit window distributions and an explicit function , increasing in , such that is -good for every , and as . For , and for all . For small the family can be empty (for example and , where ); then and the claim is vacuous. Below we use the lemma only for (with ) and for .
Proof sketch. The two ends of the window are tied together through a uniform parameter , by quadratic functions and . Left endpoints and right endpoints then move monotonically with , in disjoint ranges. An offset in the left range is an endpoint only for windows with in a short interval, and the quadratic shape is chosen so that equals exactly there; the right range is symmetric. The value bound integrates . The precise statement (Lemma 23, with the right-hand side of its bound on ) and its proof are in Appendix A.2; the condition there holds for for every we use.
With a single this already gives a constant.
Corollary 14 (Single ). For every corpus and every ,
Proof. k = 1: Proposition 2. : Theorem 11 with Lemmas 12 and 13.
4.4 A different at every step
Early in the run is small, and a large matters more than a small ; late in the run the reverse holds. Since the recursion holds for every certified pair at every step, we may use the best one at each step.
Theorem 15 (Envelope). Let , finite, with be such that for every and every there is an -good . Put and let solve , . For let and . Then for every , and whenever .
Proof. The proof of Theorem 11 gives, at every step and for every separately, ; also . With this is . Each function with is nondecreasing, so is nondecreasing, and induction gives . If , all lines are used, and we show by induction. As long as , increases and is decreasing, so . (Once , is constant and the inequality persists.)
Instantiation. We use . All exceed , so Lemma 13 applies to each. For each we compute exact certificates for , as in Lemma 12, and use Lemma 13 for . This gives ; for all seven values the tail term is the minimum. Evaluating in interval arithmetic and exactly gives and (truncated; Appendix E).
Theorem 16 (Main bound). For every corpus, every and any tie-breaking, .
Proof. For use Proposition 2. For , Theorem 15 gives with , and for it gives .
Finally, the bounds transfer to the lazy loop that the paper actually runs.
Corollary 17 (The paper's lazy Algorithm 1). Corollary 14 and Theorem 16 hold for the lazy priority-queue loop of Algorithm 1 of [1], with any tie-breaking in the queue, read as in Appendix D (the accepted token is the one committed, and positions are visited left to right within each word).
Proof. By Corollary 7 the lazy loop accepts an exact maximizer at every step, so the claim follows from the theorems, which allow any tie-breaking. A direct argument, which does not use Corollary 7, also works. Lemma 6 gives at every time . Covered pairs only accumulate, so validity can only be lost and gains only drop: is non-increasing in time. In the lazy loop every unchosen carries a stored score computed at some time (time 0 initially, later when popped), and the accepted token has current score (the first pop is accepted at time 0, where stored and current scores agree). Hence for every window string , , while for Lemma 3 gives . The proofs of Theorems 11 and 15 use the greedy rule only through this per-window inequality , from which Lemmas 9 and 10 give for every certified pair ; so both proofs carry over unchanged.
5 How bad can GreedTok be?
We now show that the guarantee cannot be pushed beyond about 1/2. Our main construction uses adversarial ties; its full proof is in Appendix B.3.
Proposition 18 (Root-cut family). Let and , and let be the largest integer with ( for ). There is a corpus on which GREEDTOK with budget has a run (each choice a maximizer over all candidates; ties broken adversarially) of value . As the bound tends to .
Idea of the construction. Each of the optimal tokens has the form : a shared letter , one of group letters , a private letter , and a shared letter ; it covers three pairs per occurrence. Some occurrences are preceded by one of “root” letters . GREEDTOK first commits the root cuts and then the group prefixes , which together collect one pair at every optimal occurrence (the pair just before it, or its first pair ). The remaining pairs are split into fragments that no single later token collects together, so each later choice gains only a third of the value of one optimal token. The root cuts use about a fraction of the budget, which gives the limit . Figure 2 shows the two kinds of words.

rooted word, total count N/2

bare word, count N/2
Figure 2: The two kinds of words for optimal token in the root-cut family. Shaded boxes are the commits of phases 1 and 2, each covering one pair. In rooted words the root cut covers the left boundary pair of , so can no longer be used there. The optimal token covers 3 pairs in every occurrence, worth ; each phase-3 choice or covers 2 pairs on half of the occurrences, worth .
Unique choices. Adversarial ties are not essential. Our search found an instance at budget k = 48 in which every greedy choice is unique and the ratio is below 0.5380 (Table 1). A simple “disjoint copies” argument (Appendix B.2) turns a bad instance at budget k into equally bad instances at every multiple of k, and into instances whose ratio is at most times as large at budgets between and . So there are unique-choice instances with ratio below 0.5380 at every multiple of 48. For a clean analytic family with unique choices, the classical tight example for greedy maximum coverage embeds into the problem.
Proposition 19 (Max-coverage family). For every and every there is a corpus (all counts 1, k words of length , alphabet of size ) on which every greedy choice of GreedTok is unique, and
In particular, taking , the worst-case ratio of GreedTok is at most .
The proof is in Appendix B.1.
| regime | words | ||
|---|---|---|---|
| 2 | worst ties | 13 | |
| 2 | unique choices | 13 | |
| 3 | worst ties | 11 | |
| 3 | unique choices | 13 | |
| 4 | worst ties | 16 | |
| 4 | unique choices | 13 | |
| 5 | worst ties | 24 | |
| 24 | worst ties | 96 | |
| 24 | unique choices | 83 | |
| 48 | worst ties | 384 | |
| 48 | unique choices | 162 | |
| 72 | worst ties | 936 | |
| 96 | worst ties | 1632 |
Table 1: Best exactly verified upper-bound instances per budget . Budgets whose bound already follows from a budget that properly divides , by disjoint copies, or from Proposition 19, are not listed. Unmarked rows: GREEDTOK minimised over all tie-breaks. : the full tie tree was too large; the value is that of one exactly verified greedy run (each pick a maximum over all candidates), an upper bound on the worst tie-break. : replayed run with a unique maximum at every step. “Unique choices” rows have a single greedy run.
Explicit instances. Table 1 lists the best instances we found for each budget, each verified exactly. The ratio is GREEDTOK’s value against the value of an explicit -token set, which is a lower bound on , so each entry is a certified upper bound on that instance’s ratio. The adversarial-tie rows at are the root-cut instances of Proposition 18 with roots, and their ratios equal , namely and (for instance, the row is the member with ). The unique-choice rows at and 48 come from a search over corpora of the same shape (Appendix E). The smallest certified ratio on a single instance is .
6 How hard is the problem?
Write for partition-cover tokenization with the pairs-covered objective and an unrestricted vocabulary (all substrings are candidates, the setting of GREEDTOK), and for the version of [1] in which a candidate set is part of the input. Max -VC asks for vertices of an edge-weighted graph maximizing the weight of covered edges.
Theorem 20 (Hardness of approximation). (i) For every , is NP-hard to approximate within ; in particular it is APX-hard and has no PTAS unless . (ii) is at least as hard as Max -VC: the construction of [1] satisfies for every , so is UG-hard to approximate within .
Proof sketch. The full proof is in Appendix C. For (i) we reduce from Max-2SAT with every variable in exactly three clauses (Berman–Karpinski [8, §7]), via weighted Max -VC on the literal graph. Each vertex gets fresh copy characters , and an edge becomes the words . Heavy forcing words and make every bigram worth its slot in the budget. With all bigrams present, the remaining budget can buy trigrams , and each edge word gains one pair iff an endpoint copy is chosen; pipage rounding shows that the blown-up graph’s optimum is times the original one. Other tokens (edge tokens, whole words) can appear in optimal vocabularies, but the upper-bound argument charges them at most per edge word, in total, against . This gives , and the Berman–Karpinski gap survives with the stated constant, which we have not tried to optimize. Part (ii) is a quantitative reading of the NP-hardness construction of [1].
Corollary 21. Unless , the best approximation ratio achievable in polynomial time for lies in ; the lower end is attained by GREEDTOK (Theorem 16).
Remark 22 (Why the compressed-length hardness does not transfer). Kastreva et al. [3] prove APX-hardness for the compressed-length objective and list other objectives as open; the two objectives rank tokenizers identically but differ for approximation [3, §2]. Their reduction from 3-OCC-Max2SAT encodes variable by the strings and , so the corpus has characters for variables, while the compressed length and the clause signal are both . For pairs covered the optimum is , so the induced gap ratio tends to 1.
7 Discussion
Where the analysis loses. The shift lemma removes all loss from overlapping occurrences. Without it, a natural first approach charges each skipped occurrence to covered pairs to its left; this forces windows into the right half of an optimal occurrence, and an LP over such window distributions caps that approach at about 0.153 (Appendix E). Three losses remain: a covered pair can invalidate windows as well as being unavailable (), a single window cannot capture a whole optimal occurrence in expectation (), and the recursion itself loses a factor . Even if windows died only through commits that cross an optimal boundary, an LP shows that window averaging would be capped at 0.3176 (Appendix E). Going further seems to need windows that absorb crossing commits, or an argument over whole trajectories (factor-revealing).
Open problems. The worst-case ratio of GREEDTOK lies in , far from the empirical behaviour reported in [1], and we do not know whether it is a constant above . On the hardness side our bound is weak: whether is hard, and whether hardness persists over bounded alphabets, are open.
Use of AI tools. AI-assisted tools, including Claude (Anthropic), were used throughout the research process to support mathematical reasoning, computational experimentation, proof verification, and manuscript preparation. The authors guided the research direction, directed and evaluated the central arguments, and oversaw the computational and verification workflows. Additional independent AI-assisted checks were employed to assess proof consistency and computational correctness. The authors take full responsibility for the results and conclusions presented.
References
[1] J. P. Lim, S. Tan, D. Choo, H. W. Lauw. A Partition Cover Approach to Tokenization. NeurIPS 2025. arXiv:2501.06246v3.
[2] P. Whittington, G. Bachmann, T. Pimentel. Tokenisation is NP-Complete. ACL 2025 (Long Papers), pp. 28133–28153. arXiv:2412.15210.
[3] V. Kastreva, P. Whittington, D. Komm, T. Pimentel. Tokenisation over Bounded Alphabets is Hard. ICLR 2026. arXiv:2511.15709.
[4] L. Kozma, J. Voderholzer. Theoretical Analysis of Byte-Pair Encoding. ESA 2026, LIPIcs 388, 80:1–80:17.
[5] L. Kozma, J. Voderholzer. Theoretical Analysis of Byte-Pair Encoding. Extended version, arXiv:2411.08671v2, 30 October 2026. https://arxiv.org/abs/2411.08671v2.
[6] V. Zouhar, C. Meister, J. Gastaldi, L. Du, T. Vieira, M. Sachan, R. Cotterell. A Formal Perspective on Byte-Pair Encoding. Findings of ACL 2023, pp. 598–614.
[7] J. Tempus, P. Whittington, C. W. Schmidt, D. Komm, T. Pimentel. Tokenisation via Convex Relaxations. arXiv:2605.22821, 2026.
[8] P. Berman, M. Karpinski. On Some Tighter Inapproximability Results, Further Improvements. Electronic Colloquium on Computational Complexity, Report TR98-065, 1998.
[9] P. Austrin, A. Stanković. Global cardinality constraints make approximating some Max-2-CSPs harder. APPROX 2019. arXiv:1907.04165.
[10] P. Manurangsi. A note on Max k-Vertex Cover: faster FPT-AS, smaller approximate kernel and improved approximation. SOSA 2019. arXiv:1810.03792.
A Omitted proofs from Section 4
A.1 Proof of the shift lemma (Lemma 4)
Note that maps the interior pairs of bijectively onto those of , which gives the “in particular”. Also, since and both spell , the text is -periodic on : for . Hence for every occurrence of a string , is also an occurrence of , and for , is an occurrence of .
Proof. Induction on . At nothing is covered. Assume the statement at time (for all strings and all such pairs of occurrences) and let be the string committed at step . Fix and as in the lemma, valid at time . By monotonicity are valid at time and , so the induction hypothesis gives
“Placed” below refers to the scan of z at time t (the commit pass of step ).
Step 1 (shifted copies are valid). If is an occurrence of valid at time , then is valid at time ; if is valid at time , then is valid at time . Take . Left boundary: if then the left boundary pair of is , which is uncovered (or absent) because is valid; otherwise and by (1) and validity of . Right boundary: if the right boundary pair of is , uncovered or absent since is valid; otherwise and . The case is symmetric (using validity of at the ends and (1) with , , which lie in unless , resp. ).
Step 2 (a blocking occurrence that covers an interior pair of or lies inside it). Let be placed and let be an occurrence with , , valid at time . Then . Indeed
is an interior pair of , so it is covered at time . If this contradicts the validity of at time (and is impossible since ). Otherwise , so (committed at time ) shares the characters with , and Lemma 1(ii) at time gives . The same holds with in place of .
Step 3 (placement is shift-invariant). We claim: (i) if is placed then is placed; (ii) if is placed then is placed.
(i) Suppose not, and among the placed with not placed choose one with minimal. By Step 1, is valid at time ; as it is not placed, the scan skipped it because it overlaps the last placed occurrence before it: . By Step 2 (with ), . Then is an occurrence of , valid at time by Step 1, and , i.e. overlaps the placed . Placed occurrences are pairwise disjoint, so is not placed, hence it was skipped because of the last placed occurrence before it: . By Step 2 (with ), . Now overlaps the placed (), so it is not placed. Thus is placed, is not placed, and , contradicting the minimality of .
(ii) Suppose is placed and is not. By Step 1 is valid at time , so it was skipped because of the last placed before it, ; by Step 2, . Then overlaps the placed , so is not placed, contradicting (i) applied to .
Step 4 (conclusion). By Lemma 1, a pair is covered at time iff it was covered at time or it is an interior pair of a placed occurrence of . Let . If is an interior pair of a placed , then shares the characters with , so by Lemma 1(ii) at time ; by Step 3(i) is placed and is one of its interior pairs. Conversely, if (which satisfies ) is an interior pair of a placed , then , is placed by Step 3(ii), and is an interior pair of . Together with (1), .
A.2 The quadratic family (Lemma 13)
The following is the precise form of Lemma 13.
Lemma 23 (Quadratic family, all large ). Let , , and for
Let , , , and let be the law of the window where has density on (total mass ). If , then is -good with
For : , , and , which is increasing in and equals 0.5630 at .
Proof. Write , , ; so , and on . increases from 0 to , increases from to , and because . Hence left endpoints lie in (as ), right endpoints lie in (as ), these ranges are disjoint, and . In particular .
Left zone, . Every window has , so with . The windows with left endpoint have , , so , and length . Integrating, . So .
Right zone, . Every window has , so , . Windows with right endpoint have , i.e. with , , and length . Integrating, , so .
Middle, : and .
Value. , so . Here ; (since ) and (since ); and . So the excluded integral is at most .
For : , , , , for . The bound is ; both factors increase with (as ). The same holds for every : writing the bound as with , both factors increase with , so for the minimum is at .
Remark 24 (Where the family comes from). In the continuum limit, with left endpoint and right endpoint coupled monotonically, the constraints on both zones become , , whose solution is the family above. The LP optimum over all windows approaches the same value: the certified of Lemma 12 at is 0.5781, against .
B Upper-bound constructions
B.1 Proof of Proposition 19 (max-coverage family)
Construction. Define with for . Let be a prime with (Bertrand). Choose integers with (feasibility below). Let for and for . For let be a string of letters, all letters of all blocks pairwise distinct. Index blocks by (block has residue ) and for let
each with count 1. As is invertible mod , every word contains every block exactly once, so every letter occurs exactly once in every word and . We call the greedy blocks.
Feasibility. Since , , hence ; in particular and , so the leftover mass is nonnegative. It is at most : indeed gives , while , and the difference is . Finally because ; so for all .
Scores. Fix and the state after GreedTok committed , each as one interval in each word (we show inductively this is the run). Recall that the score of a candidate is the sum over words of the gains of its valid occurrences, the gain of an occurrence being (number of pieces inside it)–1, where an uncovered letter and a committed interval each count as one piece. Let be a candidate (a substring of length , not yet chosen).
(a) lies inside one block . Then occurs exactly once in every word, at the same offset in . If is committed, (already chosen), so one endpoint of lies strictly inside the committed interval and the occurrence is invalid: score 0. If is uncommitted, all letters of are uncovered and its boundary pairs are not inside one committed interval, so the score is , with equality only for .
(b) contains a junction. Then contains the last letter of some followed by the first letter of , which are adjacent only in the word with ; the residues are distinct since . So occurs only in , and only once. The pieces inside one occurrence are among the pieces of the whole word, so its gain is at most (pieces of )–1. Each committed block () turned uncovered letters into one piece, so this equals . Hence the score of is .
By construction , for , and . So by (a) and (b), is the unique maximizer at step , with score . Committing it creates one interval in each word (the occurrence is valid: its letters are uncovered and its boundary pairs join different pieces), which completes the induction. Hence GreedTok is tie-free and
Optimum. has , so and
using .
Remarks. (i) The instance is the classical tight example for greedy maximum coverage: the “elements” are the internal pairs of the blocks; greedy block takes a fraction of every optimal word's remaining marginal. (ii) The ties variant ( ) has GreedTok's worst tie-break follow the same run and gives slightly smaller instances. (iii) The alphabet grows with ; we did not try to bound it. (iv) Small explicit instances of this family were verified exactly (Appendix E).
B.2 Disjoint copies
The next two lemmas turn one bad instance at budget k into bad instances at every larger budget. In both, denotes the value of a given run and O the optimum of the base instance.
Lemma 25 (Disjoint copies, adversarial ties). Let be an instance with a GreedTok run (each choice a maximizer) whose gains satisfy , such that every score in the state after is (write for the maximum such score), value , and let
OPT. Let be copies of on pairwise disjoint alphabets. Then for every , writing , the worst tie-break of GreedTok on has value at most , and ; for , gives value against . Hence the worst-case ratio is for all , and for all multiples of .
Proof. Copies share no letter, so a token lives in one copy and its score depends only on that copy's state. Run the copies in lockstep: in round , choose in copy in turn. When a copy is chosen in round , every copy is in the state after or steps of ; the maximum score in a copy after steps is , and after steps it is (for this is the extra hypothesis). So the chosen token is a global maximizer and this is a valid (adversarial) GreedTok run, in which every copy contributes exactly after rounds. Truncating it after choices is still a valid run, because choices do not depend on the budget; its value on copies is at most . For OPT, take an optimal -set in each of copies, since is additive over copies.
Every member of the root-cut family satisfies the hypotheses (end of Appendix B.3). So does the best adversarial-tie witness of Table 1 (, ratio 19/36): its run gains are nonincreasing and the maximum score after the run equals its last gain. It therefore gives ratio at every multiple of 72.
Lemma 26 (Disjoint copies, unique choices). Let have a tie-free GreedTok run with gains , where is the maximum score after the run, value , , and let . For and an integer , let copy of (own alphabet) have all counts multiplied by . Then for every budget GreedTok is tie-free on this corpus and follows the lockstep schedule (round : copies in decreasing order of ). In particular, for , , and for (using copies) the ratio is .
Proof. Scores in copy are times the scores of in the same state. Suppose round is in progress and the copies with larger than have already taken . Copy offers , while the other copies still in round offer at most , since their . Runners-up inside any copy score strictly below that copy's maximum. The copies already past offer at most , and because . So in copy is the unique maximizer. The value is after steps, and by additivity over copies (for use the largest copies).
For example, take the unique-choice witness of Table 1, with . Its run gains 4885108, 1968148, 1470300, followed by the maximum score after the run, 1461600, strictly decrease. So it gives unique-choice instances with ratio at every multiple of 3, and the limit superior of the unique-choice ratio is at most . The best unique-choice witness of Table 1 (, ratio ) also has strictly decreasing run gains and a strictly smaller maximum score after the run. Lemma 26 then gives unique-choice instances with ratio at every multiple of 48.
B.3 Proof of Proposition 18 (root-cut family)
Construction. All letters below are distinct single characters: , group letters , token letters , root letters . Token is with , so every group contains exactly 4 tokens. Fix and put , for , , and (). The corpus has, for every , the bare word with count and the rooted words with count (); scaling makes all counts integers. Since , every token has total occurrence mass . Facts used below: for ; (as ); for all ; for ; and, since , , so for . Thus for all .
Candidates. The substrings of length are: from , the strings , , , , , ; and additionally from , the strings , , , . Each string other than and (and ) occurs in the words of one token only.
The run. (1) The root cuts , in decreasing order of ; (2) the group prefixes ; (3) harvest picks of gain each. We verify maximality at every step, writing for the per-token mass of rooted words whose root is not yet cut, plus the bare mass .
Phase 1. Only root cuts have been committed, so a committed occurrence is a at the start of a rooted word. Scores: (uncut) ; (its left boundary pair is covered exactly in cut rooted words); , ; , (no boundary pair of these is ever covered in phase 1); , , (for cut roots these are smaller still). Order the cuts by decreasing . The values decrease; let sit at position . Before is cut, the cuts are in index order and when is cut, so . When is cut (after ), and if , while for , by the fact above. After it, () is cut with , so . Hence the chosen cut always has score ; also since ; and, since the chosen cut has the largest among the uncut roots, for every uncut root (as ); strings involving an already cut root score at most . So every cut is a maximizer. Phase 1 gains .
Phase 2. Now every rooted word starts with a committed . Scores: (unprefixed group) (bare words only); for tokens of unprefixed groups; (bare only); ; ; , , . For a prefixed group , the committed in bare words invalidates and there, leaving (rooted words) and (bare words, absorbing ). So the maximum is , attained by the next . Phase 2 gains .
Phase 3. Every bare word reads and every rooted word . For each token : (bare, absorbing ; invalid in rooted words), (rooted; invalid in bare words), , , ; and , , ; since for all (shown in the Construction paragraph), all of these are . Every word consists of distinct letters, so each candidate occurs at most once per word; covered pairs stay covered and pieces only merge, so committing any candidate only lowers scores and the maximum stays ; and it stays equal to : the candidates (bare words) and (rooted words) have gain and live in pairwise disjoint word sets except that a pick touches both of token 's; every candidate of score lies in the words of a single token (the multi-token strings score ), so after further picks at least of them still have gain . Phase 3 gains .
Value and limit. , while covers all 3 pairs of every occurrence, . Hence . Since and , and the bound tends to . The maximum score after the run is , the last gain, and gains are non-increasing, so Lemma 25 applies to every member.
Remark 27 (Heuristic, not a proof). Phase 1 collects one of the three pairs of every occurrence and leaves the other two split into fragments that no single string harvests together; it uses about of the budget at gains . In all our searches, greedy steps that destroy more than their own gain occur only early in a run and the rate then falls below one; we have no proof that this must happen.
C Proof of Theorem 20
Max -VC (edge-weighted, loops allowed): graph , integer weights , loops ; ; maximize over . Write , , , , .
C.1 With a candidate set: exactly Max k-VC
Theorem 28. Given , let the corpus have one word of count per edge and one word of count per loop, with and . Then for every , where . Hence and solutions correspond one-to-one: every -gap of Max -VC transfers to -gap of .
Proof. In ZuZvZ the only candidates occurring are ZuZ at [0,2] and ZvZ at [2,4]; they share position 2, so at most one is used, covering 2 pairs; in ZuZ the only candidate is the whole word (2 pairs).
This is Lim et al.'s own NP-hardness construction (from Vertex Cover) read quantitatively; it is approximation-preserving. Consequences: (coverage objective) is APX-hard; it is UG-hard to approximate within , the tight UG-hardness of Max k-VC that Austrin and Stanković [9] derive from monotone Max-2-Sat with a cardinality constraint (for the polynomially bounded weights their reduction produces); and it is NP-hard within (Lemma 33 with ). Since that bound is tight for Max k-VC (and Manurangsi's 0.92-approximation [10] already comes close), 0.929 is essentially the truth for these instances; it says nothing about algorithms for in general.
C.2 Unrestricted vocabularies
Construction . For , every vertex gets fresh characters ; one more character . Let . Words (counts in brackets): (E) for every edge (one fixed orientation) and all ; (L) for every ; (F) and for every . Budget (). Call , bigrams, trigrams ( a copy character), and every token containing two distinct copy characters an edge token; each edge token occurs in exactly one (E)-word (no two copy characters are adjacent, and determines the word), and no token other than these occurs anywhere (ZZ and xy never occur).
Lemma 29 (word values). Let be an -word and arbitrary. (i) If contains its four bigrams and none of its edge tokens, . (ii) Always , contains an edge token of ”. For a loop word : , with equality if .
Proof. cover = 5 - p, p the number of pieces. p = 1 needs the token w (an edge token). A 2-piece partition has piece lengths (1,4),(4,1) (edge tokens aZbZ, ZaZb), (2,3) (Za · ZbZ) or (3,2)
; so cover = 3 needs , or an edge token, and cover otherwise. This gives (ii). For (i): gives 2, and give 3. Loop word: cover 2 needs the whole word ; 1 via .
Lemma 30 (blow-up, pipage). Let be the weighted graph on copies with edge of weight and loop weight at . For put . Then with , and .
Proof. Edge : of its copies are uncovered; loops: copies, weight each. is monotone, and along it is linear if and convex if (the coefficient is ). Pipage rounding (Ageev-Sviridenko) moves any with to an integral point with without decreasing , so ; the integral optimum is realized by taking all copies of an optimal .
Theorem 31. Let . Then
Proof. Lower. bigrams and for all copies of an optimal (). By Lemma 29(i) and the loop clause, .
Upper. Let , the number of bigrams in , , the copies with , and the (E)-words containing an edge token of , number of edge tokens in . Then . Let , . By Lemma 29(ii), summing with counts,
Deleting elements from loses at most each (the weighted degree of a copy in ), so by Lemma 30. With : , and .
Corollary 32 (transfer). If it is NP-hard to distinguish from on a family with and polynomially bounded, then for every is NP-hard to approximate within (take a large enough polynomial; ).
Lemma 33 (3-OCC-Max-2SAT Max k-VC). For a 2-CNF on variables in which every variable occurs in exactly three clauses, let have a vertex per literal, an edge of weight 1 per variable, an edge per clause (; parallel edges merge by adding weights) and a loop at per clause ; . Then and (repeated clauses merge, so can reach 4; it only enters terms).
Proof. : the literals true under an assignment. : if contains both literals of some and none of some , delete the literal of lying in fewer clauses not containing the other literal (at most one such clause, since is in three clauses; the variable edge stays covered) and add a literal of (gain from its variable edge). Repeat, then complete; the result is an assignment with satisfied. Degrees: 1 plus at most three clauses (parallel edges, including merged into the variable edge, only add weights).
Theorem 34. For every , (unrestricted vocabulary, pairs-covered objective, unbounded alphabet) is NP-hard to approximate within (). In particular it has no PTAS. It is also APX-hard: the upper-bound proof is constructive and yields with ; choosing and using integrality of cov, the additive term is absorbed, and ; this is an approximation-preserving (-) reduction (its parameters depend on , so it is not an -reduction in the strict sense).
Proof. Berman and Karpinski [8, §7] show that for every it is NP-hard to decide whether an instance of 3-OCC-MAX 2SAT with 2016 clauses has an assignment satisfying at least clauses or at most . They define -OCC as at most occurrences, but their instances come from the gadget of [8, §7], which creates four variables per edge of a cubic graph, each occurring in exactly three of the clauses (two in the edge gadget and one in the ring of the incident node). So every variable occurs exactly three times, and gives . With Lemma 33, , , and . The ratio increases in and , so it is at most ; apply Corollary 32.
D Fidelity to the released implementation
We compared our model with the paper's Algorithms 1-3 [1] and with the authors' implementation pcatt at commit 36b928c7 (16 April 2026), which contains an original solver (greedyBuilder.cpp), the shipped solver (pco_tokenizer.cpp) and an encoder (greedy_encoder.cpp).
Validity, gain and commit. The implementation labels each character with the committed occurrence that contains it and tests validity by checking whether the two characters straddling a boundary carry the same label, which is our condition. It computes the gain as #uncovered chars + #distinct committed occurrences inside - 1, which equals the number of uncovered interior pairs by Lemma 1(ii). Alg. 3 of [1] writes the index range as ; its Example 4 and the code make clear that the interior pair entries are meant. A commit relabels the characters of each placed occurrence with a fresh label, and validity is re-tested against the labels already written in the same pass. This places exactly the same occurrences as the scan. An occurrence that overlaps the previously committed one in the pass has both characters of its left boundary pair inside that occurrence, now with the same fresh label, so it is rejected, as the scan rejects it. For a later non-overlapping occurrence, no character of its right boundary pair or interior was written in the pass, and at most one character of its left boundary pair was, with a fresh label equal to no older one; so the test gives the same answer as at time .
Ties and laziness. The original solver re-scores every candidate in every affected word, so it is the exact greedy; on ties it takes the first maximum in hash-map order. The shipped solver is lazy: it re-scores only candidates whose words were touched since their last evaluation, and on ties it prefers the shorter token. Since depends only on the states of the words containing , a stored score whose words were not touched is still current; so every stored score is the true score at some earlier time, the accepted one is current, and Corollaries 7 and 17 apply to it as to Algorithm 1. Our bounds hold for any tie-breaking. On the adversarial-tie instance of Table 1, a compiled run of the shipped solver attains the worst tie-break, ratio 3/5. A differential test of the compiled code against our simulator agreed on all 1,543,232 score comparisons and all 35,544 greedy steps, and found no non-maximal choice of the lazy solver in 90,000 random instances (Appendix E).
Reading of Algorithm 1. Lines 16–18 of Algorithm 1 use and ; we read this as a typo for the accepted token , and the first popped token is committed too. The positions are visited left to right within each word, as in Example 4 of [1] and in the implementation. Read literally, the commit block never fires and Algorithm 1 returns the tokens of largest initial score. Its worst-case ratio is then : at least by the argument of Proposition 2, and a family with one long word and shorter words on fresh letters approaches it. Visiting positions in another order also breaks Lemma 6: on abababab with , starting the scan at position 2 scores 3 instead of 6. Neither reading matches the implementation.
Restricted candidates and the encoder. The implementation can cap token length and drop rare words; our theorems then hold with and the corpus restricted accordingly, since every window of a token in is in . Our bounds are for the committed value and for the optimal re-encoding . The released encoder labels characters by rank only and can split a training word more finely than the committed state, e.g. with ranks (ab, abc, ba) on ababc; our bounds do not cover it.
E Computations and artifacts
Every computational claim in the paper is listed in Table 2. All of them rest on an exact simulator of GREEDTOK, which implements the leftmost scan, the commit rule and every tie-break, together with exact evaluation of and of (by enumeration or MILP).
Reproducibility. All code, certificates, result files and witnesses (corpus, greedy run, comparison set) are in the supplementary archive of the Zenodo record doi:10.5281/zenodo.23954767. Every number in this paper is generated from those result files by one script, and the window certificates can be regenerated and re-checked with one command each. Checksums and commands are in the supplement's README.
| Claim | Check | Scale |
|---|---|---|
| Lemma 12 () | LP per length, weights rounded down to multiples of , all constraints verified in exact integer arithmetic; independent checker | |
| Theorem 16 | same, for seven (LP over windows near the quadratic-family curve; all windows for ); independent checker evaluates in interval arithmetic and exactly; the analytic tail binds for every | |
| Lemmas 4, 6, 3 | pairwise check of the shift lemma; scores against the maximum-weight disjoint valid family | 103, 713 random states; all binary words of length , ternary , three commits (72, 205, 022 states); no violation |
| Corollary 7 | exhaustive search for a score increase | 1, 780, 818, 426 checks on short words; none found |
| Corollary 17 | lazy loop vs. exact greedy over all tie-breaks | 4,965 random instances; lazy value always in the exact range |
| Table 1, rows | LP search: for fixed word types, greedy sequence and comparison set, the greedy-run conditions are linear in the counts; minimise GREEDTOK by LP, rationalise, re-verify from scratch | words of length over letters |
| Table 1, rows | structured search over corpora shaped like the root-cut family; exact replay of every pick, and an independent re-implementation with its own ILP | words |
| Propositions 19, 18 | exact runs of explicit members over all candidates; for the root-cut family also the MILP optimum at | 10 members with ; |
| Lemmas 25, 26Table 3 | exact runs on copies, all tie-breaks, exact OPT exhaustive enumeration, OPT over all -subsets | up to see table |
| Theorem 20 | CP-SAT over all substrings; control instances with forcing weight 1 | 37 instances, 16 controls (upper bound fails on 1) |
| Lemma 29Appendix D | all subsets of the substrings of an edge word released C++ (pcatt at 36b928c7, compiled) vs. our simulator: scores, greedy steps of exact and lazy solvers | subsets1,543,232 scores, 35,544 steps, 90,000 lazy runs; all agree |
| Section 7 | LP caps for left-charging () and for window averaging with boundary-only loss (0.3176, at ) | — |
Table 2: Computational checks.
| words | max len | max count | instances | worst ties | no ties | |
|---|---|---|---|---|---|---|
| 2 | 2 | 7 | 4 | 148,830 | 3/4 | 15/19 |
| 2 | 3 | 5 | 3 | 327,775 | 13/18 | 7/9 |
| 2 | 3 | 6 | 3 | 2,852,575 | 13/18 | 23/30 |
| 2 | 4 | 4 | 3 | 585,548 | 2/3 | 15/19 |
| 2 | 5 | 4 | 2 | 1,015,343 | 2/3 | 13/16 |
| 3 | 2 | 7 | 4 | 148,830 | 7/8 | 1 |
| 3 | 3 | 5 | 2 | 91,777 | 3/4 | 7/8 |
| 3 | 4 | 4 | 2 | 111,180 | 13/18 | 7/8 |
| 3 | 4 | 4 | 3 | 585,548 | 13/18 | 19/23 |
Table 3: Exact minima of over bounded classes (binary alphabet, distinct words, counts with gcd = 1, one representative per swap). “worst ties”: adversarial tie-breaking; “no ties”: instances where every greedy choice is unique.