Dictionary matching with a few gaps

From MaRDI portal
Publication:2346375




Abstract: The dictionary matching with gaps problem is to preprocess a dictionary D of d gapped patterns P1,ldots,Pd over alphabet Sigma, where each gapped pattern Pi is a sequence of subpatterns separated by bounded sequences of don't cares. Then, given a query text T of length n over alphabet Sigma, the goal is to output all locations in T in which a pattern PiinD, 1leqileqd, ends. There is a renewed current interest in the gapped matching problem stemming from cyber security. In this paper we solve the problem where all patterns in the dictionary have one gap with at least alpha and at most don't cares, where alpha and are given parameters. Specifically, we show that the dictionary matching with a single gap problem can be solved in either O(dlogd+|D|) time and O(dlogvarepsilond+|D|) space, and query time , where occ is the number of patterns found, or preprocessing time and space: O(d2+|D|), and query time , where occ is the number of patterns found. As far as we know, this is the best solution for this setting of the problem, where many overlaps may exist in the dictionary.









This page was built for publication: Dictionary matching with a few gaps

Report a bug (only for logged in users!)Click here to report a bug for this page (MaRDI item Q2346375)