Skip to main content

Work-time optimal parallel prefix matching

Extended abstract

  • Conference paper
  • First Online:
Algorithms — ESA '94 (ESA 1994)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 855))

Included in the following conference series:

Abstract

Consider the prefix matching problem: Given a pattern P of length m and a text T of length n, find for all positions i in T the longest prefix of P starting at i. We present a parallel algorithm for the prefix matching problem over general alphabets whose text search takes optimal O(α(m)) time and preprocessing takes optimal O(log log m) time, where α(m) is the inverse Ackermann function. An Ω(log log m) lower bound for the prefix matching problem is implied by the same lower bound for string matching. However, the lower bound is applied only to preprocessing of the pattern and the searching phase can be faster. We prove an Ω(α(m)) lower bound for any linear-work searching phase. Therefore our algorithm is work-time optimal in both preprocessing and text search. The idea of leftmost witnesses is introduced to obtain the algorithm.

Supported by the EC Cooperative Action IC 1000 Algorithms for Future Technologies “ALTEC”.

Supported by S.N.U. Posco Research Fund 94-15-1112.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. O. Berkman, B. Schieber, and U. Vishkin, Optimal doubly logarithmic parallel algorithms based on finding all nearest smaller values, J. Algorithms 14 (1993).

    Google Scholar 

  2. O. Berkman and U. Vishkin, Recursive star-tree parallel data structure, SIAM J. Comput. 22 (1993), 221–242.

    Article  MathSciNet  Google Scholar 

  3. R.P. Brent, The parallel evaluation of general arithmetic expressions. J. Assoc. Comput. Mach. 21 (1974), 201–206.

    MATH  MathSciNet  Google Scholar 

  4. D. Breslauer, Fast parallel string prefix-matching, Technical Reports, CWI, 1991.

    Google Scholar 

  5. D. Breslauer, L. Colussi and L. Toniolo, Tight comparison bounds for the string prefix-matching problem, Proc. 4th Symp. Combinatorial Pattern Matching (1993), 11–19.

    Google Scholar 

  6. D. Breslauer and Z. Galil, An optimal O(log log n) time parallel string matching algorithm, SIAM J. Comput. 19 (1990), 1051–1058.

    Article  MathSciNet  Google Scholar 

  7. D. Breslauer and Z. Galil, A lower bound for parallel string matching, SIAM J. Comput. 21 (1992), 856–862.

    Article  MathSciNet  Google Scholar 

  8. R. Cole, M. Crochemore, Z. Galil, L. Gasieniec, R. Hariharan, S. Muthukrishnan, K. Park and W. Rytter, Optimally fast parallel algorithms for preprocessing and pattern matching in one and two dimensions, Proc. 34th IEEE Symp. Found. Computer Science, 1993.

    Google Scholar 

  9. S. Chauduri and J. Radhakrishnan, The complexity of parallel prefix problems on small domains, Proc. 33rd IEEE Symp. Found. Computer Science 1992, 638–647.

    Google Scholar 

  10. F.E. Fich, P. Ragde and A. Wigderson, Relations between concurrent-write models of parallel computation, SIAM J. Comput. 17 (1988), 606–627.

    Article  MathSciNet  Google Scholar 

  11. Z. Galil, Optimal parallel algorithms for string matching, Inform. and Control 67 (1985), 144–157.

    Article  MATH  MathSciNet  Google Scholar 

  12. Z. Galil, A constant-time optimal parallel string-matching algorithm, Proc. 24th ACM Symp. Theory of Computing, 1992.

    Google Scholar 

  13. R. Hariharan and S. Muthukrishnan, Optimal parallel algorithms for prefix matching, Proc. 21st Int. Colloq. Automata Languages and Programming, 1994.

    Google Scholar 

  14. D.E. Knuth, J.H. Morris, and V.B. Pratt, Fast pattern matching in strings, SIAM J. Comput. 6 (1977), 323–350.

    Article  MathSciNet  Google Scholar 

  15. M.G. Main and R.J. Lorentz, An O(n log n) algorithm for finding all repetitions in a string, J. Algorithms 5 (1984), 422–432.

    Article  MathSciNet  Google Scholar 

  16. P. Ragde, The parallel simplicity of compaction and chaining, J. Algorithms 14 (1993), 371–380.

    Article  MATH  MathSciNet  Google Scholar 

  17. U. Vishkin, Optimal parallel pattern matching in strings, Inform. and Control 67 (1985), 91–113.

    Article  MATH  MathSciNet  Google Scholar 

  18. U. Vishkin, Deterministic sampling-a new technique for fast pattern matching, SIAM J. Comput. 20 (1991), 22–40.

    Article  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Jan van Leeuwen

Rights and permissions

Reprints and permissions

Copyright information

© 1994 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Gasieniec, L., Park, K. (1994). Work-time optimal parallel prefix matching. In: van Leeuwen, J. (eds) Algorithms — ESA '94. ESA 1994. Lecture Notes in Computer Science, vol 855. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0049432

Download citation

  • DOI: https://doi.org/10.1007/BFb0049432

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-58434-6

  • Online ISBN: 978-3-540-48794-4

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics