Dynamic dictionary matching in the online model

Shay Golan, Tomasz Kociumaka, Tsvi Kopelowitz, Ely Porat

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


In the classic dictionary matching problem, the input is a dictionary of patterns D= { P1, P2, …, Pk} and a text T, and the goal is to report all the occurrences in T of every pattern from D. In the dynamic version of the dictionary matching problem, patterns may be either added or removed from D. In the online version of the dictionary matching problem, the characters of T arrive online, one at a time, and the goal is to establish, immediately after every new character arrival, which of the patterns in D are a suffix of the current text. In this paper, we consider the dynamic version of the online dictionary matching problem. For the case where all the patterns have the same length m, we design an algorithm that adds or removes a pattern in (formula presented) time and processes a text character in (formula presented) time, where(formula presented). For the general case where patterns may have different lengths, the cost of adding or removing a pattern P is (formula presented) while the cost per text character is (formula presented), where d= | D| is the number of patterns in D and occ is the size of the output. These bounds improve on the state of the art for dynamic dictionary matching, while also providing online features. All our algorithms are Las-Vegas randomized and the time costs are in the worst-case with high probability. A by-product of our work is a solution for the fringed colored ancestor problem, resolving an open question of Breslauer and Italiano [J. Discrete Algorithms, 2013].

Original languageEnglish
Title of host publicationAlgorithms and Data Structures - 16th International Symposium, WADS 2019, Proceedings
EditorsZachary Friggstad, Mohammad R. Salavatipour, Jörg-Rüdiger Sack
PublisherSpringer Verlag
Number of pages14
ISBN (Print)9783030247652
StatePublished - 2019
Event16th International Symposium on Algorithms and Data Structures, WADS 2019 - Edmonton, Canada
Duration: 5 Aug 20197 Aug 2019

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume11646 LNCS


Conference16th International Symposium on Algorithms and Data Structures, WADS 2019

All Science Journal Classification (ASJC) codes

  • Theoretical Computer Science
  • Computer Science(all)


Dive into the research topics of 'Dynamic dictionary matching in the online model'. Together they form a unique fingerprint.

Cite this