Question: 6.17 Plurality voting on the PRAM Devise an efficient PRAM algorithm for plurality voting. There are p processors and a vectorx(1. of data values. The

 6.17 Plurality voting on the PRAM Devise an efficient PRAM algorithm

6.17 Plurality voting on the PRAM Devise an efficient PRAM algorithm for "plurality voting." There are p processors and a vectorx(1. of data values. The algorithm should compute a pair of results y and w such that the value y = XU] appears w times in x and no other value has more appearances. For example, x = 5 7 4 5 4 should yield y = 5 or y = 4 with w 2, since both 5 and 4 appear twice in x, whereas 7 appears only once. a. Describe your algorithm in high-level terms, using known subalgorithms if needed. b. Analyze the worst-case running time of the algorithm. C. How much simpler can the algorithm become if standard "majority voting" is desired? Assume that a majority always exists and that only the single result y is to be computed

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 Databases Questions!