English

Single and multiple consecutive permutation motif search

Data Structures and Algorithms 2013-04-29 v2

Abstract

Let tt be a permutation (that shall play the role of the {\em text}) on [n][n] and a pattern pp be a sequence of mm distinct integer(s) of [n][n], mnm\leq n. The pattern pp occurs in tt in position ii if and only if p1...pmp_1... p_m is order-isomorphic to ti...ti+m1t_i... t_{i+m-1}, that is, for all 1k<m1 \leq k< \ell \leq m, pk>pp_k>p_\ell if and only if ti+k1>ti+1t_{i+k-1}>t_{i+\ell-1}. Searching for a pattern pp in a text tt consists in identifying all occurrences of pp in tt. We first present a forward automaton which allows us to search for pp in tt in O(m2loglogm+n)O(m^2\log \log m +n) time. We then introduce a Morris-Pratt automaton representation of the forward automaton which allows us to reduce this complexity to O(mloglogm+n)O(m\log \log m +n) at the price of an additional amortized constant term by integer of the text. Both automata occupy O(m)O(m) space. We then extend the problem to search for a set of patterns and exhibit a specific Aho-Corasick like algorithm. Next we present a sub-linear average case search algorithm running in O(mlogmloglogm+nlogmmloglogm)O(\frac{m\log m}{\log\log m}+\frac{n\log m}{m\log\log m}) time, that we eventually prove to be optimal on average.

Keywords

Cite

@article{arxiv.1301.4952,
  title  = {Single and multiple consecutive permutation motif search},
  author = {Djamal Belazzougui and Adeline Pierrot and Mathieu Raffinot and Stéphane Vialette},
  journal= {arXiv preprint arXiv:1301.4952},
  year   = {2013}
}
R2 v1 2026-06-21T23:13:01.487Z