线性平均时间(大部分情况下)内允许易位和倒位的字符串匹配
数据结构与算法
2013-05-09 v1
摘要
我们提出了一种高效算法,用于在文本(长度为)中查找给定模式(长度为)的所有近似出现,允许等长相邻因子的易位和因子的倒位。该算法基于一种高效的过滤方法,最坏情况下的时间复杂度为,空间复杂度为,其中和分别是任何易位和倒位中涉及因子的最大长度。此外,我们证明在字符等概率且独立的假设下,只要(其中,是字母表大小),我们的算法平均时间复杂度为。实验表明,新提出的算法在实际情况下取得了非常好的结果。
引用
@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}
}
备注
9 pages. A slightly shorter version of this manuscript was submitted to Information Processing Letters