Abstract

The dictionary matching with gaps problem is to preprocess a dictionary D of total size |D| containing d gapped patterns P1,…,Pd over an alphabet Σ, 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 Σ, the goal is to output all locations in T in which a pattern Pi∈D, 1≤i≤d, 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 or a few gaps with at least α and at most β don't cares, where α and β are given parameters. Specifically, we show that the dictionary matching with a single gap problem can be solved in either O(dlog⁡d+|D|) preprocessing time and O(dlogε⁡d+|D|) space, and query time O(n(β−α)log⁡log⁡dlog2⁡|D|+occ), where occ is the number of patterns found, or preprocessing time and space: O(d2+|D|), and query time O(n(β−α)+occ), where occ is the number of patterns found. We also show that the dictionary matching with k gaps problem, where k≥1, can be solved in preprocessing time: O(|D|log⁡|D|), space: O(|D|+d(c1log⁡d)kk!), and query time: O((β−α)k(n+(c2log⁡d)kk!log⁡log⁡|D|)+occ), where c1,c2>1 are constants and occ is the number of patterns found. As far as we know, these are the best solutions for this setting of the problem, where many overlaps may exist in the dictionary.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.