Efficient Parallel Binary Search on Sorted Arrays
Danny Z. Chen · Purdue e-Pubs (Purdue University System) · 1990
Let A be an array of n numbers and B an array of m numbers, where A and B are sorted and n < m. We consider the problem of determining for each element AU), 1 ::; j ~ n, the element B(i) such that BCi) ::; A(j) < BCi + I), where 0 S i :S m (with B(O) = -00 and B(m + 1) = +00). Efficient parallel algorithms on the EREW-PRAM for this problem have been given [I, 8]. In this paper, we present a parallel algorithm to solve it in O(logm) time using O((nlog(mjn»Jlogm) EREW-PRAM processors. OUf solution improves the previous known results either on the time or on the total work complexity, and it can be used to obtain a different parallel algorithm fOf merging two sorted arrays of size m each in O(logm) time using Oem/ lagm) EREW-PRAM processors.