2010 | OriginalPaper | Buchkapitel
String Matching with Variable Length Gaps
verfasst von : Philip Bille, Inge Li Gørtz, Hjalte Wedel Vildhøj, David Kofoed Wind
Erschienen in: String Processing and Information Retrieval
Verlag: Springer Berlin Heidelberg
Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.
Wählen Sie Textabschnitte aus um mit Künstlicher Intelligenz passenden Patente zu finden. powered by
Markieren Sie Textabschnitte, um KI-gestützt weitere passende Inhalte zu finden. powered by
We consider string matching with variable length gaps. Given a string
T
and a pattern
P
consisting of strings separated by variable length gaps (arbitrary strings of length in a specified range), the problem is to find all ending positions of substrings in
T
that match
P
. This problem is a basic primitive in computational biology applications. Let
m
and
n
be the lengths of
P
and
T
, respectively, and let
k
be the number of strings in
P
. We present a new algorithm achieving time
O
((
n
+
m
)log
k
+
α
) and space
O
(
m
+
A
), where
A
is the sum of the lower bounds of the lengths of the gaps in
P
and
α
is the total number of occurrences of the strings in
P
within
T
. Compared to the previous results this bound essentially achieves the best known time and space complexities simultaneously. Consequently, our algorithm obtains the best known bounds for almost all combinations of
m
,
n
,
k
,
A
, and
α
. Our algorithm is surprisingly simple and straightforward to implement.