paper

Counting Distinct Patterns in Internal Dictionary Matching

arXiv:2005.05681

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.

Accepted to CPM 2020

Counting Distinct Patterns in Internal Dictionary Matching · wovepaper