2
$\begingroup$

I have the following function:

$\displaystyle\frac{n \cdot 7^n+\frac{8}{n!}}{(n+7) \cdot 7^n}=\Theta(1)$

I don't how they come to this. What is the proper way to analyse a function to theta notation?

$\endgroup$
5
$\begingroup$

You can calculate the limit of the function for $n\to\infty$: \begin{align} \lim_{n\to\infty}\frac{n\cdot7^n+\frac{8}{n!}}{(n+7)\cdot7^n}&=\lim_{n\to\infty}\frac{n\cdot7^n}{(n+7)\cdot7^n}+\lim_{n\to\infty}\frac{\frac{8}{n!}}{(n+7)\cdot7^n}\\ &=\lim_{n\to\infty}\frac{n}{n+7}+\lim_{n\to\infty}\frac{8}{(n+7)\cdot7^n\cdot n!}\\ &=1 + 0\\ &=\Theta(1) \end{align}

$\endgroup$
  • 1
    $\begingroup$ Note that this was the extra lucky case that there was a limit. Big-theta doesn’t require a limit, but it makes things easier. To OP: What happens if we multiply the whole lot by (2 + cos n)? $\endgroup$ – gnasher729 Nov 5 '19 at 15:41
  • $\begingroup$ i guess it is not possible in big theta notation? Could you tell me what the general way is of analyzing a function to big theta notation? $\endgroup$ – soepblik Nov 5 '19 at 18:11
  • $\begingroup$ The general way consists of reading the definition of big-theta and thinking hard about the problem at hand. Read the definition of big-theta and my example problem becomes very easy. $\endgroup$ – gnasher729 Nov 6 '19 at 9:29

Not the answer you're looking for? Browse other questions tagged or ask your own question.