About

Log in?

DTU users get better search results including licensed content and discounts on order fees.

Anyone can log in and get personalized features such as favorites, tags and feeds.

Log in as DTU user Log in as non-DTU user No thanks

DTU Findit

Journal article

String matching with variable length gaps

From

Department of Informatics and Mathematical Modeling, Technical University of Denmark1

Algorithms and Logic, Department of Informatics and Mathematical Modeling, Technical University of Denmark2

Computer Science and Engineering, Department of Informatics and Mathematical Modeling, Technical University of Denmark3

Department of Applied Mathematics and Computer Science, Technical University of Denmark4

Cognitive Systems, Department of Applied Mathematics and Computer Science, Technical University of Denmark5

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(nlogk+m+α) 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.

We also present algorithms for finding and encoding the positions of all strings in P for every match of the pattern.

Language: English
Year: 2012
Pages: 25-34
ISSN: 18792294 and 03043975
Types: Journal article
DOI: 10.1016/j.tcs.2012.03.029
ORCIDs: Bille, Philip and Gørtz, Inge Li

DTU users get better search results including licensed content and discounts on order fees.

Log in as DTU user

Access

Analysis