Skip to main content

Efficient Parallel Knuth-Morris-Pratt Algorithm for Multi-GPUs with CUDA

  • Conference paper
Advances in Intelligent Systems and Applications - Volume 2

Part of the book series: Smart Innovation, Systems and Technologies ((SIST,volume 21))

Abstract

String matching is an important technique among various applications. The traditional string matching algorithm needs the backtracking procedure and does the comparison repeatedly, thus these factors affect its efficiency. Knuth-Morris-Pratt (KMP) is one of well-known and efficient string matching algorithms. However, the computation time of KMP algorithm still is large for processing thousands of pattern strings. Current high-end graphics processing units (GPUs), contain up to hundreds cores per chip, are very popular in the high performance computing community. In this paper, we proposed an efficient parallel KMP algorithm, called KMP-GPU, for multi-GPUs with CUDA. The experimental results showed that the proposed KMP-GPU algorithm can achieve 97x speedups compared with the CPU-based KMP algorithm.

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 259.00
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 329.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 329.99
Price excludes VAT (USA)
  • Durable hardcover 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. Cao, P.: Parallel research on KMP algorithm. CECNet, 4253–4255 (2011)

    Google Scholar 

  2. Duan, G.: The implementation of KMP algorithm based on MPI and OpenMP. In: 9th International Conference on Fuzzy Systems and Knowledge Discovery, pp. 2511–2514 (2012)

    Google Scholar 

  3. Tumeo, A.: Accelerating DNA analysis applications on GPU clusters. In: 8th IEEE Symposium on Application Specific Processors, pp. 71–76 (2010)

    Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

  5. Bayer, R.S., Moore, J.S.: A fast string searching algorithm. Communication of ACM, 762–772 (1977)

    Google Scholar 

  6. Cheng, L.L.: Approximate string matching in DNA sequences. In: 8th International Conference on Database Systems for Advanced Applications, pp. 303–310 (2003)

    Google Scholar 

  7. http://en.wikipedia.org/wiki/Rabin-Karp_string_search_algorithm

  8. Peiravi, A.: Application of string matching in Internet security and Reliability. Journal of American Science, 25–3 (2010)

    Google Scholar 

  9. Flynn, M.: Some Computer Organizations and Their Effectiveness. IEEE Trans. Comput. C-21, 948 (1972)

    Google Scholar 

  10. SaiKrishna, V., Rasool, A., Khare, N.: String Matching and its Applications in Diversified Fields. International Journal of Computer Science Issues 9 (2012)

    Google Scholar 

  11. Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction To Algorithm. The MIT Press (2009)

    Google Scholar 

  12. Nickolls, J., Buck, I., Garland, M., Skandron, K.: Scalable parallel programming with CUDA. ACM Queue 6, 40–53 (2008)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Kuan-Ju Lin .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Lin, KJ., Huang, YH., Lin, CY. (2013). Efficient Parallel Knuth-Morris-Pratt Algorithm for Multi-GPUs with CUDA. In: Pan, JS., Yang, CN., Lin, CC. (eds) Advances in Intelligent Systems and Applications - Volume 2. Smart Innovation, Systems and Technologies, vol 21. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-35473-1_54

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-35473-1_54

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-35472-4

  • Online ISBN: 978-3-642-35473-1

  • eBook Packages: EngineeringEngineering (R0)

Publish with us

Policies and ethics