Abstract
We present two modifications of Duval’s algorithm for computing the Lyndon factorization of a string. One of the algorithms has been designed for strings containing runs of the smallest character. It works best for small alphabets and it is able to skip a significant number of characters of the string. Moreover, it can be engineered to have linear time complexity in the worst case. When there is a run-length encoded string R of length ρ , the other algorithm computes the Lyndon factorization of R in O ( ρ ) time and in constant space. It is shown by experimental results that the new variations are faster than Duval’s original algorithm in many scenarios.
Highlights
A string w is a rotation of another string w0 if w = uv and w0 = vu, for some strings u and v
We presented new variations of Duval’s algorithm for computing the Lyndon factorization of a string
The first algorithm LF- SKIP was designed for strings containing runs of the smallest character in the alphabet and it is able to skip a significant portion of the characters of the string
Summary
The Burrows-Wheeler transform is an invertible transformation of a string, based on sorting of its rotations, while the suffix array is a lexicographically sorted array of the suffixes of a string They are the groundwork for many indexing and data compression methods. Duval’s algorithm [5] computes the Lyndon factorization in linear time and in constant space. When there is a run-length encoded string R of length ρ, our algorithm computes the Lyndon factorization of R in O(ρ) time and in constant space. This variation is preferable to Duval’s algorithm when the strings are stored or maintained with run-length encoding.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have