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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 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.
Source codes are available at https://github.com/igarashi/matchingwithvcmap.
- 3.
References
Amir, A., Aumann, Y., Lewenstein, M., Porat, E.: Function matching. SIAM J. Comput. 35(5), 1007–1022 (2006)
Amir, A., Farach, M., Muthukrishnan, S.: Alphabet dependence in parameterized matching. Inf. Process. Lett. 49(3), 111–115 (1994)
Amir, A., Nor, I.: Generalized function matching. J. Discrete Algorithms 5(3), 514–523 (2007)
Baker, B.S.: Parameterized pattern matching: algorithms and applications. J. Comput. Syst. Sci. 52(1), 28–42 (1996)
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)
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)
Du Mouza, C., Rigaux, P., Scholl, M.: Parameterized pattern queries. Data Knowl. Eng. 63(2), 433–456 (2007)
Fischer, M.J., Paterson, M.S.: String-matching and other products. Technical report, DTIC Document (1974)
Igarashi, Y.: A study on the parameterized pattern matching problems for real data (in Japanese). Bachelor thesis, Tohoku University (2017)
Igarashi, Y., Diptarama, Yoshinaka, R., Shinohara, A.: New variants of pattern matching with constants and variables. CoRR abs/1705.09504 (2017)
Iliopoulos, C.S., Rahman, M.S.: Pattern matching algorithms with don’t cares. In: Proceedings of the 33rd SOFSEM, pp. 116–126. Citeseer (2007)
Knuth, D.E., Morris Jr., J.H., Pratt, V.R.: Fast pattern matching in strings. SIAM J. Comput. 6(2), 323–350 (1977)
Mendivelso, J., Pinzón, Y.J.: Parameterized matching: solutions and extensions. In: Stringology, pp. 118–131. Citeseer (2015)
Tarjan, R.E.: Efficiency of a good but not linear set union algorithm. J. ACM (JACM) 22(2), 215–225 (1975)
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
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer International Publishing AG
About this paper
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)