String Matching with a Dynamic Pattern
Bruno Monteiro, Vinicius dos Santos

TL;DR
This paper introduces a practical algorithm for dynamic string pattern matching that efficiently handles pattern modifications and supports various pattern operations with logarithmic update time.
Contribution
It presents a simple, practical suffix array-based algorithm for dynamic pattern matching with support for multiple pattern modifications and extensions.
Findings
Achieves O(log |T|) update time for pattern modifications
Supports substring deletion, transposition, and copying within same complexity
Extends to online text updates maintaining bounds
Abstract
In this work, we tackle a natural variation of the String Matching Problem on the case of a dynamic pattern, that is, given a static text and a pattern , we want to support character additions and deletions to the pattern, and after each operation compute how many times it occurs in the text. We show a simple and practical algorithm using Suffix Arrays that achieves update time, after preprocess time. We show how to extend our solution to support substring deletion, transposition (moving a substring to another position of the pattern), and copy (copying a substring and pasting it in a specific position), in the same time complexities. Our solution can also be extended to support an online text (adding characters to one end of the text), maintaining the same amortized bounds.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAlgorithms and Data Compression · Speech Recognition and Synthesis · Natural Language Processing Techniques
