Exercise V

  • Use the mathematical definition of Big Omega to prove the asymptotic running time of a given program.

Consider the following function T(n)T(n) describes the precise running time of an algorithm:

T(n)=3n2100n+6 T(n) = 3n^2 - 100n + 6


Exercise Show T(n)Ω(n2)T(n) \in \Omega(n^2).

Solution

We can choose c=2c=2 and n0=100n_0=100 for the definition of Big-Oh to hold.

2n2<3n2100n+6 2n^2 < 3n^2 - 100n + 6

Similar to the definition of Big-Oh, the choice of n0n_0 and cc are not unique.

Exercise Show T(n)Ω(n)T(n) \in \Omega(n).

Solution

For any cc and n0=100cn_0=100c, the definition of Big-Oh to hold.

cn3n2100n+6 cn \le 3n^2 - 100n + 6

Big-Omega expresses a lower bound, but it is not necessarily a tight lower bound.

Exercise Show T(n)Ω(n3)T(n) \notin \Omega(n^3).

Solution

We can choose c=1c=1 and for any n>1n > 1 we have

3n2100n+6n3 3n^2 - 100n + 6 \le n^3

So n3n^3 is really an upper bound for T(n)T(n) and not a lower bound.