The Problem of Context Sensitive String Matching

  • Authors:
  • Venkatesan T. Chakaravarthy;Rajasekar Krishnamurthy

  • Affiliations:
  • -;-

  • Venue:
  • CPM '02 Proceedings of the 13th Annual Symposium on Combinatorial Pattern Matching
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

In the context sensitive string matching problem, we are given a pattern and a text. The pattern is a string over variables and constants and the text is a string of constants. The goal is to find if there is a mapping from variables to strings of constants so that on applying this mapping to the pattern we get the given text. Languages like Perl and Python support such a sophisticated string matching. The problem is known to be NP-Complete. In this paper, we consider a weighted version of this problem that checks how close the pattern can be matched with the text. We show that this variation is MAXSNP-Complete and cannot be approximated within a factor of 3313/3312. We show that even the restriction, where the pattern consists of variables only, is NP-Complete and MAXSNP-Complete. When the alphabet is bounded, we give an approximation algorithm for this restriction.