English

Algorithms for Parameterized String Matching with Mismatches

Data Structures and Algorithms 2024-12-03 v1

Abstract

Two strings are considered to have parameterized matching when there exists a bijection of the parameterized alphabet onto itself such that it transforms one string to another. Parameterized matching has application in software duplication detection, image processing, and computational biology. We consider the problem for which a pattern pp, a text tt and a mismatch tolerance limit kk is given and the goal is to find all positions in text tt, for which pattern pp, parameterized matches with p|p| length substrings of tt with at most kk mismatches. Our main result is an algorithm for this problem with O(α2nlogn+nα2αlog(nα))O(\alpha^2 n\log n + n \alpha^2 \sqrt{\alpha} \log \left( n \alpha \right)) time complexity, where n=tn = |t| and α=Σ\alpha = |\Sigma| which is improving for k=Ω~(Σ5/3)k=\tilde{\Omega}(|\Sigma|^{5/3}) the algorithm by Hazay, Lewenstein and Sokol. We also present a hashing based probabilistic algorithm for this problem when k=1k = 1 with O(nlogn)O \left( n \log n \right) time complexity, which we believe is algorithmically beautiful.

Keywords

Cite

@article{arxiv.2412.00222,
  title  = {Algorithms for Parameterized String Matching with Mismatches},
  author = {Apurba Saha and Iftekhar Hakim Kaowsar and Mahdi Hasnat Siyam and M. Sohel Rahman},
  journal= {arXiv preprint arXiv:2412.00222},
  year   = {2024}
}

Comments

17 pages, 2 figures

R2 v1 2026-06-28T20:17:36.962Z