Parallel Computations of Levenshtein Distances
This chapter discusses parallel solutions for the string editing problem introduced in Chapter 5. The model of computation used is the synchronous, shared - memory machine referred to as PRAM and discussed also earlier in this book. The algorithms of this chapter are based on the CREW and CRCW variants of the PRAM. In the CREW - PRAM model of parallel computation concurrent reads are allowed but no two processors can simultaneously attempt to write in the same memory location (even if they are trying to write the same thing). The CRCW - PRAM differs from the CREW - PRAM in that it allows many processors to attempt simultaneous writes in the same memory location: in any such common-write contest, only one processor succeeds, but it is not known in advance which one. The primary objective of PRAM algorithmic design is to devise algorithms that are both fast and efficient for problems in a particular class called NC. Problems in NC are solvable in O(logo(1) n) parallel time by a PRAM using a polynomial number of processors. In order for an algorithm to be both fast and efficient, the product of its time and processor complexities must fall within a polylog factor of the time complexity of the best sequential algorithm for the problem it solves. This goal has been elusive for many simple problems, such as topological sorting of a directed acyclic graph and finding a breadth-first search tree of a graph, which are trivially in NC. For some other problems in NC, it seems counter-intuitive at first that any fast and efficient algorithm may exist, due to the overwhelming number of simultaneous subproblems that arise at some point of the computation. Such is the case of the string-editing problem. This chapter will show that string editing can be solved in O((log n)2) time and O(n2/ log n) processors on the CREW-PRAM, and in O(log n loglog n) time and O(n2/ loglogn) processors on the CRCW-PRAM. Throughout, it will be convenient to analyze our algorithms using the time and work (i.e., number of operations) complexities.