Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Professor Holmes has come up with a new sorting algorithm. He calls it Trinary Sort and claims that it is asymptotically faster than Merge Sort,

Professor Holmes has come up with a new sorting algorithm. He calls it Trinary Sort and claims that it is asymptotically faster than Merge Sort, despite the fact both the algorithms operate using similar logic. But, unlike Merge Sort, Trinary Sort splits the input array into (roughly)3 equal parts at each step of the recursion as long as the array is splittable (i.e., has at least 3 elements). Trinary Sorts merge subroutine, similar in principle to the one used by Merge Sort, takes 3 sorted subarrays and merges them to produce a single sorted array. Given all of this, answer the following questions. (a)[4 points] In Merge Sort, the merge subroutine makes n1 comparisons to merge 2 arrays of size n/2, which takes \Theta (n) time. How many comparisons will the merge subroutine of Page 5 of 6 Trinary Sort make to merge 3 arrays of size n/3? What would be the \Theta () bound on the running time for this subroutine?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Select Healthcare Classification Systems And Databases

Authors: Katherine S. Rowell, Ann Cutrell

1st Edition

0615909760, 978-0615909769

More Books

Students also viewed these Databases questions