Abstract

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.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call