Tokenisation is NP-Complete

Philip Whittington, Gregor Bachmann, Tiago Pimentel


Abstract
In this work, we prove the NP-completeness of two variants of tokenisation, defined here as the problem of compressing a dataset to at most 𝛿 symbols by either finding a vocabulary directly (_direct_ tokenisation), or selecting a sequence of merge operations (_bottom-up_ tokenisation).
Anthology ID:
2025.acl-long.1365
Volume:
Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)
Month:
July
Year:
2025
Address:
Vienna, Austria
Editors:
Wanxiang Che, Joyce Nabende, Ekaterina Shutova, Mohammad Taher Pilehvar
Venue:
ACL
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
28133–28153
Language:
URL:
https://preview.aclanthology.org/ingestion-acl-25/2025.acl-long.1365/
DOI:
Bibkey:
Cite (ACL):
Philip Whittington, Gregor Bachmann, and Tiago Pimentel. 2025. Tokenisation is NP-Complete. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 28133–28153, Vienna, Austria. Association for Computational Linguistics.
Cite (Informal):
Tokenisation is NP-Complete (Whittington et al., ACL 2025)
Copy Citation:
PDF:
https://preview.aclanthology.org/ingestion-acl-25/2025.acl-long.1365.pdf