Question: Just as with ordinary serial algorithms, we sometimes want to implement randomized multithreaded algorithms. This problem explores how to adapt the various performance measures in

Just as with ordinary serial algorithms, we sometimes want to implement randomized multithreaded algorithms. This problem explores how to adapt the various performance measures in order to handle the expected behavior of such algorithms. It also asks you to design and analyze a multithreaded algorithm for randomized quicksort.

a. Explain how to modify the work law (27.2), span law (27.3), and greedy scheduler bound (27.4) to work with expectations when TP, T1, and T∞ are all random variables.

b. Consider a randomized multithreaded algorithm for which 1% of the time we have T1 = 104 and T10,000 = 1, but for 99% of the time we have T1 = T10,000 = 109. Argue that the speedup of a randomized multithreaded algorithm should be defined as E [T1] =E [TP], rather than E O[1/TP].

c. Argue that the parallelism of a randomized multithreaded algorithm should be defined as the ratio E [T1] =E [T∞].

d. Multithread the RANDOMIZED-QUICK-SORT algorithm on page 179 by using nested parallelism. (Do not parallelize RANDOMIZED-PARTITION.) Give the pseudocode for your P-RANDOMIZED-QUICK-SORT algorithm.

e. Analyze your multithreaded algorithm for randomized quicksort.

Step by Step Solution

3.34 Rating (166 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a The work law 272 span law 273 and greedy scheduler bound 274 can be modified to work wit... View full answer

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 Introduction to Algorithms Questions!