arXiv:2611.02969cs.DSNov 2026

Manuscript Offprint

arXiv:2611.02969

Revisiting (Bijective) Burrows-Wheeler Transform Space-Time Trade-Off Constructions

Dominik Köppl, Tomohiro I

Abstract

The bijective Burrows–Wheeler transform (BBWT) replaces the delimiter of the ordinary BWT by a Lyndon factorization and sorts factor conjugates in ω\omega-order. It admits quadratic-time constant-workspace algorithms and linear-time linear-space algorithms.

We extend the small-space BWT trade-off of Crochemore et al. [JDA,'15] to the BBWT and accelerate both constructions. For τ∈[3..n]\tau \in [3..n], let στ≤min⁡(σ,τ+1)\sigma_\tau \leq \min(\sigma, \tau + 1) be the maximum construction-batch alphabet size. We construct either transform in O(n2τlog⁡τlog⁡log⁡τ)O\left(\frac{n^2}{\tau} \frac{\log \tau}{\log \log \tau}\right) time and O(τστ)O(\tau \sigma_\tau) additional space, assuming τστ=O(n)\tau \sigma_\tau = O(n). This improves the transferred O((n2/τ)log⁡τ)O((n^2/\tau) \log \tau) bound by a log⁡log⁡τ\log \log \tau factor. If στ∈wO(1)\sigma_\tau \in w^{O(1)}, where w∈Ω(log⁡n)w \in \Omega(\log n) is the word size, the time improves to O(n2τ+nlog⁡τlog⁡log⁡τ)O\left(\frac{n^2}{\tau} + \frac{n \log \tau}{\log \log \tau}\right). For inversion, the same bounds hold with the global alphabet size σ\sigma in place of στ\sigma_\tau.

1 Introduction

The Burrows–Wheeler transform (BWT) [3] is central to text compression and indexing. Its bijective variant (BBWT), introduced by Gil and Scott (see [2]), needs no delimiter: it sorts the conjugates of the text's Lyndon factors in ω\omega-order. Construction must therefore respect both factor boundaries and cyclic order. Linear-time, linear-space constructions are known for both transforms [1, 12, 14].

The in-place algorithm of Köppl et al. [9] processes Lyndon factors from left to right, inserting each factor's letters from right to left. We realize this order by reversing each factor in place. Except for the first letter of a factor, each new letter is inserted immediately after the position returned by LF. Naive LF queries give O(n2)O(n^2) time and O(1)O(1) workspace.

For the ordinary BWT, Crochemore et al. [4, Thm. 3] give a trade-off: for k≤nk \leq n, construction and inversion take O((n2/k+n)log⁡k)O((n^2/k + n) \log k) time in the comparison model using O(kσ~k)O(k\tilde{\sigma}_k) additional memory cells, where σ~k≤min⁡(∣Σ∣,k)\tilde{\sigma}_k \leq \min(|\Sigma|, k) denotes the maximum number of distinct letters in any length-kk substring of the input text. da Louza et al. [6] extended this trade-off to simultaneous construction of the BWT and LCP array without changing the asymptotic bounds. We extend the construction trade-off to the BBWT (Thm. 3.2) and improve both constructions (Thm. 8.4). Our construction parameter στ\sigma_\tau counts letters in a prepared batch, which need not be contiguous in the original text; Lemma 3.1 relates it to σ~τ\tilde{\sigma}_\tau. For inversion we use the global alphabet size σ\sigma.

Other BWT construction algorithms use different space models: Kempa and Kociumaka [8] obtain sublinear time on packed binary strings, while Olbrich [13] construct the BWT from Lyndon grammars of repetitive texts. Neither uses our in-place letter-cell model.

The key observation is that the Lyndon factorization changes only the insertion schedule. Once the schedule is fixed, the BBWT construction uses the same insertions and LF queries as the BWT construction, so both admit the same batch-and-breakpoint structure (BBS) representation [4].

The BBS resembles a bounded piece table [5, 11] of general text editors: the piece table keeps the current transform static and records pending one-letter insertions separately. Unlike a general text editor, it stores at most τ\tau pending edits, materializes them after each batch, and maintains the letter counts needed for rank and LF.

Useful parameter range. To get sublinear space we need the condition that τστ=o(n)\tau\sigma_{\tau}=o(n). Since στ≤min⁡(σ,τ+1)\sigma_{\tau}\leq \min(\sigma,\tau+1), the stronger condition τmin⁡(σ,τ)=o(n)\tau\min(\sigma,\tau)=o(n) suffices in the worst case; it is not necessary for texts with smaller batch alphabets. For τ=ω(n)\tau=\omega(\sqrt{n}), sublinear space in particular requires στ=o(n/τ)\sigma_{\tau}=o(n/\tau).

For smaller τ\tau, even a sorted array of pending breakpoints suffices: if each update takes O(τ)O(\tau) and scanning a static letter costs tlookupt_{\mathrm{lookup}}, the total time is O((n2/τ)tlookup+nτ)O((n^2/\tau)t_{\mathrm{lookup}}+n\tau). Thus, τ=O(n)\tau=O(\sqrt{n}) makes the nτn\tau term negligible.