mt1(3) - CS 373 Midterm 1 Questions (October 1, 2002) Fall...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: CS 373 Midterm 1 Questions (October 1, 2002) Fall 2002 Write your answers in the separate answer booklet. 1. Multiple Choice: Each question below has one of the following answers. A: (1) B: (log n ) C: ( n ) D: ( n log n ) E: ( n 2 ) X: I dont know. For each question, write the letter that corresponds to your answer. You do not need to justify your answers. Each correct answer earns you 1 point. Each X earns you 1 4 point. Each incorrect answer costs you 1 2 point. Your total score will be rounded down to an integer. Negative scores will be rounded up to zero. (a) What is n i =1 i n ? (b) What is n i =1 n i ? (c) How many bits do you need to write 10 n in binary? (d) What is the solution of the recurrence T ( n ) = 9 T ( n/ 3) + n ? (e) What is the solution of the recurrence T ( n ) = T ( n- 2) + 3 n ? (f) What is the solution of the recurrence T ( n ) = 5 T ( n- 17 25- lg lg n ) + n +2 log * n- 6? (g) What is the worst-case running time of randomized quicksort? (h) The expected time for inserting one item into a randomized treap is O (log n ). What is the worst-case time for a sequence of n insertions into an initially empty treap? (i) Suppose StupidAlgorithm produces the correct answer to some problem with proba- bility 1 /n . How many times do we have to run StupidAlgorithm...
View Full Document

This note was uploaded on 12/15/2009 for the course 942 cs taught by Professor A during the Spring '09 term at University of Illinois at Urbana–Champaign.

Page1 / 3

mt1(3) - CS 373 Midterm 1 Questions (October 1, 2002) Fall...

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