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 language | English |
---|---|
Title of host publication | String Processing and Information Retrieval - 22nd International Symposium, SPIRE 2015, Proceedings |
Editors | Simon J. Puglisi, Costas S. Iliopoulos, Emine Yilmaz |
Publisher | Springer Verlag |
Pages | 350-361 |
Number of pages | 12 |
ISBN (Print) | 9783319238258 |
DOIs | |
State | Published - 2015 |
Event | 22nd International Symposium on String Processing and Information Retrieval, SPIRE 2015 - London, United Kingdom Duration: 1 Sep 2015 → 4 Sep 2015 |
Publication series
Name | Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) |
---|---|
Volume | 9309 |
ISSN (Print) | 0302-9743 |
ISSN (Electronic) | 1611-3349 |
Conference
Conference | 22nd International Symposium on String Processing and Information Retrieval, SPIRE 2015 |
---|---|
Country/Territory | United Kingdom |
City | London |
Period | 1/09/15 → 4/09/15 |
Bibliographical note
Publisher Copyright:© Springer International Publishing Switzerland 2015.
Funding
A. Amir—Partly supported by ISF grant 571/14.
Funders | Funder number |
---|---|
Israel Science Foundation | 1147/2011 |
United States-Israel Binational Science Foundation | 2010437 |
Israel Science Foundation | 571/14 |