Abstract
For a pair of strings (S 1, S 2), define the suffix-prefix match of (S 1, S 2) to be the longest suffix of string S 1 that matches a prefix of string S 2. The following problem is considered in this paper. Given a collection of strings S 1 , S 2,..., S k of total length m, find the suffix-prefix match for each of the k(k - 1) ordered pairs of strings. We present an algorithm that solves the problem in O(m + k 2) time, for any fixed alphabet. Since the size of the input is O(m) and the size of the output is O(k 2) this solution is optimal.
Partially supported by Dept. of Energy grant DE-FG03-90ER60999, and NSF grant CCR-8803704.
Partially supported by NSF grant CCR-8908286 and the New York State Science and Technology Foundation, Center for Advanced Technology in Telecommunications, Polytechnic University, Brooklyn, NY.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
A. Apostolico, C. Iliopoulos, G.M. Landau, B. Schieber, and U. Vishkin. Parallel construction of a suffix tree with applications. Algorithmica, 3: 347–365, 1988.
A. Blum, T. Jiang, M. Li, J. Tromp, and M. Yanakakis. Linear approximation of shortest superstrings. In Proc. of the 23rd ACM Symp. on Theory of Computing, 328–336, 1991.
J. Kececioglu and E. Myers. A procedural interface for a fragment assembly tool. Technical Report TR 89–5, University of Arizona, Computer Science Dept., April 1989.
J. Kececioglu and E. Myers. A robust and automatic fragment assembly system, 1991. Manuscript.
D.E. Knuth, J.H. Morris, and V.R. Pratt. Fast pattern matching in strings. SIAM Journal on Computing, 6: 323–350, 1977.
A. Lesk, editor. Computational Molecular Biology, Sources and Methods for Sequence Analysis. Oxford University Press, Oxford, UK, 1988.
E.M. McCreight. A space-economical suffix tree construction algorithm. Journal of the ACM, 23: 262–272, 1976.
R.E. Tarjan. Data Structures and Network Algorithms. CBMS-NSF Regional Conference Series in Applied Math. SIAM, Philadelphia, PA, 1983.
J. Tarhio and E. Ukkonen. A greedy approximation algorithm for constructing shortest common superstrings. Theoretical Computer Science, 57: 131–145, 1988.
J. Turner. Approximation algorithms for the shortest common superstring problem. Information and Computation, 83 (1): 1–20, 1989.
E. Ukkonen. A linear time algorithm for finding approximate shortest common superstrings. Algorithmica, 5: 313–323, 1990.
P. Weiner. Linear pattern matching algorithm. In Proc. 14th IEEE Symp. on Switching and Automata Theory, pages 1–11, 1973.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1993 Springer-Verlag New York, Inc.
About this paper
Cite this paper
Gusfield, D., Landau, G.M., Schieber, B. (1993). An Efficient Algorithm for the All Pairs Suffix-Prefix Problem. In: Capocelli, R., De Santis, A., Vaccaro, U. (eds) Sequences II. Springer, New York, NY. https://doi.org/10.1007/978-1-4613-9323-8_16
Download citation
DOI: https://doi.org/10.1007/978-1-4613-9323-8_16
Publisher Name: Springer, New York, NY
Print ISBN: 978-1-4613-9325-2
Online ISBN: 978-1-4613-9323-8
eBook Packages: Springer Book Archive