Adaptive Computation of the Swap-Insert Correction Distance

preprint2015arXivOpen access

Abstract

The Swap-Insert Correction distance from a string SS of length nn to another string LL of length m≥nm\geq n on the alphabet [1..d][1..d] is the minimum number of insertions, and swaps of pairs of adjacent symbols, converting SS into LL. Contrarily to other correction distances, computing it is NP-Hard in the size dd of the alphabet. We describe an algorithm computing this distance in time within O(d2nmgd−1)O(d^2 nm g^{d-1}), where there are nαn_α occurrences of αα in SS, mαm_α occurrences of αα in LL, and where g=max⁡α∈[1..d]min⁡{nα,mα−nα}g=\max_{α\in[1..d]} \min\{n_α,m_α-n_α\} measures the difficulty of the instance. The difficulty gg is bounded by above by various terms, such as the length of the shortest string SS, and by the maximum number of occurrences of a single character in SS. Those results illustrate how, in many cases, the correction distance between two strings can be easier to compute than in the worst case scenario.

Explore this paper’s authors, topics and related work.

Building this map preview

BZPEER is loading the nearby papers, people, topics and institutions for this page.

Reviews 0

Write a reviewWrite

No reviews yet.

Discussion 0

Add a commentWrite

No comments yet.