Handout 16

Handout 16 - Mehran Sahami CS103B Handout #16 February 2,...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Mehran Sahami Handout #16 CS103B February 2, 2009 Problem Set #3 Due: 11:00am on Wednesday, February 11th Note: in the problems below in which you are asked for a big-Oh running time, we are looking for a tight big-Oh bound (analogous to the big-Theta ( ) notation mentioned in class and in Handout #9), but you only need to show the upper bound (big-Oh). You do not need to show the lower bound. 1. In Handout #11, we concluded that the recurrence relation for the running time of the recursive Binary search algorithm is (using constants x and y here): T(1) = x T(n) = T(n/2) + y Determine the big-Oh running time for this recurrence relations using: a. Repeated substitution. Use induction to prove that your closed form formula for T(n) is correct. b. Theorem 1 (Master Theorem) from Handout #10. Show how you got your result by explicitly stating the values of a, b, c, and d from the Theorem in terms of this recurrence, and how you computed the final big-Oh as a result. 2. Consider the number of permutations of a set with n elements. a. Find a recurrence relation for the number of permutations of a set with n elements. Make sure to explain how you came up with this recurrence. b.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

Handout 16 - Mehran Sahami CS103B Handout #16 February 2,...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online