Affiliation:
1. Departamento de Ciencias de la Computación, Universidad de Chile, Santiago, Chile
2. Departamento de Matemática y Ciencia de la Computación, Universidad de Santiago, Santiago, Chile
Abstract
The Swap-Insert Correction distance from a string
S
of length
n
to another string
L
of length
m
≥
n
on the alphabet [1‥σ] is the minimum number of insertions, and swaps of pairs of adjacent symbols, converting
S
into
L
. Contrarily to other correction distances, computing it is NP-Hard in the size σ of the alphabet. We describe an algorithm computing this distance in time within
O
(σ
2
nmg
σ−1
), where for each α ∈ [1‥σ] there are
n
α
occurrences of α in
S
,
m
α
occurrences of α in
L
, and where
g
= max
α∈[1‥σ]
min{
n
α
,
m
α
−
n
α
} is a new parameter of the analysis, measuring one aspect of the difficulty of the instance. The difficulty
g
is bounded by above by various terms, such as the length
n
of the shortest string
S
, and by the maximum number of occurrences of a single character in
S
(max
α ∈[1‥σ]
n
α
). This result illustrates how, in many cases, the correction distance between two strings can be easier to compute than in the worst case scenario.
Publisher
Association for Computing Machinery (ACM)
Subject
Mathematics (miscellaneous)
Cited by
3 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献