Logo image
A linear-space data structure for range-LCP queries in poly-logarithmic time
期刊文章   同儕審查

A linear-space data structure for range-LCP queries in poly-logarithmic time

Paniz Abedin, Arnab Ganguly, Wing-Kai Hon, Kotaro Matsuda, Yakov Nekrich, Kunihiko Sadakane, Rahul Shah 和 Sharma V. Thankachan
Theoretical Computer Science
2020

摘要

Heavy path decomposition Range query Suffix tree Theoretical Computer Science Computer Science (all)
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 is rlcp(α,β)=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(nlog <sup>1+ϵ</sup> ⁡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 <sup>ϵ</sup> ⁡δ). 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(log <sup>1+ϵ</sup> ⁡n) and construction time O(nlog⁡n).

相關連結

指標

1 檢視次數

詳細資料

Logo image