Skip to main content
Book cover

Sequences II pp 218–224Cite as

An Efficient Algorithm for the All Pairs Suffix-Prefix Problem

  • Conference paper

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.

Keywords

  • Internal Vertex
  • Depth First Search
  • Linear Time Algorithm
  • Suffix Tree
  • Special Symbol

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

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.

This is a preview of subscription content, access via your institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • DOI: 10.1007/978-1-4613-9323-8_16
  • Chapter length: 7 pages
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
eBook
USD   59.99
Price excludes VAT (USA)
  • ISBN: 978-1-4613-9323-8
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
Softcover Book
USD   79.99
Price excludes VAT (USA)

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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.

    MathSciNet  MATH  CrossRef  Google Scholar 

  2. 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.

    Google Scholar 

  3. 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.

    Google Scholar 

  4. J. Kececioglu and E. Myers. A robust and automatic fragment assembly system, 1991. Manuscript.

    Google Scholar 

  5. D.E. Knuth, J.H. Morris, and V.R. Pratt. Fast pattern matching in strings. SIAM Journal on Computing, 6: 323–350, 1977.

    MathSciNet  MATH  CrossRef  Google Scholar 

  6. A. Lesk, editor. Computational Molecular Biology, Sources and Methods for Sequence Analysis. Oxford University Press, Oxford, UK, 1988.

    Google Scholar 

  7. E.M. McCreight. A space-economical suffix tree construction algorithm. Journal of the ACM, 23: 262–272, 1976.

    MathSciNet  MATH  CrossRef  Google Scholar 

  8. R.E. Tarjan. Data Structures and Network Algorithms. CBMS-NSF Regional Conference Series in Applied Math. SIAM, Philadelphia, PA, 1983.

    Google Scholar 

  9. J. Tarhio and E. Ukkonen. A greedy approximation algorithm for constructing shortest common superstrings. Theoretical Computer Science, 57: 131–145, 1988.

    MathSciNet  MATH  CrossRef  Google Scholar 

  10. J. Turner. Approximation algorithms for the shortest common superstring problem. Information and Computation, 83 (1): 1–20, 1989.

    MathSciNet  MATH  CrossRef  Google Scholar 

  11. E. Ukkonen. A linear time algorithm for finding approximate shortest common superstrings. Algorithmica, 5: 313–323, 1990.

    MathSciNet  MATH  CrossRef  Google Scholar 

  12. P. Weiner. Linear pattern matching algorithm. In Proc. 14th IEEE Symp. on Switching and Automata Theory, pages 1–11, 1973.

    CrossRef  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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