String Indexing for Top-$k$ Close Consecutive Occurrences
Abstract
The classic string indexing problem is to preprocess a string into a compact data structure that supports efficient subsequent pattern matching queries, that is, given a pattern string , report all occurrences of within . In this paper, we study a basic and natural extension of string indexing called the string indexing for top- close consecutive occurrences problem (SITCCO). Here, a consecutive occurrence is a pair , , such that occurs at positions and in and there is no occurrence of between and , and their distance is defined as . Given a pattern and a parameter , the goal is to report the top- consecutive occurrences of in of minimal distance. The challenge is to compactly represent while supporting queries in time close to the length of and . We give three time-space trade-offs for the problem. Let be the length of , the length of , and . Our first result achieves space and optimal query time of . Our second and third results achieve linear space and query times either or . Along the way, we develop several techniques of independent interest, including a new translation of the problem into a line segment intersection problem and a new recursive clustering technique for trees.
Cite
@article{arxiv.2007.04128,
title = {String Indexing for Top-$k$ Close Consecutive Occurrences},
author = {Philip Bille and Inge Li Gørtz and Max Rishøj Pedersen and Eva Rotenberg and Teresa Anna Steiner},
journal= {arXiv preprint arXiv:2007.04128},
year = {2024}
}
Comments
Updated to accepted journal version