Question: THIS IS THE QUESTION ABOUT THE D&L OF ALGORITHMS Recurrence Relations for Complexity Analysis QUESTION 4: A very natural question to ask related to MergeSort

THIS IS THE QUESTION ABOUT THE D&L OF ALGORITHMS

Recurrence Relations for Complexity Analysis

QUESTION 4: A very natural question to ask related to MergeSort is whether we can do better by dividing the list into more than two parts. It turns out we can't do any better, at least in the worst case. In this exercise you will verify this fact mathematically. TriMergeSort, given below, is a variant of MergeSort, where the list is split into three equal parts instead of two. For convenience, assume that n= 3^k , for some nonnegative integer k.

(a) Give a recurrence relation for the worst-case complexity W(n) of TriMergeSort for an input list of size n.

(b) Solve the recurrence formula you have given in (a) to obtain an explicit formula for the worst-case complexity W(n) of TriMergeSort.

(c) Which is more efficient in the worst case, MergeSort or TriMergeSort? Discuss.

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!