Skip to main content

An Efficient Algorithm for the All Pairs Suffix-Prefix Problem

  • Conference paper
Sequences II

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

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.

    Article  MathSciNet  MATH  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.

    Article  MathSciNet  MATH  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.

    Article  MathSciNet  MATH  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.

    Article  MathSciNet  MATH  Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

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

    Chapter  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

Publish with us

Policies and ethics