Difference between revisions of "Asymptotics"
(→Assignment) |
|||
Line 1: | Line 1: | ||
=Assignment= | =Assignment= | ||
− | Problems from [https://courses.csail.mit.edu/6.042/spring18/mcs.pdf Mathematics for Computer Science] (MCS). | + | Assignment for [[CS 303]]. Problems from [https://courses.csail.mit.edu/6.042/spring18/mcs.pdf Mathematics for Computer Science] (MCS). |
Note: for each question, give an explanation of why the answer is what it is. This does not need to be a formal proof. When possible you can use my big-O rules of thumb: (0) ignore constants multiplied out front, (1) for terms that are added just keep the fastest growing one (fastest eventually), (2) n<sup>c</sup> grows faster than (log(n))<sup>d</sup> for any constant c > 0 and constant d, (3) (1+c)<sup>n<sup>d</sup></sup> grows faster than n<sup>e</sup> for any constants c > 0, d > 0, and constant e. | Note: for each question, give an explanation of why the answer is what it is. This does not need to be a formal proof. When possible you can use my big-O rules of thumb: (0) ignore constants multiplied out front, (1) for terms that are added just keep the fastest growing one (fastest eventually), (2) n<sup>c</sup> grows faster than (log(n))<sup>d</sup> for any constant c > 0 and constant d, (3) (1+c)<sup>n<sup>d</sup></sup> grows faster than n<sup>e</sup> for any constants c > 0, d > 0, and constant e. |
Latest revision as of 13:44, 26 April 2023
Assignment
Assignment for CS 303. Problems from Mathematics for Computer Science (MCS).
Note: for each question, give an explanation of why the answer is what it is. This does not need to be a formal proof. When possible you can use my big-O rules of thumb: (0) ignore constants multiplied out front, (1) for terms that are added just keep the fastest growing one (fastest eventually), (2) nc grows faster than (log(n))d for any constant c > 0 and constant d, (3) (1+c)nd grows faster than ne for any constants c > 0, d > 0, and constant e.
- MCS Problem 14.20. Indicate whether each statement is true or not. Explain why for each.
Note that for functions f(n) and g(n), the notation "f ~ g" means that the limit of f(n)/g(n) approaches 1 as n goes to infinity (this is like them being Theta of each other with a constant factor of 1); equivalently, for any constant epsilon>0 you can find a value n0 such that (1-epsilon) g(n) <= f(n) <= (1+epsilon g(n) for all n >= n0.
Note that sin(x) ranges between -1 and 1, and periodically goes between those two values forever; that is all you need to know about sin(x) for the one that has sin in the formula. - MCS Problem 14.21. Show an asymptotic equation pertaining to factorial, using Stirling's formula.
- MCS Problem 14.26. Arrange the functions in increasing big-O order. For some of these you also need to pay attention to the precise definition of big O.
- MCS Problem 14.28. Determine which of the given options describes each function's asymptotic behavior. For part (e) you will need one of the summation formulas from here: https://en.wikipedia.org/wiki/Summation#Summation_index_in_exponents
- MCS Problem 14.33. For each pair of functions, find constants c and n0 that make the asymptotic formula true. The book asks for the smallest c, but you can find any c that satisfies the definitions. For each one, give some justification as well.
Old assignment, from last term
- MCS Problem 14.18. Find the least non-negative integer n to make each statement true. Note that n=0 is theoretically a possible answer for some of these.
- MCS Problem 14.19. For each cell in the table, indicate whether the asymptotic statement is true or not. Note that for the ones that have sin, you have to pay attention to the precise definition of big O. For the one with n! you can use Sterling's approximation (any of the variations will be good enough).
- MCS Problem 14.25. Indicate which cells in the table are true. Note that for functions f(n) and g(n), the notation "f ~ g" means that the limit of f(n)/g(n) approaches 1 as n goes to infinity (this is like them being Theta of each other with a constant factor of 1). For the one with n! you can use Sterling's approximation.
- MCS Problem 14.26. Arrange the functions in increasing big-O order. For some of these you also need to pay attention to the precise definition of big O.
- MCS Problem 14.34. False claim, identify where it is incorrect.