Question: 2. [Lower Bound for Sorting Consider a comparison based sorting algorithm for sorting an input of n numbers x1^2. .. Vn where n is even.

 2. [Lower Bound for Sorting Consider a comparison based sorting algorithm

2. [Lower Bound for Sorting Consider a comparison based sorting algorithm for sorting an input of n numbers x1^2. .. Vn where n is even. Suppose that the sorting algorithm is also given the following additional information: x1,23, ,Tn-1 will be in the first half of the sorted order and x2,x4,... , Tn will be in the second half of the sorted order. Show that any comparison based sorting algorithm still requires ?(n logn) time to sort x?X2-..Xn even if it is given this additional information. [10 Marks (Hint: what is the number of leaves in the decision tree now?)

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!