[Solved] CH-231-A Assignment 4

Click And Check all our Assignments
Click Here and Upload you Assignment for Free!


100/100 Trustscore on scamadviser.com

10 USD $

Category: Tag:

Problem 4.1 Merge Sort

  • (4 points) Implement a variant of Merge Sort that does not divide the problem all the waydown to subproblems of size 1. Instead, when reaching subsequences of length k it applies Insertion Sort on these n/k
  • (3 points) Apply it to the different sequences which satisfy best case, worst case and averagecase for different values of k. Plot the execution times for different values of k.
  • (3 points) How do the different values of k change the best-, average-, and worst-case asymptotic time complexities for this variant? Explain/prove your answer.
Algorithms and Data Structures Course: CH-231-A
Jacobs University Bremen Dr. Kinga Lipskoch February 23rd, 2021
  • (2 points) Based on the results from (b) and (c), how would you choose k in practice? Briefly explain.

Problem 4.2 Recurrences

Use the substitution method, the recursion tree, or the master theorem method to derive upper and lower bounds for T(n) in each of the following recurrences. Make the bounds as tight as possible. Assume that T(n) is constant for n≤ 2.

  • (2 points) T(n) = 36T(n/6) + 2n,
  • (2 points) T(n) = 5T(n/3) + 17n1.2,
  • (2 points) T(n) = 12T(n/2) + n2 lgn,
  • (2 points) T(n) = 3T(n/5) + T(n/2) + 2n,
  • (2 points) T(n) = T(2n/5) + T(3n/5) + Θ(n).


There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CH-231-A Assignment 4
10 USD $