CS210 Tutorial 4
Complete the following exercises pasted below (or reference to texbook)
Q1. The number of operations executed by algorithms A and B is 8 n log n and 2 n2, respectively. Determine n0 such that A is better than B for n ≥ n0.
Q2. The number of operations executed by algorithms A and B is 40n2 and 2n3, respectively. Determine n0 such that A is better than B for n ≥ n0.
Q3. What is the sum of all the even numbers from 0 to 2 n, for any integer n ≥ 1?
Q4. Order the following functions by asymptotic growth rate.
Q5. Give Big-Oh characterization in terms of n for the following methods