English

Multiple serial episode matching

Data Structures and Algorithms 2021-10-26 v1

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+1q+1 strings (a text tt of length nn and qq patterns m_1,...,m_qm\_1,...,m\_q) and a natural number ww, the {\em multiple serial episode matching problem} consists in finding the number of size ww windows of text tt which contain patterns m_1,...,m_qm\_1,...,m\_q as subsequences, i.e. for each m_im\_i, if m_i=p_1,...,p_km\_i=p\_1,..., p\_k, the letters p_1,...,p_kp\_1,..., p\_k occur in the window, in the same order as in m_im\_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)O(nq).

Keywords

Cite

@article{arxiv.cs/0603050,
  title  = {Multiple serial episode matching},
  author = {Patrick Cegielski and Irene Guessarian and Yuri Matiyasevich},
  journal= {arXiv preprint arXiv:cs/0603050},
  year   = {2021}
}

Comments

12