Efficient string matching in the presence of errors

  • Authors:
  • Gad M. Landau;Uzi Vishkin

  • Affiliations:
  • -;-

  • Venue:
  • SFCS '85 Proceedings of the 26th Annual Symposium on Foundations of Computer Science
  • Year:
  • 1985

Quantified Score

Hi-index 0.00

Visualization

Abstract

Consider the string matching problem where differences between characters of the pattern and characters of the text are allowed. Each difference is due to either a mismatch between a character of the text and a character of the pattern or a superfluous character in the text or a superfluous character in the pattern. Given a text of length n, a pattern of length m and an integer k, we present an algorithm for finding all occurrences of the pattern in the text, each with at most k differences. The algorithm runs in O(m2 + k2n) time. Given the same input we also present an algorithm for finding all occurrences of the pattern in the text, each with at most k mismatches (superfluous characters in either the text or the pattern are not allowed). This algorithm runs in O(k(m logm + n)) time.