Dictionary Matching with One Gap

Abstract

The dictionary matching with gaps problem is to preprocess a dictionary D of d gapped patterns P1,…,Pd over 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 alphabet , 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 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(d d + |D|) time and O(d d + |D|) space, and query time O(n(β -α ) d 2 \ d, |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. As far as we know, this is the best solution for this setting of the problem, where many overlaps may exist in the dictionary.

0

Turn this paper into a lesson

ArcXiv compiles a structured reading guide from this paper's metadata: plain-English importance, contributions, prerequisite concepts, which sections to read first, flashcards, and a quiz. Grounded in the abstract, never invented.

Discussion (0)

Sign in to join the discussion.

Loading comments…