Pattern matching with variables: A multivariate complexity analysis

A pattern α, i.e., a string that contains variables and terminals, matches a terminal word w if w can be obtained by uniformly substituting the variables of α by terminal words. Deciding whether a given terminal word matches a given pattern is NP-complete and this holds for several natural variants of the problem that result from whether or not variables can be erased, whether or not the patterns are required to be terminal-free or whether or not the mapping of variables to terminal words must be injective. We consider numerous parameters of this problem (i.e., number of variables, length of w, length of the words substituted for variables, number of occurrences per variable, cardinality of the terminal alphabet) and for all possible combinations of the parameters (and variants described above), we answer the question whether or not the problem is still NP-complete if these parameters are bounded by constants.

[1]  Moshe Lewenstein,et al.  Function Matching: Algorithms, Applications, and a Lower Bound , 2003, ICALP.

[2]  Dana Angluin,et al.  Finding Patterns Common to a Set of Strings , 1980, J. Comput. Syst. Sci..

[3]  Arto Salomaa,et al.  Pattern languages with and without erasing , 1994 .

[4]  Arto Salomaa,et al.  Finite Degrees of Ambiguity in Pattern Languages , 1994, RAIRO Theor. Informatics Appl..

[5]  Sheng Yu,et al.  A Formal Study Of Practical Regular Expressions , 2003, Int. J. Found. Comput. Sci..

[6]  Oscar H. Ibarra,et al.  A note on parsing pattern languages , 1995, Pattern Recognit. Lett..

[7]  Dominik D. Freydenberger,et al.  Bad News on Decision Problems for Patterns , 2008, Developments in Language Theory.

[8]  Henning Fernau,et al.  Pattern matching with variables: A multivariate complexity analysis , 2013, Inf. Comput..

[9]  Raphaël Clifford,et al.  Generalised Matching , 2009, SPIRE.

[10]  Daniel Reidenbach,et al.  Patterns with Bounded Treewidth , 2012, LATA.

[11]  Dana Angluin,et al.  Finding patterns common to a set of strings (Extended Abstract) , 1979, STOC.

[12]  Daniel Reidenbach,et al.  Discontinuities in pattern inference , 2008, Theor. Comput. Sci..

[13]  Anthony Widjaja Lin,et al.  Expressive Languages for Path Queries over Graph-Structured Data , 2012, TODS.

[14]  Daniel Reidenbach,et al.  A non-learnable class of E-pattern languages , 2006, Theor. Comput. Sci..

[15]  Markus L. Schmid On the membership problem for pattern languages and related topics , 2012 .

[16]  Tao Jiang,et al.  Decision Problems for Patterns , 1995, J. Comput. Syst. Sci..

[17]  Andrzej Ehrenfeucht,et al.  Finding a Homomorphism Between Two Words is NP-Complete , 1979, Inf. Process. Lett..

[18]  Thomas J. Schaefer,et al.  The complexity of satisfiability problems , 1978, STOC.

[19]  Takeshi Shinohara,et al.  Polynomial Time Inference of Extended Regular Pattern Languages , 1983, RIMS Symposium on Software Science and Engineering.

[20]  Markus L. Schmid Inside the Class of regex Languages , 2013, Int. J. Found. Comput. Sci..

[21]  Sandra Zilles,et al.  Learning Relational Patterns , 2011, ALT.

[22]  Jan Kratochvíl,et al.  On the Computational Complexity of Codes in Graphs , 1988, MFCS.

[23]  Dominik D. Freydenberger,et al.  Inclusion problems for patterns with a bounded number of variables , 2010, Inf. Comput..

[24]  Markus L. Schmid A note on the complexity of matching patterns with variables , 2013, Inf. Process. Lett..

[25]  Takeshi Shinohara,et al.  Developments from enquiries into the learnability of the pattern languages from positive data , 2008, Theor. Comput. Sci..

[26]  Daniel Reidenbach,et al.  A Polynomial Time Match Test for Large Classes of Extended Regular Expressions , 2010, CIAA.

[27]  Amihood Amir,et al.  Generalized function matching , 2007, J. Discrete Algorithms.

[28]  Dominik D. Freydenberger,et al.  Unambiguous Morphic Images of Strings , 2005, Developments in Language Theory.

[29]  Brenda S. Baker Parameterized Pattern Matching: Algorithms and Applications , 1996, J. Comput. Syst. Sci..

[30]  Enno Ohlebusch,et al.  On the Equivalence Problem for E-Pattern Languages , 1997, Theor. Comput. Sci..

[31]  Jeffrey E. F. Friedl Mastering Regular Expressions , 1997 .