Range LCP queries revisited

Amihood Amir, Moshe Lewenstein, Sharma V. Thankachan

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

The Range LCP problem is to preprocess a string S[1…n], to enable efficient solutions of the following query: given a range [l, r] as the input, report maxi,j∈{l,…,r} |LCP(Si, Sj)|. Here LCP(Si, Sj) is the longest common prefix of the suffixes of S starting at locations i and j and |LCP(Si, Sj)| is its length. We study a natural extension of this problem, where the query consists of two ranges. Additionally, we allow a bounded number (say k ≥ 0) of mismatches in the LCP computation. Specifically, our task is to report the following when two ranges [ℓ1, r1] and [ℓ2, r2] comes as input: max {ℓ1≤i≤r1,ℓ2≤j≤r2} |LCPk(Si, Sj)| Here LCPk(Si, Sj) is the longest prefix of Si and Sj with at most k mismatches allowed. We show that the queries can be answered in O(k) time using an O(n2/w) space data structure, where w is the word size. We also present space efficient data structures for k = 0 and k = 1. For k = 0, we obtain a linear space data structure with query time O(√n/w logϵ n), where w is the word size and ϵ > 0 is an arbitrarily small constant. For the case k = 1 we obtain an O(n log n) space data structure with query time O(√ n log n). Finally, we give a reduction from Set Intersection to Range LCP queries, suggesting that it will be very difficult to improve our upper bound by more than a factor of O(logϵ n).

Original languageEnglish
Title of host publicationString Processing and Information Retrieval - 22nd International Symposium, SPIRE 2015, Proceedings
EditorsSimon J. Puglisi, Costas S. Iliopoulos, Emine Yilmaz
PublisherSpringer Verlag
Pages350-361
Number of pages12
ISBN (Print)9783319238258
DOIs
StatePublished - 2015
Event22nd International Symposium on String Processing and Information Retrieval, SPIRE 2015 - London, United Kingdom
Duration: 1 Sep 20154 Sep 2015

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume9309

Conference

Conference22nd International Symposium on String Processing and Information Retrieval, SPIRE 2015
Country/TerritoryUnited Kingdom
CityLondon
Period1/09/154/09/15

All Science Journal Classification (ASJC) codes

  • Theoretical Computer Science
  • General Computer Science

Fingerprint

Dive into the research topics of 'Range LCP queries revisited'. Together they form a unique fingerprint.

Cite this