Papers
Topics
Authors
Recent
Search
2000 character limit reached

Efficient Dynamic Dictionary Matching with DAWGs and AC-automata

Published 10 Oct 2017 in cs.DS | (1710.03395v4)

Abstract: The dictionary matching is a task to find all occurrences of patterns in a set DD (called a dictionary) on a text TT. The Aho-Corasick-automaton (AC-automaton) is a data structure which enables us to solve the dictionary matching problem in O(dlogσ)O(d\log\sigma) preprocessing time and O(nlogσ+occ)O(n\log\sigma+occ) matching time, where dd is the total length of the patterns in DD, nn is the length of the text, σ\sigma is the alphabet size, and occocc is the total number of occurrences of all the patterns in the text. The dynamic dictionary matching is a variant where patterns may dynamically be inserted into and deleted from DD. This problem is called semi-dynamic dictionary matching if only insertions are allowed. In this paper, we propose two efficient algorithms. For a pattern of length mm, our first algorithm supports insertions in O(mlogσ+logd/loglogd)O(m\log\sigma+\log d/\log\log d) time and pattern matching in O(nlogσ+occ)O(n\log\sigma+occ) time for the semi-dynamic setting and supports both insertions and deletions in O(σm+logd/loglogd)O(\sigma m+\log d/\log\log d) time and pattern matching in O(n(logd/loglogd+logσ)+occ(logd/loglogd))O(n(\log d/\log\log d+\log\sigma)+occ(\log d/\log\log d)) time for the dynamic setting by some modifications. This algorithm is based on the directed acyclic word graph. Our second algorithm, which is based on the AC-automaton, supports insertions in O(mlogσ+uf+uo)O(m\log \sigma+u_f+u_o) time for the semi-dynamic setting and supports both insertions and deletions in O(σm+uf+uo)O(\sigma m+u_f+u_o) time for the dynamic setting, where ufu_f and uou_o respectively denote the numbers of states in which the failure function and the output function need to be updated. This algorithm performs pattern matching in O(nlogσ+occ)O(n\log\sigma+occ) time for both settings. Our algorithm achieves optimal update time for AC-automaton based methods over constant-size alphabets, since any algorithm which explicitly maintains the AC-automaton requires Ω(m+uf+uo)\Omega(m+u_f+u_o) update time.

Citations (8)

Summary

No one has generated a summary of this paper yet.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Continue Learning

We haven't generated follow-up questions for this paper yet.