Question: Consider the PTp algorithm (p=2n-1) that we covered in the lectures for finding the kth smallest number in a given list. Suppose that n=8 and

Consider the PTp algorithm (p=2n-1) that we covered in the lectures for finding the kth smallest number in a given list. Suppose that n=8 and initially the leaf processors (in left-to-right order) contain the list elements 63, 50, 26, 48, 7, 12, 60, and 28. That is, the leftmost one contains 63, etc. Suppose k=4. Which of the following is the configuration in the leaf processors (in left-to-right order) during the execution of the algorithm? Select one: O a. --, 50, 26, 48, 7, 12, 60, - -0, -20, 26, 48, 7, 12, -20, -- --, -, -00, 48, 7, -, -, - -00, -00, -00, -00, -00, -00, -00,- O b. 63, 50, 26, 48, -6, 12, 60, 28 63, 50, 26, 48, -20, -00, 60, 28 63, 50, -6, 48, -, -, 60, 28 63, 50, -, 48, -, -, 60,- O c. -0, 50, 26, 48, 7, 12, 60, 28 -0, -00, 26, 48, 7, 12, 60, 28 -0, -00, -0, 48, 7, 12, 60, 28 -c, -00, -, -00, 7, 12, 60, 28 O d. 63, -6, 26, -6, 7, -, 60, - --, -, 26, -00, -00, -00, 60, - -co, -c, 26, -co, -co, -c, -00,- -0, -00, -00, -00, -00, -00, -00,-00
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
