External inverse pattern matching

Abstract

We consider {\sl external inverse pattern matching} problem. Given a text \t of length nn over an ordered alphabet Σ\Sigma, such that Σ=σ|\Sigma|=\sigma, and a number mnm\le n. The entire problem is to find a pattern \pe\in \Sigma^m which is not a subword of \t and which maximizes the sum of Hamming distances between \pe and all subwords of \t of length mm. We present optimal O(nlogσ)O(n\log\sigma)-time algorithm for the external inverse pattern matching problem which substantially improves the only known polynomial O(nmlogσ)O(nm\log\sigma)-time algorithm introduced by Amir, Apostolico and Lewenstein. Moreover we discuss a fast parallel implementation of our algorithm on the CREW PRAM model

    Similar works