Computing Longest Previous Factor in linear time and applications
We give two optimal linear-time algorithms for computing the Longest Previous Factor ( LPF ) array corresponding to a string w. For any position i in w, LPF [ i ] gives the length of the longest factor of w starting at position i that occurs previously in w. Several properties and applications of LP...
Saved in:
Published in | Information processing letters Vol. 106; no. 2; pp. 75 - 80 |
---|---|
Main Authors | , |
Format | Journal Article |
Language | English |
Published |
Amsterdam
Elsevier B.V
15.04.2008
Elsevier Science Elsevier Sequoia S.A Elsevier |
Subjects | |
Online Access | Get full text |
Cover
Loading…
Summary: | We give two optimal linear-time algorithms for computing the Longest Previous Factor (
LPF
) array corresponding to a string
w. For any position
i in
w,
LPF
[
i
]
gives the length of the longest factor of
w starting at position
i that occurs previously in
w. Several properties and applications of
LPF
are investigated. They include computing the Lempel–Ziv factorization of a string and detecting all repetitions (runs) in a string in linear time independently of the integer alphabet size. |
---|---|
ISSN: | 0020-0190 1872-6119 |
DOI: | 10.1016/j.ipl.2007.10.006 |