Question: In mergesort algorithm we separate T[1...n] into two half size arrays. Consider the following algorithm. Let n be power of 3 (n = 3^k). Separate

 In mergesort algorithm we separate T[1...n] into two half size arrays.

In mergesort algorithm we separate T[1...n] into two half size arrays. Consider the following algorithm. Let n be power of 3 (n = 3^k). Separate n to three arrays of size n/3, (n+1)/3, (n+2)/3. Sort each of these recursively and then merge the three sorted arrays. Call this algorithm Tri_Mergesort. a. What is the recurrence equation? b. Solve the recurrence equation and find the running time of this algorithm. c. is Tri_Mergesort algorithm better than the mergesort we considered in class

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!