[Paper Review] Computing Lempel-Ziv Factorization Online
This paper presents an online algorithm for computing the Lempel-Ziv factorization of a string in O(n log²n) time and O(n log σ) bits of space, using a sparse suffix tree and wavelet trees to efficiently update the factorization every r = O(logσ n) characters. The method supports incremental updates with a favorable time-space trade-off, enabling practical use in large-scale data processing.
We present an algorithm which computes the Lempel-Ziv factorization of a word $W$ of length $n$ on an alphabet $Σ$ of size $σ$ online in the following sense: it reads $W$ starting from the left, and, after reading each $r = O(\log_σ n)$ characters of $W$, updates the Lempel-Ziv factorization. The algorithm requires $O(n \log σ)$ bits of space and O(n \log^2 n) time. The basis of the algorithm is a sparse suffix tree combined with wavelet trees.
Motivation & Objective
- To design an online algorithm that incrementally computes the Lempel-Ziv factorization of a string with reduced update frequency.
- To achieve a practical time-space trade-off by updating the factorization every r = O(logσ n) characters instead of after each character.
- To maintain O(n log σ) bits of space while ensuring the total running time remains within O(n log²n).
- To support efficient dynamic updates using compressed data structures like wavelet trees and sparse suffix trees.
- To provide a scalable solution suitable for large-scale data processing where full offline computation is infeasible.
Proposed method
- The algorithm processes the input string in blocks of size r = O(logσ n), updating the factorization only after each block.
- It uses a sparse suffix tree over meta-characters formed from blocks of r characters to represent substrings efficiently.
- Wavelet trees are employed to maintain the Burrows-Wheeler transform (BWT) and support rank/select operations in O(log²n) time per update.
- A dynamic data structure maintains the suffix tree and associated tries at each internal node, enabling efficient substring searches.
- The algorithm combines Ukkonen’s online suffix tree construction with wavelet tree updates to support incremental factorization.
- Two procedures are used: P_<r for short factors (|fi| < r) and P_≥r for longer factors, with the latter relying on the sparse suffix tree for pattern matching.
Experimental results
Research questions
- RQ1Can the Lempel-Ziv factorization be computed online with a reduced update frequency while maintaining subquadratic time complexity?
- RQ2Is it possible to achieve O(n log σ) bits of space while supporting incremental updates to the factorization?
- RQ3How can wavelet trees and sparse suffix trees be combined to support efficient dynamic factorization with O(log²n) time per update?
- RQ4What is the optimal block size r that balances update frequency and total running time in online LZ factorization?
- RQ5Can the factorization be maintained in a way that supports both space efficiency and practical performance on large strings?
Key findings
- The algorithm computes the Lempel-Ziv factorization in O(n log²n) time and O(n log σ) bits of space, achieving a favorable time-space trade-off.
- The use of meta-characters formed from blocks of r = O(logσ n) characters enables efficient indexing and pattern matching over substrings.
- The sparse suffix tree over meta-characters allows for efficient detection of repeated substrings, which is essential for LZ factorization.
- Wavelet trees support rank and select operations in O(log²n) time, enabling efficient navigation and updates in the dynamic data structure.
- The total time complexity is dominated by wavelet tree updates, which contribute O(n log²n) time due to O(n/r) updates, each taking O(log²n) time.
- The algorithm can be adapted to an online setting where the factorization is updated after each block of r characters, maintaining the same asymptotic bounds.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.