2002-Analysis_of_Algorithms-scanned - Comprehensive Exam...

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: Comprehensive Exam: Algorithms and Concrete Mathematics Autumn 2002 This is a one hour closed-book exam and the point total for all questions is 100. 1. (10 points) Let f (n) = 2Jl0gn and g(n) = ne, for some constant E . Which one of the following claims is true: Prove your answer. 2. (15 points) Prove a tight asymptotic bound on the behavior of T(n). T(n) = T(r0.4nl) + T(r0.5nl) + n, where for k 5 10 we are given that T ( k ) = @(I). Do not disregard the "ceiling" operations, i.e. provide a derivation that takes them into account or expIicitIy shows that they do not change the result. 3. (20 points) Prove that the following algorithm generates a random permutation of the numbers 1,2,. . . , n: Set A[i] <- i; For i := 1,2, ..., n : j <- Random uniformly distributed integer i n range [i,n]; Swap(ACi1 , A C j l l ; endf or In particular, prove for all i, j that Pr(A[i] = j) = l/n. 4. (20 points) You are given a graph G(V, E) with n nodes and two length functions: Zl:E-+{l,2 ,..., n } a n d 1 2 : E - + { l , 2...
View Full Document

This note was uploaded on 11/18/2011 for the course CS 161 at Stanford.

Page1 / 2

2002-Analysis_of_Algorithms-scanned - Comprehensive Exam...

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