arXiv:2610.39482cs.DSOct 2026

Manuscript Offprint

arXiv:2610.39482

Substring Complexity in BWT-Runs Bounded Space

Johannes Fischer

Abstract

Given a string T[1..n]T[1..n], its substring complexity is defined as δ=max⁡kdk/k\delta = \max_k d_k/k, where dkd_k is the number of its distinct substrings of length kk in TT. We show how to compute it in O(n+rlog⁡r)O(n + r \log r) time, using only O(r)O(r) words of space, where rr denotes the number of runs in the Burrows-Wheeler transform.

1 Introduction

Given a string T[1..n]T[1..n], its substring complexity [CEK+21,RRRS13][CEK^{+}21, RRRS13] is defined as δ=max⁡kdk/k\delta = \max_k d_k/k, where dkd_k is the number of its distinct substrings in TT of length k≥1k \geq 1. It is by now an accepted measure of the compressibility of a string [Nav21][Nav21], with many pleasant properties [BCC+24][BCC^{+}24]. Kociumaka et al. [KNP23][KNP23] show that δ\delta (and all dkd_k's) can be computed in O(n)O(n) time from the array of longest common prefix [KLA+01][KLA^{+}01].

We show that δ\delta can be computed in space O(r)O(r) and in O(n+rlog⁡r)O(n + r \log r) time, where rr denotes the number of runs in the Burrows-Wheeler transform. Computing compressibility measures (such as δ\delta) in compressed space is an important subject, as it allows us to decide if a potentially very large text is compressible or not, without using O(n)O(n) space.