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 lenght n, a pattern of length m and an integer k, we present parallel and serial algorthms for finding all occurrences of the pattern in the text with at most k differences. The parallel algorithm requires O(log m + k) time using n processors. The serial algorithm runs in O(nk) time for an alphabet whose size is fixed.
Bibliographical noteFunding Information:
*[LV-86a] is a preliminary version of this paper. The research was supported by the Applied Mathematical Sciences subprogram of the Office of Energy Research, U.S. Department of Energy under Contract DE-AC02-76ERO3077. +Present address: Department of Computer Science, Polytechnic University, 333 Jay Street, Brooklyn, NY 11201. *Present address: Department of Computer Science, School of Mathematical Sciences, Sackler Faculty of Exact Sciences, Tel Aviv University, Tel Aviv 69978, Israel. The research of this author was supported by NSF Grant NSF-CCR-8615337, ONR Grant NOOO14-85-K-0046 and Foundation for Research in Electronics, Computers and Communication, Administered by the Israeli Academy of Sciences and Humanities.
ASJC Scopus subject areas
- Control and Optimization
- Computational Mathematics
- Computational Theory and Mathematics