For k Z+, let n = 2k, and consider the list L: a1, a2, a3, ...,

Question:

For k ∈ Z+, let n = 2k, and consider the list L: a1, a2, a3, ..., an. To sort L in ascending order, first compare the entries at and al+(n/2), for each 1 ≤ i ≤ n/2. For the resulting 2k-1 ordered pairs, merge sort the ith and (i + (n/4))-th ordered pairs, for each 1 ≤ i ≤ n/4. Now do a merge sort on the ith and (i + (n/8))-th ordered quadruples, for each 1 ≤ i ≤ n/8. Continue the process until the elements of L are in ascending order.
(a) Apply this sorting procedure to the list
L: 11, 3, 4, 6, - 5, 7, 35,
- 2, 1, 23, 9, 15, 18, 2, - 10, 5.
(b) If n = 2k, how many comparisons at most does this procedure require?
Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: