Two sequences of items sorted in increasing order are given: asequence A of size n and a sequence B of sizem. It is required to determine, for every item of A,the smallest item of B (if one exists) that is larger than it.The paper presents two parallel algorithms for the problem. The firstalgorithm requires O(logm+logn) time using nprocessors on an EREW PRAM. On an EREW PRAM with p(p⩽min{m, n}) processors, the secondalgorithm runs in O(logn+p/n) time whenm⩽n, or in O(logm+p/nlogn/2m) time when mn.The second algorithm is optimal
展开▼
机译:给出了两个按升序排列的项目序列:
大小为 n e1>的序列 A e1>和大小为 B e1>的序列
m e1>。对于 A e1>的每个项目,都需要确定
B e1>的最小项目(如果存在)大于该项目。
本文提出了针对该问题的两种并行算法。首先
算法需要使用 n e1>的O(log m e1> + log n e1>)时间
EREW PRAM上的处理器。在具有 p e1>的EREW PRAM上
( p e1>⩽ min { m e1>, n e1>})个处理器,第二个
算法在以下情况下以O(log n e1> + p sub> / n sup>)时间运行
m e1>⩽ n e1>,或O(log m e1> + p sub> / n
sup> log n sub> / 2m sup>)时间,当 m e1 >> n e1>时。
第二种算法是最优的
展开▼