Article ID Journal Published Year Pages File Type
427162 Information Processing Letters 2013 5 Pages PDF
Abstract

•The matching problem for patterns with variables is investigated.•The NP-completeness for a strongly restricted version of this problem is shown.•Classes of patterns are identified for which this problem can be solved efficiently.

A word matches a pattern with variables (i.e., a string that contains terminal symbols and variable symbols) if and only if it can be obtained from the pattern by substituting the variables by terminal words. To decide for a given word whether or not it matches a pattern with variables is an NP-complete problem, which has been independently discovered and investigated in different areas of theoretical computer science and which has applications in various contexts. In this work, we show that the problem of matching patterns with variables remains NP-complete even if every variable has at most two occurrences. In addition to this, we show that if patterns can be represented as special kinds of planar graphs, then they can be matched in polynomial time.

Related Topics
Physical Sciences and Engineering Computer Science Computational Theory and Mathematics
Authors
,