English

String Matching with Inversions and Translocations in Linear Average Time (Most of the Time)

Data Structures and Algorithms 2013-05-09 v1

Abstract

We present an efficient algorithm for finding all approximate occurrences of a given pattern pp of length mm in a text tt of length nn allowing for translocations of equal length adjacent factors and inversions of factors. The algorithm is based on an efficient filtering method and has an \bigO(nmmax(α,β))\bigO(nm\max(\alpha, \beta))-time complexity in the worst case and \bigO(max(α,β))\bigO(\max(\alpha, \beta))-space complexity, where α\alpha and β\beta are respectively the maximum length of the factors involved in any translocation and inversion. Moreover we show that under the assumptions of equiprobability and independence of characters our algorithm has a \bigO(n)\bigO(n) average time complexity, whenever σ=Ω(logm/loglog1ϵm)\sigma = \Omega(\log m / \log\log^{1-\epsilon} m), where ϵ>0\epsilon > 0 and σ\sigma is the dimension of the alphabet. Experiments show that the new proposed algorithm achieves very good results in practical cases.

Keywords

Cite

@article{arxiv.1012.0280,
  title  = {String Matching with Inversions and Translocations in Linear Average Time (Most of the Time)},
  author = {Szymon Grabowski and Simone Faro and Emanuele Giaquinta},
  journal= {arXiv preprint arXiv:1012.0280},
  year   = {2013}
}

Comments

9 pages. A slightly shorter version of this manuscript was submitted to Information Processing Letters