CS154
Chris Pollett
Feb. 3, 2020
Which of the following is true?
In this class we will frequently examine the efficiency of algorithms. We will use the notions on this slide to do this.
Definition: Let `NN` be the nonnegative integers. Let `f` and `g` be functions from `NN` to `NN`.
For example, `n^2+1 = O(n^2)`.
To see this notice, for all `n geq 1`, `n^2+1 leq n^2+ n^2 leq 2cdot n^2`. So `m=1`, `c=2` work for the above definition.
You might want to convince yourself that: `n^3 = Omega(n^2+n+1)` and `n^3 + n^2= Theta(n^3)`.