Multiple serial episode matching
Patrick Cegielski, Irene Guessarian, Yuri Matiyasevich
Abstract
In a previous paper we generalized the Knuth-Morris-Pratt (KMP) pattern matching algorithm and defined a non-conventional kind of RAM, the MP--RAMs (RAMS equipped with extra operations), and designed an O(n) on-line algorithm for solving the serial episode matching problem on MP--RAMs when there is only one single episode. We here give two extensions of this algorithm to the case when we search for several patterns simultaneously and compare them. More preciseley, given q+1 strings (a text t of length n and q patterns m\1,...,m\q) and a natural number w, the multiple serial episode matching problem consists in finding the number of size w windows of text t which contain patterns m\1,...,m\q as subsequences, i.e. for each m\i, if m\i=p\1,..., p\k, the letters p\1,..., p\k occur in the window, in the same order as in m\i, but not necessarily consecutively (they may be interleaved with other letters). The main contribution is an algorithm solving this problem on-line in time O(nq).
Create a lesson
Related papers
Product Structure Meets Track Layouts
Michael A. Bekos, Giordano Da Lozzo, Petr Hliněný et al.
The Randomized Query Complexity of Finding Minimal Elements in Bounded-Width Posets
Luyao Fan, Jiayang Zou, Jiayang Gao et al.
On the Instance Optimality of Bidirectional Dijkstra's Algorithm
Matic Požar
Hadamard Flattening and Gaussian Pooling Sketch for Least Squares with Coordinate-wise Guarantee
Zhao Song, Lichen Zhang
Cheaper by the Batch: Shared Traversal for Genotype Graph Editing
Aaron Li, Yifan Li, Drew DeHaas et al.
Unpublished Draft: A Post-Processing Approach to Fairness in Tie-Aware Rankings
Somya Nigam, Johan Springael, Kenneth Sörensen