Solved by verified expert:recurrence relations and matrices and binary search algorithmsproblems on uploaded doc
hw2.pdf
Unformatted Attachment Preview
CS 331 Design and Analysis of Algorithms
Homework #2
(Due: 10/26/17)
Note: Turn in your homework with a cover sheet including your name and last 4 digits of your
student ID # so that your grade can be correctly recorded. Write on only one side of each page.
(Total: 100 points)
1. (25 points) Given the recurrence relations. Find T(1024).
T(n) = 2T(n/4) + 2n + 4 for n > 1
T(1) = 1
2. (25 points) Given two matrices A and B.
3 0 3 1
2 4
5 3 1 0
1 3
A
B
3 0 3 1
3 0
1 2 2 5
0 4
5
2
5
1
2
1
0
4
(a) Calculate the product C (=AxB) using the Strassen’s matrix multiplication algorithm.
Show all steps.
(b) Count exactly how many basic multiplication operations and basic addition
operations are there in your calculation.
3. (25 points)
(a) Design a variant “binary” search algorithm which splits the set not into 2 sets of equal
sizes (½ and ½), but into 2 sets of sizes one quarter (1/4) and three quarters (3/4).
(b) Give the recurrence relations of your algorithm.
(c) How does this algorithm compare with the original binary search in both the best case
complexity and the worst case complexity?
4. (25 points) Solve the following recurrence relations.
3T(n/3) + 4n
if n > 1
1
if n = 1
T(n) =
…
Purchase answer to see full
attachment
You will get a plagiarism-free paper and you can get an originality report upon request.
All the personal information is confidential and we have 100% safe payment methods. We also guarantee good grades
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more