Question: 1. Suppose you are choosing between the following three algorithms: - Algorithm A solves problems by dividing them into five subproblems of half the size,

1. Suppose you are choosing between the following three algorithms: - Algorithm A solves problems by dividing them into five subproblems of half the size, recursively solving each subproblem, and then combining the solutions in linear time. - Algorithm B solves problems of size n by recursively solving two subproblems of size n1 and then combining the solutions in constant time. - Algorithm C solves problems of size n by dividing them into nine subproblems of size n/3, recursively solving each subproblem, and then combining the solutions in Q(n2) time. What are the running times of each of these algorithms (in big-O notation), and which would you choose? 2. Solve the following recurrence relations and give a O (in big-O notation) bound for each of them a. T(n)=2T(n/3)+1 b. T(n)=5T(n/4)+n c. T(n)=7T(n/7)+n d. T(n)=9T(n/3)+n2 e. T(n)=8T(n/2)+n3 3. Draw the recursive process of Mergesort and Quicksort for sorting the sequence {5,1,2, 9, 7\}. You will get a recursion tree for Mergesort and Quicksort respectively. What are their depths
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
