Internal Dictionary Matching

We introduce data structures answering queries concerning the occurrences of patterns from a given dictionary D in fragments of a given string T of length n . The dictionary is internal in the sense that each pattern in D is given as a fragment of T . This way, D takes space proportional to the numb...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Veröffentlicht in:Algorithmica 2021-07, Vol.83 (7), p.2142-2169
Hauptverfasser: Charalampopoulos, Panagiotis, Kociumaka, Tomasz, Mohamed, Manal, Radoszewski, Jakub, Rytter, Wojciech, Waleń, Tomasz
Format: Artikel
Sprache:eng
Schlagworte:
Online-Zugang:Volltext
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:We introduce data structures answering queries concerning the occurrences of patterns from a given dictionary D in fragments of a given string T of length n . The dictionary is internal in the sense that each pattern in D is given as a fragment of T . This way, D takes space proportional to the number of patterns d = | D | rather than their total length, which could be Θ ( n · d ) . In particular, we consider the following types of queries: reporting and counting all occurrences of patterns from D in a fragment T [ i . . j ] and reporting distinct patterns from D that occur in T [ i . . j ] . We show how to construct, in O ( ( n + d ) log O ( 1 ) n ) time, a data structure that answers each of these queries in time O ( log O ( 1 ) n + | o u t p u t | ) . The case of counting patterns is much more involved and needs a combination of a locally consistent parsing with orthogonal range searching. Reporting distinct patterns, on the other hand, uses the structure of maximal repetitions in strings. Finally, we provide tight—up to subpolynomial factors—upper and lower bounds for the case of a dynamic dictionary.
ISSN:0178-4617
1432-0541
DOI:10.1007/s00453-021-00821-y