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

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

means

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

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

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


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
2007-01-10