Question: In the problems that follow, you will compare these three algorithms for sorting Tgnoring lower order terms and constant factors, let Ti(n), T2(n), and Ts(n)

 In the problems that follow, you will compare these three algorithms

In the problems that follow, you will compare these three algorithms for sorting Tgnoring lower order terms and constant factors, let Ti(n), T2(n), and Ts(n) be the "effort" required by INSERTION-SORT, SHELL-SORT, and MERGE-SORT, respectively, to sort a list of length n. We have T2(n) Ts(n) nlg2n nlgn = = where Ig n is log2(n) i. Suppose that you were given a budget of 100,000 units of "effort." For each of the three algorithms, determine the largest list length such that the sorting effort required is guaranteed to be at most 100,000. ii. How many times larger is the list that MERGE-SORT can handle, as compared to the lists that INSERTION-SORT and SHELL-SORT can handle? How many times larger is the list that SHELL-SORT can handle, as compared to the list that INSERTION-SORT can handle? iii. Suppose you are running the three algorithms on three different computers. The computer running INSERTION-SORT is 5 times faster than the one running SHELL-SORT, and the com puter running SHELL-SORT is 20 times faster than the one running MERGE-SORT. How large must the list be before the computer running MERGE-SORT begins to outperform the one running SHELL-SORT? How large must the list be before the computer running SHELL-SORT begins to outperform the one running INSERTION-SORT

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!