Skip to main content

Segment and Fenwick Trees for Approximate Order Preserving Matching

  • Conference paper
  • First Online:
Applied Computer Sciences in Engineering (WEA 2017)

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 742))

Included in the following conference series:

  • 6876 Accesses

Abstract

In this paper we combine two string searching related problems: the approximate string matching under parameters \(\delta \) and \(\gamma \), and the order preserving matching problem. Order-preserving matching regards the internal structure of the strings rather than their absolute values while matching under \(\delta \) and \(\gamma \) distances permit a level of error. We formally define the \(\delta \gamma \)–order-preserving matching problem. We designed two algorithms for it based on the segment tree and the Fenwick tree, respectively. Also, we design and implement in C++ and an experimental setup to compare these algorithms with the naive solution and the updateBA algorithm introduced in [22]. The data structure based algorithms show better experimental performance due to their better lower bound of \(\varOmega (n \lg n)\) complexity.

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 EPUB and 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

References

  1. de Berg, M., Cheong, O., van Kreveld, M., Overmars, M.: More Geometric Data Structures, pp. 219–241. Springer, Heidelberg (2008)

    Google Scholar 

  2. Brass, P.: Advanced Data Structures. Cambridge University Press, Cambridge (2008). Cambridge books online

    Book  MATH  Google Scholar 

  3. Cambouropoulos, E., Crochemore, M., Iliopoulos, C., Mouchard, L., Pinzon, Y.: Algorithms for computing approximate repetitions in musical sequences. Int. J. Comput. Math. 79(11), 1135–1148 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  4. Chhabra, T., Kulekci, M.O., Tarhio, J.: Alternative algorithms for order-preserving matching. In: Holub, J., Žďárek, J. (eds.) Proceedings of the Prague Stringology Conference 2015, pp. 36–46. Czech Technical University in Prague, Prague, Czech Republic (2015)

    Google Scholar 

  5. Chhabra, T., Tarhio, J.: Order-preserving matching with filtration. In: Gudmundsson, J., Katajainen, J. (eds.) SEA 2014. LNCS, vol. 8504, pp. 307–314. Springer, Cham (2014). doi:10.1007/978-3-319-07959-2_26

    Google Scholar 

  6. Crawford, T., Iliopoulos, C.S., Raman, R.: String-matching techniques for musical similarity and melodic recognition. Comput. Musicol. 11, 71–100 (1998)

    Google Scholar 

  7. Crochemore, M., Iliopoulos, C.S., Kociumaka, T., Kubica, M., Langiu, A., Pissis, S.P., Radoszewski, J., Rytter, W., Waleń, T.: Order-Preserving Incomplete Suffix Trees and Order-Preserving Indexes, pp. 84–95. Springer, Cham (2013)

    Google Scholar 

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

    Google Scholar 

  9. Crochemore, M., Iliopoulos, C.S., Kociumaka, T., Kubica, M., Langiu, A., Pissis, S.P., Radoszewski, J., Rytter, W., Waleń, T.: Order-preserving indexing. Theor. Comput. Sci. 638(C), 122–135 (2016)

    Google Scholar 

  10. Faro, S., Külekci, M.O.: Efficient algorithms for the order preserving pattern matching problem. CoRR abs/1501.04001 (2015)

    Google Scholar 

  11. Fenwick, P.M.: A new data structure for cumulative frequency tables. Softw. Pract. Exp. 24, 327–336 (1994)

    Google Scholar 

  12. Gawrychowski, P., Uznański, P.: Order-preserving pattern matching with k mismatches. Theor. Comput. Sci. 638, 136–144 (2016)

    Article  MathSciNet  MATH  Google Scholar 

  13. Hasan, M.M., Islam, A., Rahman, M.S., Rahman, M.S.: Order Preserving Prefix Tables, pp. 111–116. Springer, Cham (2014)

    Google Scholar 

  14. Hasan, M.M., Islam, A., Rahman, M.S., Rahman, M.: Order preserving pattern matching revisited. Pattern Recogn. Lett. 55(C), 15–21 (2015)

    Google Scholar 

  15. Kim, J., Eades, P., Fleischer, R., Hong, S.H., Iliopoulos, C.S., Park, K., Puglisi, S.J., Tokuyama, T.: Order-preserving matching. Theor. Comput. Sci. 525, 68–79 (2014). Advances in Stringology

    Google Scholar 

  16. Kubica, M., Kulczyński, T., Radoszewski, J., Rytter, W.: WaleÅĎ, T.: A linear time algorithm for consecutive permutation pattern matching. Information Processing Letters 113(12), 430–433 (2013)

    Google Scholar 

  17. Lee, I., Mendivelso, J., Pinzón, Y.J.: \(\delta \gamma \)-Parameterized Matching, pp. 236–248. Springer, Heidelberg (2009)

    Google Scholar 

  18. Mendivelso, J.: Definition and solution of a new string searching variant termed \(\delta \gamma \)-parameterized matching. Master’s thesis, National University of Colombia, Bogota, Colombia (2010)

    Google Scholar 

  19. Mendivelso, J., Lee, I., Pinzón, Y.J.: Approximate Function Matching under \(\delta \)- and \(\gamma \)- Distances, pp. 348–359. Springer, Heidelberg (2012)

    Google Scholar 

  20. Mendivelso, J., Pino, C., Niño, L.F., Pinzón, Y.: Approximate Abelian Periods to Find Motifs in Biological Sequences, pp. 121–130. Springer, Cham (2015)

    Google Scholar 

  21. Mendivelso, J., Pinzón, Y.: A novel approach to approximate parikh matching for comparing composition in biological sequences. In: Proceedings of the 6th International Conference on Bioinformatics and Computational Biology (BICoB 2014) (2014)

    Google Scholar 

  22. Niquefa, R., Mendivelso, J., Hernández, G., Pinzón, Y.: Order preserving matching under \(\delta \gamma \)-approximation. In: Congreso Internacional de Ciencias Básicas e Ingeniería (2017)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Juan Mendivelso .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer International Publishing AG

About this paper

Cite this paper

Niquefa, R., Mendivelso, J., Hernández, G., Pinzón, Y. (2017). Segment and Fenwick Trees for Approximate Order Preserving Matching. In: Figueroa-García, J., López-Santana, E., Villa-Ramírez, J., Ferro-Escobar, R. (eds) Applied Computer Sciences in Engineering. WEA 2017. Communications in Computer and Information Science, vol 742. Springer, Cham. https://doi.org/10.1007/978-3-319-66963-2_13

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-66963-2_13

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-66962-5

  • Online ISBN: 978-3-319-66963-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics