Quiz bigO #2 9 points total, 3 points per problem Grading - * 1) -.5 for each f that is out of position * 2) -.5 or -1 per line * 3) Note: ^ is exponentiation, so n^2 is n squared. 1) Put the following in bigO order from smallest to largest f1(n) = 2n^2 - nlog(n) + n + 1000 (basically n^2) f2(n) = n (log(n))^2 + n^(3/2) + 100 (basically n^(3/2)) f3(n) = 2^(sqrt(n)) f4(n) = 2^(2^(n^(1/4))) f5(n) = 5n + 10000000000000000000000 Answer: f5, f2, f1, f3, f4 2) Say what's true f1(n) = 10 n^2 + n(log(n)), f2(n) = 16 n^2 - 10n, f3(n) = n log(n) n^2 n^2 n log(n) <= < >= > = (choices are: O, o, Omega, omega, Theta) f1 is __ of f2: O, Omega, Theta f2 is __ of f3: Omega, omega f3 is __ of f1: O, o 3) Recursion tree - per level (level #, # nodes, input size, running time/node, total running time / level) - # levels total - total running time T(n) = 1 * T(n/10) + n Answers: Half credit to do T(n) = 2 * T(n/4) + n