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 22:00
When determining the classification of data, which one of the following is the most important consideration? a. processing systemb. valuec. storage mediad. accessibility
Answers: 2
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. which step can possibly increase the severity of an incident? a. separating sensitive data from non-sensitive data b. immediately spreading the news about the incident response plan c. installing new hard disks d. increasing access controls
Answers: 2
question
Computers and Technology, 24.06.2019 09:50
Self contained sequences of actions to be performed are? a. expressions b. algorithms c. functions d. formulas
Answers: 1
question
Computers and Technology, 24.06.2019 18:00
Which of the following is an example of synchronous communication? a) e-mail b) voicemail c) telephone conversation d) text message.
Answers: 1
You know the right answer?
Mergesort3: your friend suggests the following variation of mergesort: instead of splitting the lis...
Questions
question
Mathematics, 22.07.2020 20:01
question
Mathematics, 22.07.2020 20:01
question
Mathematics, 22.07.2020 20:01
question
Mathematics, 22.07.2020 20:01
question
Mathematics, 22.07.2020 20:01
question
Mathematics, 22.07.2020 20:01
question
Mathematics, 22.07.2020 20:01
question
Mathematics, 22.07.2020 20:01
question
Physics, 22.07.2020 20:01
question
Mathematics, 22.07.2020 20:01
question
Mathematics, 22.07.2020 20:01
Questions on the website: 13722360