Back to Search Start Over

Efficient dynamic dictionary matching with DAWGs and AC-automata.

Authors :
Hendrian, Diptarama
Inenaga, Shunsuke
Yoshinaka, Ryo
Shinohara, Ayumi
Source :
Theoretical Computer Science. Nov2019, Vol. 792, p161-172. 12p.
Publication Year :
2019

Abstract

The dictionary matching is a task to find all occurrences of pattern strings in a set D (called a dictionary) on a text string T. The Aho–Corasick-automaton (AC-automaton) which is built on D is a fundamental data structure which enables us to solve the dictionary matching problem in O (d log ⁡ σ) preprocessing time and O (n log ⁡ σ + occ) matching time, where d is the total length of the patterns in the dictionary D , n is the length of the text, σ is the alphabet size, and occ 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 the dictionary D. This problem is called semi-dynamic dictionary matching if only insertions are allowed. In this paper, we propose two efficient algorithms that can solve both problems with some modifications. For a pattern of length m , our first algorithm supports insertions in O (m log ⁡ σ + log ⁡ d / log ⁡ log ⁡ d) time and pattern matching in O (n log ⁡ σ + occ) for the semi-dynamic setting. This algorithm also supports both insertions and deletions in O (σ m + log ⁡ d / log ⁡ log ⁡ d) time and pattern matching in O (n (log ⁡ d / log ⁡ log ⁡ d + log ⁡ σ) + occ (log ⁡ d / log ⁡ log ⁡ d)) time for the dynamic dictionary matching problem by some modifications. This algorithm is based on the directed acyclic word graph (DAWG) of Blumer et al. (JACM 1987). Our second algorithm, which is based on the AC-automaton, supports insertions in O (m log ⁡ σ + u f + u o) time for the semi-dynamic setting and supports both insertions and deletions in O (σ m + u f + u o) time for the dynamic setting, where u f and u 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 (n log ⁡ σ + 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 + u f + u o) update time. • Two algorithms for dynamic dictionary matching are presented. • An Aho–Corasick automata based algorithm with optimal update time is proposed. • Tight lower and upper bounds for updating directed acyclic word graphs are given. [ABSTRACT FROM AUTHOR]

Details

Language :
English
ISSN :
03043975
Volume :
792
Database :
Academic Search Index
Journal :
Theoretical Computer Science
Publication Type :
Academic Journal
Accession number :
138832974
Full Text :
https://doi.org/10.1016/j.tcs.2018.04.016