Approximate Pattern Matching Problem