## Abstract

The dictionary matching with gaps problem is to preprocess a dictionary D of d gapped patterns P _{1},...,P _{d} over alphabet ∑, where each gapped pattern P _{i} 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 P_{i} ∈ 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 log d+D) time and O(dlog ^{ε} d+D) space, and query time O(n(β-α)loglogd log ^{2} min { d, log D }+occ), where occ is the number of patterns found, or preprocessing time: O(d^{2} ovr+ D ), where ovr is the maximal number of subpatterns including each other as a prefix or as a suffix, space: O(d ^{2}+ 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.

Original language | English |
---|---|

Title of host publication | Combinatorial Pattern Matching - 25th Annual Symposium, CPM 2014, Proceedings |

Publisher | Springer Verlag |

Pages | 11-20 |

Number of pages | 10 |

ISBN (Print) | 9783319075655 |

DOIs | |

State | Published - 2014 |

Event | 25th Annual Symposium on Combinatorial Pattern Matching, CPM 2014 - Moscow, Russian Federation Duration: 16 Jun 2014 → 18 Jun 2014 |

### Publication series

Name | Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) |
---|---|

Volume | 8486 LNCS |

ISSN (Print) | 0302-9743 |

ISSN (Electronic) | 1611-3349 |

### Conference

Conference | 25th Annual Symposium on Combinatorial Pattern Matching, CPM 2014 |
---|---|

Country/Territory | Russian Federation |

City | Moscow |

Period | 16/06/14 → 18/06/14 |

### Bibliographical note

Funding Information:This research was supported by the Kabarnit Cyber consortium funded by the Chief Scientist in the Israeli Ministry of Economy under the Magnet Program.