Skip to main content

Fast Order-Preserving Pattern Matching

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 8287))

Abstract

Given a text T and a pattern P, the order-preserving pattern matching (OPPM) problem is to find all substrings in T which have the same relative orders as P. The OPPM has been studied in the fields of finding some patterns affected by relative orders, not by their absolute values. For example, it can be applied to time series analysis like share prices on stock markets and to musical melody matching of two musical scores. In this paper, we present a new method of deciding the order-isomorphism between two strings even when there are same characters. Then, we show that the bad character rule of the Horspool algorithm for generic pattern matching problems can be applied to the OPPM problem. Finally, we present a fast algorithm for the OPPM problem and give experimental results to show that our algorithm is about 2 to 5 times faster than the KMP-based algorithm in reasonable cases.

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

Buying options

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

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Kim, J., Eades, P., Fleischer, R., Hong, S., Iliopoulos, C.S., Park, K., Puglisi, S.J., Tokuyama, T.: Order preserving matching. CoRR, abs/1302.4064 (2013); Submitted to Theor. Comput. Sci.

    Google Scholar 

  2. Kubica, M., Kulczynski, T., Radoszewski, J., Rytter, W., Walen, T.: A linear time algorithm for consecutive permutation pattern matching. Information Processing Letters 113(12), 430–433 (2013)

    Article  MathSciNet  MATH  Google Scholar 

  3. Crochemore, M., Iliopoulos, C.S., Kociumaka, T., Kubica, M., Langiu, A., Pissis, S.P., Radoszewski, J., Rytter, W., Walen, T.: Order-preserving suffx trees and their algorithmic applications. CoRR, abs/1303.6872 (2013)

    Google Scholar 

  4. Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 3rd edn. The MIT Press (2009)

    Google Scholar 

  5. Boyer, R.S., Moore, J.S.: A fast string searching algorithm. Comm. ACM 20(10), 762–772 (1977)

    Article  MATH  Google Scholar 

  6. Baeza-Yates, R.: Improved string searching. Software: Practice and Experience 19(3), 257–271 (1989)

    MathSciNet  MATH  Google Scholar 

  7. Tarhio, J., Peltola, H.: String matching in the DNA alphabet. Software: Practice and Experience 27(7), 851–861 (1997)

    Google Scholar 

  8. Horspool, R.N.: Practical fast searching in strings. Software: Practice and Experience 10(6), 501–506 (1980)

    Google Scholar 

  9. Knuth, D.E.: The Art of Computer Programming, 3rd edn. Seminumerical Algorithms, vol. 2. Addison-Wesley (1997)

    Google Scholar 

  10. Myrvold, W., Ruskey, F.: Ranking and unranking permutations in linear time. Information Processing Letters 79(6), 281–284 (2001)

    Article  MathSciNet  MATH  Google Scholar 

  11. Mares, M., Straka, M.: Linear-time ranking of permutations. Algorithms-ESA, 187–193 (2007)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer International Publishing Switzerland

About this paper

Cite this paper

Cho, S., Na, J.C., Park, K., Sim, J.S. (2013). Fast Order-Preserving Pattern Matching. In: Widmayer, P., Xu, Y., Zhu, B. (eds) Combinatorial Optimization and Applications. COCOA 2013. Lecture Notes in Computer Science, vol 8287. Springer, Cham. https://doi.org/10.1007/978-3-319-03780-6_26

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-03780-6_26

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-03779-0

  • Online ISBN: 978-3-319-03780-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics