Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Constraint Databases

Authors: Peter Revesz

1st Edition

1441931554, 978-1441931559

More Books

Students also viewed these Databases questions