

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Writing Style: We suggest the following steps in writing up your solutions, when they are applicable. For a detailed writing style guidelines, please consult http://cseweb.ucsd.edu/˜ paturi/cse202/guide.html.
Problem 1: Function order Rank the following functions by order of growth; that is, find an enumeration f 1 , f 2 ,... of the functions so that f 1 = Ω(f 2 ), f 2 = Ω(f 3 ),.. .. Also partition your list into equivalence classes such that f and g are in the same class if and only if f = Θ(g).
2)lg^ n, n^0.^99 , n/ lg n, n^3 , n!, 22
n , (3/2)n, 1 , 2 n, 4 lg^ n, nlg^ n, lg lg n 3 n, n^2 /^3 , 1 /
n, 2
√ lg n
1 /n, n^1.^01 , n lg n, 4 n/^2 , n^2 / log n, n^1.^99 , n 2 n
Problem 2: Function Order Is the function 2 lg (^2) n polynomially bounded? Is the function dlog log ne! polynomially bounded? Is the function dlog ne! polynomially bounded? Which is asymptotically larger, lg(lg∗^ n) or lg∗(lg n)? Justify your answers
Problem 3: Recurrence relation The running time of an algorithm A is described by the recurrence T (n) = 2T (n/2) + n^2. A competing algorithm has a running time of T ′(n) = aT ′(n/4) + n^2. What is the largest integer value for a such that A′^ is asymptotically faster than A? Justify your answer.
Problem 4: Recurrence relation Find the solution of the following recurrence relation. It is sufficient to find the asymptotic behavior of T (n). You should give convincing evidence that the function f (n) you find satisfies f (n) = Θ(T (n)).
T (n) = 2T (bn/ lg nc) + 3n for n ≥ 3
T (1) = 1, T (2) = 2
Problem 5: Recurrence relations Solve the following recurrence relations and provide a Θ bound for each of them. Assume the initial condition T (1) + 1 in each case. For each case, find an algorithm whose run time behavior can be captured by the recurrence relation.
n) + 1
Problem 6: Computing Mode The mode of a set of numbers is the number that occurs most frequently in the set. The set (4,6,2,4,3,1) has a mode of 4.