Dynamic dictionary matching

Amihood Amir, Martin Farach, Zvi Galil, Raffaele Giancarlo, Kunsoo Park

Research output: Contribution to journalArticlepeer-review

64 Scopus citations

Abstract

We consider the dynamic dictionary matching problem. We are given a set of pattern strings (the dictionary) that can change over time; that is, we can insert a new pattern into the dictionary or delete a pattern from it. Moreover, given a text string, we must be able to find all occurrences of any pattern of the dictionary in the text. Let D0 be the empty dictionary. We present an algorithm that performs any sequence of the following operations in the given time bounds: (1) insert(p, Di-1). Insert pattern p[1, m] into the dictionary Di-1. Di is the dictionary after the operation. The time complexity is O(m log |Di|). (2) delete(p, Di-1). Delete pattern p[1, m] from the dictionary Di-1. Di is the dictionary after the operation. The time complexity is O(m log |Di-1|). (3) search(t, Di). Search text t[1, n] for all occurrences of the patterns of dictionary Di. The time complexity is O((n + tocc) log |Di|), where tocc is the total number of occurences of patterns in the text.

Original languageEnglish
Pages (from-to)208-222
Number of pages15
JournalJournal of Computer and System Sciences
Volume49
Issue number2
DOIs
StatePublished - Oct 1994
Externally publishedYes

Bibliographical note

Funding Information:
* Partially supported by NSF Grant IRI-9013055 and CCR-9223699. t Supported by DIMACS under NSF Contract STC-8809648. * Partially supported by NSF Grant CCR-90-14605. § On leave from University of Palermo, Italy.

Fingerprint

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

Cite this