# Pair-Merge Tokenisation Is Hard to Approximate on Binary Strings and Strongly NP-Hard on Unary Datasets

이진 문자열에서 Pair-Merge 토큰화는 근사하기 어렵고, 단항 데이터셋에서는 강한 의미의 NP-난해이다

Kundan Baliga, Aiden Xie, Aditya Byju · arXiv · 2026년 11월 10일

- **연구 문제** BPE형 병합으로 k번의 병합 후 남는 길이를 다항시간에 근사하는 문제는 얼마나 어려운지 다룹니다.
- **연구 방법** 병합을 문법 규칙으로 보아 정점 덮개 gadget의 문법 크기 차이를 압축 길이 차이로 옮기고, 이진 문자열과 unary 데이터셋에서 하드니스 구성을 만듭니다.
- **주요 결과** 이진 문자열에서는 P≠NP 가정 아래 상수배 근사가 불가능하다고 제시하며, unary 데이터셋 전체 병합 문제는 강한 NP-완전으로 제시합니다.

![Table 2: Notation for Sections 2 to 4](https://refivu.com/papers/7b59982c-1b8e-455b-a8a8-a893b6f95b07/figures/figure-217baf58aa202c4e7fb32210f1a7b7b7.png?thumb=512)

**Table 2** : Notation for Sections 2 to 4.

[원문](https://arxiv.org/abs/2611.13568v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Kundan Baliga, Aiden Xie, Aditya Byju · Pair-Merge Tokenisation Is Hard to Approximate on Binary Strings and Strongly NP-Hard on Unary Datasets · 원문 그림 인용 · 원본 PDF 5쪽에서 그림 영역을 추출했습니다.

## 토큰화 병합의 근사 문제

BPE 같은 토크나이저는 문자열에서 인접한 한 쌍의 기호를 새 기호로 반복 병합하여 토큰 수를 줄입니다. 본 논문은 병합 예산 k가 주어졌을 때 k번의 병합 후 남는 길이를 최소화하는 문제가 다항시간에 근사 가능한지를 묻습니다. 기준선인 아무 병합도 하지 않는 방법은 n배 근사가 됩니다. 저자들은 이 질문을 이진 문자열과 unary 데이터셋에서 다룹니다. 원문은 full merge(모든 출현을 병합)와 partial merge(선택한 출현만 병합)를 구분하고, 두 방식의 최적화 문제 이름을 OMS와 OPE로 제시합니다.

## 병합과 문법 크기의 연결

핵심 아이디어는 k번의 병합이 k개의 규칙을 가진 문법으로 볼 수 있다는 점입니다. 각 병합 (a,b)→X는 규칙 X→ab에 대응합니다. 따라서 문법 크기 g(s)가 충분히 크면 k번의 병합 후 남는 길이도 크게 남습니다. 원문의 Lemma 1은 g(s)≤k+ℓ−1을 보이며, 이로부터 LEN\_part(s,k)≥g(s)−k+1이 따릅니다. 반대로 Lemma 2는 partial merge가 임의의 문법을 실현할 수 있음을 보입니다. full merge는 원하지 않는 출현까지 병합하므로 이 역방향이 성립하지 않아 명시적인 스케줄을 직접 설계해야 합니다.

## 이진 문자열의 증폭과 full merge 스케줄

이진 하드니스는 정점 덮개 gadget 문자열을 affine 복사본 t개로 증폭하고, 각 문자를 앵커를 가진 이진 부호어로 인코딩하는 방식으로 구성됩니다. 복사본 사이의 인접 쌍이 겹치지 않으므로 문법 크기 차이가 복사본 수만큼 더해집니다. 예산은 C\_code와 t(R(\|S\|)+3)−1의 합으로 주어집니다.

## unary 데이터셋의 scaffold와 AND gadget

unary 부분은 수를 길이로 나타내는 데이터셋을 구성합니다. 정점마다 Sidon 집합의 원소를 할당하고, scaffold 수들을 여러 번 반복해 최적해가 scaffold를 먼저 만들도록 강제합니다. 간선 문자열은 두 끝점의 덮개 토큰 합으로 표현되며, 비용이 2에 이르는 것은 두 끝점이 모두 선택된 경우에만 가능하도록 설계됩니다. 원문은 이를 OPE-seg 설정에서 도달 가능한 병합(두 부분이 이미 토큰)으로 해석합니다. full merge 쪽에서는 bit 구조와 AND gadget을 사용하여 balanced biclique에서 환원합니다.

## Karp 환원의 장벽과 근사 상한

partial merge의 경우 블록 기반 trie 알고리즘은 O(n/log log n) 근사를 달성합니다. 저자들은 full merge에 대해서는 이보다 약한 O(n/(log log n)^{log3 2}) 근사를 제시합니다. 또한 Karp 환원으로 n/log n보다 큰 비율의 하드니스를 증명하면 coNP⊆NP/poly가 된다는 장벽 결과를 보입니다. 이 장벽은 Karp 환원에만 적용되며 튜링 환원이나 다른 가정에는 적용되지 않는다고 원문이 명시합니다.

## 적용 범위와 한계

하드 인스턴스는 k=Θ(n/log n) 규모의 큰 병합 예산에서 구성되며, 그때 yes 경우는 문자열 전체를 한 토큰으로 줄입니다. 원문은 이것이 실제 자연어에서 BPE가 나쁘게 동작함을 뜻하지 않는다고 명시합니다. 또한 unary 결과는 반복 문자열을 포함하는 데이터셋을 가정하며, 사전 토큰화된 코퍼스와 직접 토큰화(direct tokenisation)는 다루지 않습니다. 상수 c⋆는 명시되지 않은 비명시 상수입니다.

## 논문 정보

- **저자**: Kundan Baliga, Aiden Xie, Aditya Byju
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2026년 11월 10일
- **등록일**: 2026년 11월 11일
- **수정일**: 2026년 11월 10일
- **버전**: v1
- **arXiv**: 2611.13568
- **분류**: cs.DS · cs.CC · cs.CL
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2611.13568v1) · [원문 PDF ↗](https://arxiv.org/pdf/2611.13568v1)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 초록

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.

## 원문 인용

Kundan Baliga, Aiden Xie, Aditya Byju (2026). Pair-Merge Tokenisation Is Hard to Approximate on Binary Strings and Strongly NP-Hard on Unary Datasets. arXiv:2611.13568v1. https://arxiv.org/abs/2611.13568v1

**BibTeX**

```
@misc{baliga2026pair,
  title = {{Pair-Merge Tokenisation Is Hard to Approximate on Binary Strings and Strongly NP-Hard on Unary Datasets}},
  author = {Kundan Baliga and Aiden Xie and Aditya Byju},
  year = {2026},
  eprint = {2611.13568},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.13568v1}
}
```

## 이 논문의 용어

- [byte-pair encoding](https://refivu.com/terms/597b3d437095-byte-pair-encoding)
- [Vertex Cover](https://refivu.com/terms/a5583d6606ae-vertex-cover)

## 다른 논문 해설

- [Are Dense Rewards Worth Their Tokens in GRPO?](https://refivu.com/papers/abf8fc47-48da-4cd4-a432-583d9b836d54-are-dense-rewards-worth-their-tokens-in-grpo.md)
- [The Indic Token Tax in 2026: Measuring Tokenizer. Disparity and Its Cost for the Languages of India](https://refivu.com/papers/94ad0eca-69d1-49c3-a2dd-49e3e35883a8-the-indic-token-tax-in-2026-measuring-tokenizer.md)
- [The Left Ripple of Byte-Pair Encoding: Certified Lookbehind for Every Dictionary](https://refivu.com/papers/8d3f090d-d15c-460b-8290-9facad800903-the-left-ripple-of-byte-pair-encoding-certified.md)
- [A Lattice-Based HMM Approach to Aruz Scansion of Ottoman Poetry](https://refivu.com/papers/81004ad8-5641-430f-b487-3d295b983eee-a-lattice-based-hmm-approach-to-aruz-scansion.md)
- [Can Frontier Auto Researchers Reconstruct Human Research Decisions in AI?](https://refivu.com/papers/0c85bfc9-bf64-4283-91a0-a827acd3a1ad-can-frontier-auto-researchers-reconstruct-human-research.md)
- [A Large-Scale Dataset for Cross-Lingual Multi-Jurisdiction Patent Drafting from Patent Cooperation Treaty Applications](https://refivu.com/papers/5da56620-dd4e-4ab2-b4cf-3eeb73bf7ec4-a-large-scale-dataset-for-cross-lingual-multi.md)
- [Deterministic, Reproducible Inference in Exact Integer Arithmetic, and Verifiable Distributed Inference as Its Consequence](https://refivu.com/papers/bbc05d6a-b90f-48ab-8b5d-837eb7a6793f-deterministic-reproducible-inference-in-exact-integer.md)
- [How Post-Training Influences Verbalized Algorithmic Computation in Language Models](https://refivu.com/papers/c2f0c796-ac4e-4e6c-bad7-290457e1c07c-how-post-training-influences-verbalized-algorithmic.md)
- [The RSI Tax: When Recursive Self-Improvement Is Not Worth the Cost](https://refivu.com/papers/27ca4d33-7272-4984-ad0f-113af313d3b6-the-rsi-tax-when-recursive-self-improvement-is.md)
- [Agent Benchmarks Stop Ranking Before They Run Out of Tasks](https://refivu.com/papers/42042bb7-8dd7-415d-a486-d8889c934fed-agent-benchmarks-stop-ranking-before-they-run-out.md)
- [Exploiting Feature-invariant Scaling Laws for Efficient A/B Experimentation in Recommendation Systems](https://refivu.com/papers/6e38f1ed-f74b-4d73-bc72-ca40a3366223-exploiting-feature-invariant-scaling-laws-for-efficient-a.md)
- [A Functional Preservation Score for Auditing Connectome Operations: Compression, Alignment, Transport, and Local-Rule Writing](https://refivu.com/papers/544d626f-a968-4489-9915-c3d496900508-a-functional-preservation-score-for-auditing-connectome.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/7b59982c-1b8e-455b-a8a8-a893b6f95b07-pair-merge-tokenisation-is-hard-to-approximate-on)
