Suffix arrays for multiple strings: A method for on-line multiple string searches

24Citations
Citations of this article
9Readers
Mendeley users who have this article in their library.
Get full text

Abstract

Manber and Myers’ suffix array for a single string is a useful data structure for solving string matching problems. In this paper, we will show how to generalize their idea to multiple strings. We call this generalization the generalized suffix array. We present algorithms for constructing a generalized suffix array and for searching the array. Let A denote the set of strings for which we are to build a generalized suffix array. Let N be the sum of the lengths of all strings in A and n the length of the longest string in A. Our sort algorithm needs O(N log n) time in the worst case using O(N) storage to construct the generalized suffix array and the information about the longest common prefixes (lcps) between adjacent suffixes in the suffix array which will be required by the search algorithm. Given the suffix array and its lep information, the search algorithm answers an on-line search query of the type, “Is W a substring of some strings in A? If so, where does it occur within strings of A?” in 0(|W| + log N) time in the worst case. The above bounds are independent of the size of the underlying alphabet Σ. We then apply the generalized suffix array to the problem of finding all occurrences of an m × m matrix (the pattern) as a submatrix in a larger n × n matrix (the text). Our solution falls into the class of the 2D pattern matching algorithms that first preprocess the text and then search for the pattern. After preprocessing the text using O(n2 log n) time and O(n2) space, our algorithm can find all occurrences of the pattern in the text in expected-time sublinear in the size of the pattern. To the best of our knowledge, our algorithm is the average-case fastest algorithm in its class.

Cite

CITATION STYLE

APA

Shi, F. (1996). Suffix arrays for multiple strings: A method for on-line multiple string searches. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 1179, pp. 11–22). Springer Verlag. https://doi.org/10.1007/bfb0027775

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free