Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. Short Answer (2 points each) Answer the following questions using the simplest possible o notation unless otherwise stated. Assume in recurrences that f(n) is
1. Short Answer (2 points each) Answer the following questions using the simplest possible o notation unless otherwise stated. Assume in recurrences that f(n) is (1) for constant values of n. (a) What is 1_1 i? (b) What is 211 log i? (c) Solution to the following recurrence T(n) = 3T(n/3) +n (d) Solution to the following recurrence T(n) = 4T(n/2) +n (e) Solution to the following recurrence relation: f(n) = 3f(n 1) - 2f(n 2) + 2". For this problem, give your answer in big-O nota- tion. (f) Solution to the following recurrence relation: T(n) = 8T(vn)+logn (g) Worst-case runtime of randomized QuickSort on a list with n ele- ments? (h) Expected time to do a search in a skip list containing n items? (i) Consider a certain operation OP. Say that over n calls to OP, the i-th call takes (i) time. What is the amortized cost of OP? (j) You flip n fair coins, and add each coin, one after the other, to the end of a row after flipping. Call a coin satisfied if it has the same value as its right neighbor in the row (the last coin in the row is never satisfied). What is the expected number of satisfied coins? For this problem, Give an exact answer (i.e. not just within o)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started