

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A university homework assignment for a course on analysis of algorithms (cot5405). The assignment covers topics such as proving or disproving algorithm complexities, ordering functions according to asymptotic order, solving recurrence relations without using the master theorem, and solving recurrences using the master theorem. The assignment also includes a problem where the goal is to design a sub-linear algorithm to find the maximum safe height for dropping a laptop without breaking it.
Typology: Quizzes
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Unless otherwise specified, each time you give an algorithm, you must state and justify its complexity. You answer should begin with a high-level description of your solution in plain English, and then the pseudo-code, if necessary. The English description should convey the core idea of your proposed solution, and should include the proof of correctness (basically, showing why your algorithm works). You can even omit the pseudo-code if 1) you think your English description is clear enough to specify both the algorithm and its proof of correctness very precisely, and 2) the complexity is very much evident from your English description. We attempt to grade the answer right after reading the English description, and only in a few occasions we do look into the pseudo-code. Absolutely no pseudo-code without any English description preceding that would be accepted. For knowing what pseudo-code is, please go to the class website. Pseudo-codes that look like programs will be treated as programs only and will NOT be looked into. Every problem below has a page limit. Do not exceed that. And, page means one side of a page, so if we say page limit is 1 page, we mean only one side of a page. If we say that the page limit is 2 pages, then you can write on both sides of the page. If you think that the given page limit is too short, then type your answer. Any portion of the answer that exceeds the page limit is simply ignored. Each of the following 8 questions must be answered on a fresh page.
Problems
(a) n^1.^001 + n log n = θ(n^1.^001 ) (b) n^3 /log n = ω(n^2 )
(a) T (n) = 2T (n/2) + n/log n (b) T (n) = T (
n) + 1 (c) T (n) = 2T (n/3) + T (n/4) + n
(a) T (n) =
nT (
n) + n (b) T (n) = 4T (n/4) + 5n (log n)^2 + n
n (c) T (n) = 2T (n/2) + n (log n)^3
(a) Design an o(n) (small-o) algorithm to find the maximum safe height when m = 2. (b) For each m > 2, design an algorithm for finding the maximum safe height using at most m laptops. Let gm(n) be the number of drops using this algorithm. Then your algorithm should satisfy that gm(n) = o(gm− 1 (n)) (small-o) for each m.