Mind the gap: Essentially optimal algorithms for online dictionary matching with one gap

Amihood Amir, Tsvi Kopelowitz, Avivit Levy, Seth Pettie, Ely Porat, B. Riva Shalom

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

15 Scopus citations

Abstract

We examine the complexity of the online Dictionary Matching with One Gap Problem (DMOG) which is the following. Preprocess a dictionary D of d patterns, where each pattern contains a special gap symbol that can match any string, so that given a text that arrives online, a character at a time, we can report all of the patterns from D that are suffixes of the text that has arrived so far, before the next character arrives. In more general versions the gap symbols are associated with bounds determining the possible lengths of matching strings. Online DMOG captures the difficulty in a bottleneck procedure for cyber-security, as many digital signatures of viruses manifest themselves as patterns with a single gap. In this paper, we demonstrate that the difficulty in obtaining efficient solutions for the DMOG problem, even in the offline setting, can be traced back to the infamous 3SUM conjecture. We show a conditional lower bound of Ω(δ(GD)+op) time per text character, where GD is a bipartite graph that captures the structure of D, δ(GD) is the degeneracy of this graph, and op is the output size. Moreover, we show a conditional lower bound in terms of the magnitude of gaps for the bounded case, thereby showing that some known offline upper bounds are essentially optimal. We also provide matching upper-bounds (up to sub-polynomial factors), in terms of the degeneracy, for the online DMOG problem. In particular, we introduce algorithms whose time cost depends linearly on δ(GD). Our algorithms make use of graph orientations, together with some additional techniques. These algorithms are of practical interest since although δ(GD) can be as large as √d, and even larger if GD is a multi-graph, it is typically a very small constant in practice. Finally, when α(GD) is large we are able to obtain even more efficient solutions.

Original languageEnglish
Title of host publication27th International Symposium on Algorithms and Computation, ISAAC 2016
EditorsSeok-Hee Hong
PublisherSchloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing
Pages12.1-12.12
ISBN (Electronic)9783959770262
DOIs
StatePublished - 1 Dec 2016
Event27th International Symposium on Algorithms and Computation, ISAAC 2016 - Sydney, Australia
Duration: 12 Dec 201614 Dec 2016

Publication series

NameLeibniz International Proceedings in Informatics, LIPIcs
Volume64
ISSN (Print)1868-8969

Conference

Conference27th International Symposium on Algorithms and Computation, ISAAC 2016
Country/TerritoryAustralia
CitySydney
Period12/12/1614/12/16

Bibliographical note

Publisher Copyright:
© Amihood Amir, Tsvi Kopelowitz, Avivit Levy, Seth Pettie,Ely Porat, and B. Riva Shalom.

Keywords

  • 3SUM
  • Dictionary matching
  • Pattern matching
  • Triangle reporting

Fingerprint

Dive into the research topics of 'Mind the gap: Essentially optimal algorithms for online dictionary matching with one gap'. Together they form a unique fingerprint.

Cite this