Contextual Pattern Matching
Abstract
The research on indexing repetitive string collections has focused on the same search problems used for regular string collections, though they can make little sense in this scenario. For example, the basic pattern matching query "list all the positions where pattern appears" can produce huge outputs when appears in an area shared by many documents. All those occurrences are essentially the same. In this paper we propose a new query that can be more appropriate in these collections, which we call {\em contextual pattern matching}. The basic query of this type gives, in addition to , a context length , and asks to report the occurrences of all {\em distinct} strings , with . While this query is easily solved in optimal time and linear space, we focus on using space related to the repetitiveness of the text collection and present the first solution of this kind. Letting be the maximum of the number of runs in the BWT of the text and of its reverse, our structure uses space and finds the contextual occurrences of in time . We give other space/time tradeoffs as well, for compressed and uncompressed indexes.
Cite
@article{arxiv.2010.07076,
title = {Contextual Pattern Matching},
author = {Gonzalo Navarro},
journal= {arXiv preprint arXiv:2010.07076},
year = {2020}
}
Comments
Improvements and corrections over my SPIRE 2020 paper with the same title