Abstract
In this paper, we define the Range LCP problem as follows. Preprocess a string S, of length n, to enable efficient solutions of the following query: Given [i,j], 0<i≤j≤n, compute maxℓ,k[i..j]LCP(S ℓ,Sk), where LCP(Sℓ,Sk) is the length of the longest common prefix of the suffixes of S starting at locations ℓ and k. This is a natural generalization of the classical LCP problem. We provide algorithms with the following complexities: Preprocessing Time: O(|S|), Space: O(|S|), Query Time: O(|j-i|loglogn).Preprocessing Time: none, Space: O(|j-i|log|j-i|), Query Time: O(|j-i|log|j-i|). However, the query just gives the pairs with the longest LCP, not the LCP itself.Preprocessing Time: O(|S|log2|S|), Space: O(|S|log1+ε|S|) for arbitrary small constant ε, Query Time: O(loglog|S|).
Original language | English |
---|---|
Pages (from-to) | 1245-1253 |
Number of pages | 9 |
Journal | Journal of Computer and System Sciences |
Volume | 80 |
Issue number | 7 |
DOIs | |
State | Published - Nov 2014 |
Keywords
- Data structures
- LCP
- Pattern matching
ASJC Scopus subject areas
- Theoretical Computer Science
- General Computer Science
- Computer Networks and Communications
- Computational Theory and Mathematics
- Applied Mathematics