We present parallel algorithms for exact and approximate pattern matching
with suffix arrays, using a CREW-PRAM with p processors. Given a static text
of length n, we first show how to compute the suffix array interval of a
given pattern of length m in O(pm+lgp+lglgp⋅lglgn)
time for p≤m. For approximate pattern matching with k differences or
mismatches, we show how to compute all occurrences of a given pattern in
O(pmkσkmax(k,lglgn)+(1+pm)lgp⋅lglgn+occ) time, where σ is the size of the alphabet
and p≤σkmk. The workhorse of our algorithms is a data structure
for merging suffix array intervals quickly: Given the suffix array intervals
for two patterns P and P′, we present a data structure for computing the
interval of PP′ in O(lglgn) sequential time, or in O(1+lgplgn)
parallel time. All our data structures are of size O(n) bits (in addition to
the suffix array)