English

Linear-Time Algorithm for Long LCF with $k$ Mismatches

Data Structures and Algorithms 2018-02-20 v1

Abstract

In the Longest Common Factor with kk Mismatches (LCFk_k) problem, we are given two strings XX and YY of total length nn, and we are asked to find a pair of maximal-length factors, one of XX and the other of YY, such that their Hamming distance is at most kk. Thankachan et al. show that this problem can be solved in O(nlogkn)\mathcal{O}(n \log^k n) time and O(n)\mathcal{O}(n) space for constant kk. We consider the LCFk_k(\ell) problem in which we assume that the sought factors have length at least \ell, and the LCFk_k(\ell) problem for =Ω(log2k+2n)\ell=\Omega(\log^{2k+2} n), which we call the Long LCFk_k problem. We use difference covers to reduce the Long LCFk_k problem to a task involving m=O(n/logk+1n)m=\mathcal{O}(n/\log^{k+1}n) synchronized factors. The latter can be solved in O(mlogk+1m)\mathcal{O}(m \log^{k+1}m) time, which results in a linear-time algorithm for Long LCFk_k. In general, our solution to LCFk_k(\ell) for arbitrary \ell takes O(n+nlogk+1n/)\mathcal{O}(n + n \log^{k+1} n/\sqrt{\ell}) time.

Keywords

Cite

@article{arxiv.1802.06369,
  title  = {Linear-Time Algorithm for Long LCF with $k$ Mismatches},
  author = {Panagiotis Charalampopoulos and Maxime Crochemore and Costas S. Iliopoulos and Tomasz Kociumaka and Solon P. Pissis and Jakub Radoszewski and Wojciech Rytter and Tomasz Waleń},
  journal= {arXiv preprint arXiv:1802.06369},
  year   = {2018}
}

Comments

submitted to CPM 2018

R2 v1 2026-06-23T00:25:41.383Z