subject

Mergesort3: your friend suggests the following variation of mergesort: instead of splitting the list into two halves, we split it into three thirds. then we recursively sort each third and merge them. mergesort3 (): if n < = 1, then return a[1..n] let k = n/3 and m = 2n/3 mergesort3(a[1..k]) mergesort3(a[k+1..m]) mergesort3(a[m+1..n)merge3(a[1..k], a[k+, a[m+1..n])return a[1..m].merge3(l0, l1, l2): return merge(l0, merge(l1, that you have a function merge that merges two sorted lists of lengths q and p in time k(q+p) where k is a constant. you may assume that n is a power of 3, if you wish.(a) what is the asymptotic running time for executing merge3(l0, l1, l2), if l0, l1, l2 are three sorted lists of length n/3? give the tightest bound possible. show your work! (b) let t(n) denote the running time of mergesort3 on an array of size n. write a recurrence relation for t(n) and solve it using the tightest bounds possible.(c) compare the running time of mergesort3 to the running time of ordinary mergesort.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 19:30
Keep your choice of a major there is probably no single correct choice.
Answers: 1
question
Computers and Technology, 22.06.2019 00:30
At an open or uncontrolled intersection, yield if a. your road is paved and the crossroad is not b. the cross road is paved and yours is not c. you have two or more passengers in your vehicle d. you did not yield in the last intersection
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
What are listed in the vertical columns across the top of the event editor? a. file names b. conditions c. check marks d. action types
Answers: 1
question
Computers and Technology, 23.06.2019 18:20
What is wi-fi infrastructure? a metropolitan area network that uses radio signals to transmit and receive data a communications technology aimed at providing high-speed wireless data over metropolitan area networks a means by which portable devices can connect wirelessly to a local area network, using access points that send and receive data via radio waves includes the inner workings of a wi-fi service or utility, including the signal transmitters, towers, or poles and additional equipment required to send out a wi-fi signal
Answers: 2
You know the right answer?
Mergesort3: your friend suggests the following variation of mergesort: instead of splitting the lis...
Questions
question
Chemistry, 26.04.2021 23:30
question
Mathematics, 26.04.2021 23:30
question
Mathematics, 26.04.2021 23:30
question
Mathematics, 26.04.2021 23:30
Questions on the website: 13722367