On the complexity of linear and stratified context matching problems
Abstract
We investigate the complexity landscape of context matching with respect to the number of occurrences of variables (i.e. linearity vs. varity 2) and various restrictions of stratification. We show that stratified context matching (SCM) and varity 2 context matching are NP-complete, but that stratified simultaneous monadic context matching (SSMCM) is in P. SSMCM is equivalent to stratified simultaneous word matching (SSWM). We also show that the linear and the Comon-restricted case are in P and of time complexity O(n³). We give an algorithm for context matching and discuss how the performance of the general case can be improved through the use of information derived from polynomial approximations of the problem.