next up previous
Next: The complexity of divide-and-conquer algorithms Up: A review of complexity notions Previous: A review of complexity notions

Orders of magnitude

Let f, g et h be functions from $ \mathbb {N}$ to $ \mathbb {R}$ Let us give some examples. We have the following properties. In practice $ \in$ is replaced by = in each of the expressions f (n) $ \in$ $ \Theta$(g(n)), f (n) $ \in$ $ \cal {O}$(g(n)) and f (n) $ \in$ $ \Omega$(g(n)). Hence, the following

f (n) = h(n) + $\displaystyle \Theta$(g(n)) (10)

means

f (n) - h(n) $\displaystyle \in$ $\displaystyle \Theta$(g(n)). (11)

Let us give another fundamental example. Let p(n) be a (univariate) polynomial with degree d > 0. Let ad be its leading coefficient and assume ad > 0. Then we have
(1)
if k $ \geq$ d then p(n) $ \in$ $ \cal {O}$(nk),
(2)
if k $ \leq$ d then p(n) $ \in$ $ \Omega$(nk),
(3)
if k = d then p(n) $ \in$ $ \Theta$(nk).
Exercise: Prove the following

$\displaystyle \Sigma_{{{k=1}}}^{{{k=n}}}$ k  $\displaystyle \in$  $\displaystyle \Theta$(n2). (12)


next up previous
Next: The complexity of divide-and-conquer algorithms Up: A review of complexity notions Previous: A review of complexity notions
Marc Moreno Maza
2003-06-06