# Greedy BPE with Replacement Counts Achieves the Tight Approximation Ratio (1-e-2)/2

arXiv: https://arxiv.org/abs/2611.08671 · HTML: https://mlsanity.com/paper/2611.08671/

## Key facts

- Cited by 1 papers in the map (data through 24 Nov 2026).
- Builds on 5 of its 15 references that are in the map.
- Submitted 5 Nov 2026.

## Builds on (most cited first, 5 of 5)

- [Neural Machine Translation of Rare Words with Subword Units](https://mlsanity.com/paper/1508.07909/) (2015)
- [A Formal Perspective on Byte-Pair Encoding](https://mlsanity.com/paper/2306.16837/) (2023)
- [Theoretical Analysis of Byte-Pair Encoding](https://mlsanity.com/paper/2411.08671/) (2024)
- [Tokenisation is NP-Complete](https://mlsanity.com/paper/2412.15210/) (2024)
- [Tokenisation over Bounded Alphabets is Hard](https://mlsanity.com/paper/2511.15709/) (2025)

## Built on by (most cited first, 1 of 1)

- [Pair-Merge Tokenisation Is Hard to Approximate on Binary Strings and Strongly NP-Hard on Unary Datasets](https://mlsanity.com/paper/2611.13568/) (2026)

## Abstract (arXiv)

Byte-Pair Encoding (BPE) builds the tokenisers of many language models by repeatedly merging a most frequent adjacent pair of symbols. Kozma and Voderholzer showed that k greedy merges save, in the worst case, between 1/3 and (1-e-2)/2 ≈ 0.43233 of what the best k merges save, and asked for the exact constant. We resolve this question for the replacement-count rule they analyse. For every string and weighted word table, every budget k, and every tie-breaking rule, greedy saves at least frac12(1-(1-2/k)k) of the optimum. This establishes the exact worst-case approximation ratio (1-e-2)/2, approached as k→∞ but never attained. The proof is based on a shadow inequality: after i greedy steps, the optimum is at most 2Gi+kgi+1, where Gi is greedy's saving so far and gi+1 its next gain. We also show that the worst-case ratio at budget k exceeds the limiting constant by Theta(k-1/2). For the overlapping-count rule used by deployed trainers, we prove a lower bound greater than 0.38954 and an asymptotic upper bound of approximately 0.40407; determining its exact constant remains open.
