# Efficient Lempel-Ziv Prediction with the Run-Length BWT

arXiv: https://arxiv.org/abs/2611.01874 · HTML: https://mlsanity.com/paper/2611.01874/

## Key facts

- No citing papers in the map yet (data through 26 Nov 2026).
- Builds on 6 of its 27 references that are in the map.
- Submitted 1 Nov 2026.

## Builds on (most cited first, 6 of 6)

- [Stringological sequence prediction I: efficient algorithms for predicting highly repetitive sequences](https://mlsanity.com/paper/2603.26852/) (2026)
- [Dynamic Integer Sets with Optimal Rank, Select, and Predecessor Search](https://mlsanity.com/paper/1408.3045/) (2014)
- [Dynamic Relative Compression, Dynamic Partial Sums, and Substring Concatenation](https://mlsanity.com/paper/1504.07851/) (2015)
- [Compressed Data Structures for Dynamic Sequences](https://mlsanity.com/paper/1507.06866/) (2015)
- [An Optimal-Time RLBWT Construction in BWT-runs Bounded Space](https://mlsanity.com/paper/2202.07885/) (2022)
- [Stringological sequence prediction III: layered ziplines and a tradeoff between efficiency and expressivity](https://mlsanity.com/paper/2609.19940/) (2026)

## Abstract (arXiv)

Lempel-Ziv Plurality (LZP) is an algorithm of Kosoy that predicts the next symbol of a string by using its Lempel-Ziv factorization, and makes at most O(zlog n) mistakes on every string of length n with z LZ77 phrases. We give efficient online implementations of LZP and of a new variant of it. Our first implementation maintains a run-length encoded Burrows-Wheeler transform (RLBWT) of the reversed history. It implements LZP, uses O(zlog zlog2 n) bits, and has worst-case update and prediction times O(log z+loglog n) and O(σ(log z+loglog n)), respectively, where σ is the size of the alphabet. This is an exponential improvement over Kosoy's implementation, whose update time is O(zlog7 n). We then introduce the Lempel-Ziv Majority (LZM) predictor, which has the same mistake bound and update time, and predicts in O(1) time independently of σ. These two predictors accept new symbols at any time, without knowing the alphabet in advance. For an alphabet known in advance, a different data structure gives O(σ(1+log z/loglog n)) time per symbol, which is constant when σ=O(1) and z=polylog(n).
