an:06804524
Zbl 1375.68230
Biswas, Sudip; Ku, Tsung-Han; Shah, Rahul; Thankachan, Sharma V.
Position-restricted substring searching over small alphabets
EN
J. Discrete Algorithms 46-47, 36-39 (2017).
00371679
2017
j
68W32 68P20
string searching; text indexing; orthogonal range reporting; pattern matching
Summary: We consider the problem of indexing a given text \(T[0\ldots n-1]\) of \(n\) characters over an alphabet set \(\Sigma\) of size \(\sigma\), in order to answer the position-restricted substring searching queries. The query input consists of a pattern \(P\) (of length \(p\)) and two indices \(\ell\) and \(r\) and the output is the set of all \(\mathrm{occ}_{\ell,r}\) occurrences of \(P\) in \(T[\ell \ldots r]\). In this paper, we propose an \(O(n\log \sigma)\)-word space index with \(O(p+\mathrm{occ}_{\ell,r}\log \log n)\) query time. Our solution is interesting when the alphabet size is small. For example, when the alphabet set is of constant size, we achieve significant improvement over the previously best-known linear space index by \textit{Y. Nekrich} and \textit{G. Navarro} [Lect. Notes Comput. Sci. 7357, 271--282 (2012; Zbl 1347.68343)] with \(O(p+\mathrm{occ}_{\ell,r}\log^\epsilon n)\) query time, where \(\epsilon>0\) is an arbitrarily small positive constant.
Zbl 1347.68343