Question: Please explain all the steps in detail to solve this problem. 2. (a) Compute and tabulate the following functions for n = 1,2,4,8, 16, 32,61.
2. (a) Compute and tabulate the following functions for n = 1,2,4,8, 16, 32,61. The purpose of this exercise is to get a feeling for these growth rates and how they compare with each other. (All logarithms are in base 2, unless stated otherwise.) log n, n, n log n, n2, n, 2", (b) Order the following complexity functions (growth rates) from the smallest to the largest. That is, order the functions asymptotically. Note that log2 n means (logn)2. n n2 logn, 5, n log2 n, 2". n", n, Vn, logn, 'log n TI The comparison between some of the functions may be obvious (and need not be justified). If you are not sure how a pair of functions compare, you may use the ratio test described below. f lim if f(n is asymptotically smaller than g(n) oo if f(n) is asymptotically larger than g(n), C ) = if f(n) and g(n) have the same growth rate. Note: For any integer constantlog n is a smaller growth rate than n. This may be proved using the ratio test
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
