Abstract

Let T[1,n] be a text of length n and T[i,n] be the suffix starting at position i. Also, for any two strings X and Y, let LCP(X,Y) denote their longest common prefix. The range-LCP of T w.r.t. a range [α,β], where 1≤α<β≤n isrlcp(α,β)=max⁡{|LCP(T[i,n],T[j,n])||i≠jandi,j∈[α,β]} Amir et al. [2] introduced the indexing version of this problem, where the task is to build a data structure over T, so that rlcp(α,β) for any query range [α,β] can be reported efficiently. They proposed an O(nlog1+ϵ⁡n) space structure with query time O(log⁡log⁡n), and a linear space (i.e., O(n) words) structure with query time O(δlog⁡log⁡n), where δ=β−α+1 is the length of the input range and ϵ>0 is an arbitrarily small constant. Later, Patil et al. [5] proposed another linear space structure with an improved query time of O(δlogϵ⁡δ). This poses an interesting question, whether it is possible to answer rlcp(⋅,⋅) queries in poly-logarithmic time using a linear space data structure. In this paper, we settle this question by presenting an O(n) space data structure with query time O(log1+ϵ⁡n) and construction time O(nlog⁡n).

Full Text
Published version (Free)

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