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 \approx 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\to\infty$ but never attained. The proof is based on a shadow inequality: after $i$ greedy steps, the optimum is at most $2G_i+kg_{i+1}$, where $G_i$ is greedy's saving so far and $g_{i+1}$ its next gain. We also show that the worst-case ratio at budget $k$ exceeds the limiting constant by $Θ(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.
Tokenisers such as Byte-Pair Encoding (BPE) shorten text by repeatedly merging an adjacent pair of symbols into a new one; fewer tokens mean less computation. We ask whether an efficient algorithm can choose $k$ merges that leave a string of length $n$ almost as short as possible; doing nothing is already within a factor $n$. We prove that, unless P = NP, no polynomial-time algorithm comes within a factor $c\,n/\log n$, for some constant $c>0$, already for one binary string and for BPE-style merges that replace every occurrence. The key idea is that $k$ merges form a grammar with $k$ rules: a vertex-cover gap becomes a grammar-size gap, which we amplify with relabelled copies, encode in binary and realise with explicit merges. For merges that may skip occurrences, a simple algorithm achieves $O(n/\log\log n)$, and no Karp reduction can prove hardness beyond order $n/\log n$ unless coNP $\subseteq$ NP/poly. Over a one-letter alphabet, both tokenisation problems left open by Kastreva et al. are strongly NP-complete on datasets with repeated strings.