Question: a . Consider a parallel algorithm for sorting an array of ' ( n ) ' elements using comparison based sorting. The algorithm
a Consider a parallel algorithm for sorting an array of n elements using comparison based sorting. The algorithm runs in n steps such that step has n instructions that can be executed in parallel and all the remaining steps have 'log n instructions. Suppose the algorithm uses n processors. Is the algorithm optimal? If not, can you make it optimal? Justify your answer.
b Consider an algorithm using a collision CRCW model and processors. Following table represents the processors, the memory location each processor will write to and the data that will be written to the respective memory locations.
Also, let the old data in memory locations mathrmmlmathrmmmathrm~mmathrm~mmathrm~mmathrm~m and m be and respectively.
Explain briefly, how the above task will be accomplished if we have processors. Show all the steps.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
