Linear-Time Algorithm for Long LCF with k Mismatches

Abstract

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 k 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 =(2k+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/k+1n) synchronized factors. The latter can be solved in O(m k+1m) time, which results in a linear-time algorithm for Long LCFk. In general, our solution to LCFk() for arbitrary takes O(n + n k+1 n/) time.

0

Turn this paper into a lesson

ArcXiv compiles a structured reading guide from this paper's metadata: plain-English importance, contributions, prerequisite concepts, which sections to read first, flashcards, and a quiz. Grounded in the abstract, never invented.

Discussion (0)

Sign in to join the discussion.

Loading comments…