Efficient special cases of Pattern Matching with Swaps
Let a text string T of n symbols and a pattern string P of m symbols from alphabet ∑ be given. A swapped version T′ of T is a length n string derived from T by a series of local swaps (i.e., t′ l ← t l + 1 and t′ l + 1 ← t l ) where each element can participate in no more than one swap. The Pattern...
Gespeichert in:
| Veröffentlicht in: | Information processing letters Jg. 68; H. 3; S. 125 - 132 |
|---|---|
| Hauptverfasser: | , , , |
| Format: | Journal Article |
| Sprache: | Englisch |
| Veröffentlicht: |
Amsterdam
Elsevier B.V
15.11.1998
Elsevier Science |
| Schlagworte: | |
| ISSN: | 0020-0190, 1872-6119 |
| Online-Zugang: | Volltext |
| Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
| Zusammenfassung: | Let a text string
T of
n symbols and a pattern string
P of
m symbols from alphabet ∑ be given. A
swapped version
T′ of
T is a length
n string derived from
T by a series of
local swaps (i.e.,
t′
l
←
t
l + 1
and
t′
l + 1
←
t
l
) where each element can participate in
no more than one swap.
The
Pattern Matching with Swaps problem is that of finding all locations
i for which there exists a swapped version
T′ of
T where there is an exact matching of
P at location
i of
T′.
It was recently shown that the
Pattern Matching with Swaps problem has a solution in time
O(nm
1
3
log m log
2 σ)
, where
σ = min(¦∑¦, m).
We consider some interesting special cases of patterns, namely, patterns where there is no
length-one run, i.e., there are no
a,
b,
c
ϵ ∑ where
b ≠
a and
b ≠
c and where the substring
abc appears in the pattern. We show that for such patterns the Pattern Matching with Swaps problem can be solved in time O(
n
log
2
m). |
|---|---|
| Bibliographie: | ObjectType-Article-2 SourceType-Scholarly Journals-1 ObjectType-Feature-1 content type line 23 |
| ISSN: | 0020-0190 1872-6119 |
| DOI: | 10.1016/S0020-0190(98)00151-3 |