## 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 _{ℓ},S_{k}), where LCP(S_{ℓ},S_{k}) 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
- Computer Networks and Communications
- Computational Theory and Mathematics
- Applied Mathematics