Given a set of pattern strings called a dictionary and a text string, dictionary matching is the problem to find the occurrences of the patterns on the text. Dynamic dictionary matching is dictionary matching where patterns may dynamically be inserted into and deleted from the dictionary. The problem is called semi-dynamic dictionary matching when we only consider the insertion. An AC-automaton is a data structure which enables us to solve dictionary matching in O(d logσ) preprocessing time and O(n log σ) matching time, where d denotes the total length of the patterns in the dictionary, n denotes the length of the text, and σ denotes the alphabet size. In this paper we propose an efficient algorithm that dynamically updates an AC automaton for insertion of a new pattern by using a directed acyclic word graph.
展开▼