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 1 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 10 processors. Following table represents the 10 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 \(\mathrm{ml},\mathrm{m}2,\mathrm{~m}3,\mathrm{~m}4,\mathrm{~m}5,\mathrm{~m}6\) and m 7 be 100,40,170,20,90,12 and 38 respectively.
Explain briefly, how the above task will be accomplished if we have 4 processors. Show all the steps.
a . Consider a parallel algorithm for sorting an

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!