English

Word Break on SLP-Compressed Texts

Data Structures and Algorithms 2025-06-19 v1

Abstract

Word Break is a prototypical factorization problem in string processing: Given a word ww of length NN and a dictionary D={d1,d2,,dK}\mathcal{D} = \{d_1, d_2, \ldots, d_{K}\} of KK strings, determine whether we can partition ww into words from D\mathcal{D}. We propose the first algorithm that solves the Word Break problem over the SLP-compressed input text ww. Specifically, we show that, given the string ww represented using an SLP of size gg, we can solve the Word Break problem in O(gmω+M)\mathcal{O}(g \cdot m^{\omega} + M) time, where m=maxi=1Kdim = \max_{i=1}^{K} |d_i|, M=i=1KdiM = \sum_{i=1}^{K} |d_i|, and ω2\omega \geq 2 is the matrix multiplication exponent. We obtain our algorithm as a simple corollary of a more general result: We show that in O(gmω+M)\mathcal{O}(g \cdot m^{\omega} + M) time, we can index the input text ww so that solving the Word Break problem for any of its substrings takes O(m2logN)\mathcal{O}(m^2 \log N) time (independent of the substring length). Our second contribution is a lower bound: We prove that, unless the Combinatorial kk-Clique Conjecture fails, there is no combinatorial algorithm for Word Break on SLP-compressed strings running in O(gm2ϵ+M)\mathcal{O}(g \cdot m^{2-\epsilon} + M) time for any ϵ>0\epsilon > 0.

Keywords

Cite

@article{arxiv.2503.23759,
  title  = {Word Break on SLP-Compressed Texts},
  author = {Rajat De and Dominik Kempa},
  journal= {arXiv preprint arXiv:2503.23759},
  year   = {2025}
}

Comments

Accepted to DCC 2025

R2 v1 2026-06-28T22:40:04.034Z