Counting Distinct Patterns in Internal Dictionary Matching
Abstract
We consider the problem of preprocessing a text of length and a dictionary in order to be able to efficiently answer queries , that is, given and return the number of patterns from that occur in the fragment . The dictionary is internal in the sense that each pattern in is given as a fragment of . This way, the dictionary takes space proportional to the number of patterns rather than their total length, which could be . An -size data structure that answers queries -approximately in time was recently proposed in a work that introduced internal dictionary matching [ISAAC 2019]. Here we present an -size data structure that answers queries -approximately in time. Using range queries, for any , we give an -size data structure that answers queries exactly in time. We also consider the special case when the dictionary consists of all square factors of the string. We design an -size data structure that allows us to count distinct squares in a text fragment in time.
Keywords
Cite
@article{arxiv.2005.05681,
title = {Counting Distinct Patterns in Internal Dictionary Matching},
author = {Panagiotis Charalampopoulos and Tomasz Kociumaka and Manal Mohamed and Jakub Radoszewski and Wojciech Rytter and Juliusz Straszyński and Tomasz Waleń and Wiktor Zuba},
journal= {arXiv preprint arXiv:2005.05681},
year = {2020}
}
Comments
Accepted to CPM 2020