Question: Consider a simplified version of bucket-sort. You are given an array A of n random integers in the range [1...r] as input. The output

Consider a simplified version of bucket-sort. You are given an array A of n random integers in the range [1...r] as input. The output data consist of r buckets, such that at the end of the algorithm, Bucket i contains indices of all the elements in A that are equal to i. i. ii. iii. Describe a decomposition based on partitioning the input data (i.e., the array A) and an appropriate mapping onto p processes. Describe briefly how the resulting parallel algorithm would work. Describe a decomposition based on partitioning the output data (i.e., the set of r buckets) and an appropriate mapping onto p processes. Describe briefly how the resulting parallel algorithm would work. Which of the two decompositions (i or ii) leads to a better parallel algorithm? Should the relative values of n and r have a bearing on the selection of one of the two decomposition schemes?
Step by Step Solution
3.41 Rating (154 Votes )
There are 3 Steps involved in it
i Each process is responsible for a range of elements in the array The process iter ates through its ... View full answer
Get step-by-step solutions from verified subject matter experts
