2018/02/18 by Charalampopoulos, Panagiotis, Crochemore, Maxime, Iliopoulos, Costas S. +5 · 1 citation
#Data Structures and Algorithms (cs.DS) #FOS: Computer and information sciences
paper · doi:10.48550/arxiv.1802.06369
In the Longest Common Factor with k Mismatches (LCFk) problem, we are given two strings X and Y of total length n, and we are asked to find a pair of maximal-length factors, one of X and the other of Y, such that their Hamming distance is at most k. Thankachan et al. show that this problem can be solved in O(n logk n) time and O(n) space for constant k. We consider the LCFk(ℓ) problem in which we assume that the sought factors have length at least ℓ, and the LCFk(ℓ) problem for ℓ=Ω(log2k+2 n), which we call the Long LCFk problem. We use difference covers to reduce the Long LCFk problem to a task involving m=O(n/logk+1n) synchronized factors. The latter can be solved in O(m logk+1m) time, which results in a linear-time algorithm for Long LCFk. In general, our solution to LCFk(ℓ) for arbitrary ℓ takes O(n + n logk+1 n/√(ℓ)) time.