Question: Here we will study what happens to Merge Sort if we divide the given problem into more than two sub problems. Consider the modification to

Here we will study what happens to Merge Sort if we divide the given problem into more than two sub problems. Consider the modification to the Merge Sort procedure that at each step of the recursion, divides the problem of size n into √ n sub problems each of size √ n. In this problem you will analyze the running time of this version of Merge Sort.

• Show how to use the merge procedure for merging two sorted arrays in order to merge √ n sorted arrays each of size √ n. Analyze the run time in O() notation.

• Use the analysis above to write the recurrence relation for the √ n-way merge sort procedure and analyze the run time in O() notation.

• Design a better algorithm for merging √ n sorted arrays each of size √ n. Your algorithm should run in Θ(n log n) time. [Hint: Use divide and conquer]

• Use the faster merging procedure to analyze the new recurrence for the √ n-way merge sort procedure and analyze the run time in O() notation. 

Step by Step Solution

3.40 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

MERGE SORT were using divideandconquer to sort we need to decide what our subproblems are going to l... View full answer

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