Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to main content

New Variants of Pattern Matching with Constants and Variables

  • Conference paper
  • First Online:
SOFSEM 2018: Theory and Practice of Computer Science (SOFSEM 2018)

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

  • 1329 Accesses

Abstract

Given a text and a pattern over two types of symbols called constants and variables, the parameterized pattern matching problem is to find all occurrences of substrings of the text that the pattern matches by substituting a variable in the text for each variable in the pattern, where the substitution should be injective. The function matching problem is a variant of it that lifts the injection constraint. In this paper, we discuss variants of those problems, where one can substitute a constant or a variable for each variable of the pattern. We give two kinds of algorithms for both problems, a convolution-based method and an extended KMP-based method, and analyze their complexity.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

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

Similar content being viewed by others

Notes

  1. 1.

    They called the problem parameterized pattern queries. However, to avoid misunderstanding the problem to have the injective constraint, we refrain from using the original name in this paper.

  2. 2.

    Source codes are available at https://github.com/igarashi/matchingwithvcmap.

  3. 3.

    Amir et al. [1] defined the problem so that strings are over a single type of symbols, which can be seen as variables. This restriction is inessential [2].

References

  1. Amir, A., Aumann, Y., Lewenstein, M., Porat, E.: Function matching. SIAM J. Comput. 35(5), 1007–1022 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  2. Amir, A., Farach, M., Muthukrishnan, S.: Alphabet dependence in parameterized matching. Inf. Process. Lett. 49(3), 111–115 (1994)

    Article  MATH  Google Scholar 

  3. Amir, A., Nor, I.: Generalized function matching. J. Discrete Algorithms 5(3), 514–523 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  4. Baker, B.S.: Parameterized pattern matching: algorithms and applications. J. Comput. Syst. Sci. 52(1), 28–42 (1996)

    Article  MathSciNet  MATH  Google Scholar 

  5. Cole, R., Hariharan, R.: Verifying candidate matches in sparse and wildcard matching. In: Proceedings of the Thirty-Fourth Annual ACM Symposium on Theory of Computing, pp. 592–601. ACM (2002)

    Google Scholar 

  6. Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C., et al.: Introduction to algorithms, vol. 44, pp. 97–138. MIT Press, Cambridge (1990)

    MATH  Google Scholar 

  7. Du Mouza, C., Rigaux, P., Scholl, M.: Parameterized pattern queries. Data Knowl. Eng. 63(2), 433–456 (2007)

    Article  Google Scholar 

  8. Fischer, M.J., Paterson, M.S.: String-matching and other products. Technical report, DTIC Document (1974)

    Google Scholar 

  9. Igarashi, Y.: A study on the parameterized pattern matching problems for real data (in Japanese). Bachelor thesis, Tohoku University (2017)

    Google Scholar 

  10. Igarashi, Y., Diptarama, Yoshinaka, R., Shinohara, A.: New variants of pattern matching with constants and variables. CoRR abs/1705.09504 (2017)

    Google Scholar 

  11. Iliopoulos, C.S., Rahman, M.S.: Pattern matching algorithms with don’t cares. In: Proceedings of the 33rd SOFSEM, pp. 116–126. Citeseer (2007)

    Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

  13. Mendivelso, J., Pinzón, Y.J.: Parameterized matching: solutions and extensions. In: Stringology, pp. 118–131. Citeseer (2015)

    Google Scholar 

  14. Tarjan, R.E.: Efficiency of a good but not linear set union algorithm. J. ACM (JACM) 22(2), 215–225 (1975)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Acknowledgements

This work is supported by Tohoku University Division for Interdisciplinary Advance Research and Education, ImPACT Program of Council for Science, Technology and Innovation (Cabinet Office, Government of Japan), and JSPS KAKENHI Grant Number JP15H05706.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yuki Igarashi .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer International Publishing AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Igarashi, Y., Diptarama, Yoshinaka, R., Shinohara, A. (2018). New Variants of Pattern Matching with Constants and Variables. In: Tjoa, A., Bellatreche, L., Biffl, S., van Leeuwen, J., Wiedermann, J. (eds) SOFSEM 2018: Theory and Practice of Computer Science. SOFSEM 2018. Lecture Notes in Computer Science(), vol 10706. Edizioni della Normale, Cham. https://doi.org/10.1007/978-3-319-73117-9_43

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-73117-9_43

  • Published:

  • Publisher Name: Edizioni della Normale, Cham

  • Print ISBN: 978-3-319-73116-2

  • Online ISBN: 978-3-319-73117-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics