1

I am taking an algorithms course this semester and we have to find limits. I know the general basics of the product rule, L'hopitals rule, etc. When it comes to working with logs, I get confused. Could someone explain these two algorithms step by step? Also, possibly explain some logarithmic properties? (in algorithms we use log base 2 not 10) Thanks.

$$\lim_{n\to\infty} \frac{\log n!}{\log n^n}$$

$$\lim_{n\to\infty} \frac{n^{\log c}}{c^{\log n}}$$

$c$ is just some constant greater than 1

  • Can't help you but this might give you some perspective. http://www.johndcook.com/blog/2010/08/16/how-to-compute-log-factorial/ – Chris Feb 05 '14 at 16:35

1 Answers1

1

I'm not going to worry too much about the base that you use. Just remember that, for $x \ne 0$, $$ e^{\ln x}=x=2^{\log x}=(e^{\ln 2})^{\log x}=e^{\ln 2\log x}\implies \ln x = \ln 2\log x. $$ I'll use $\ln=\log_{e}$ because integration formulas are easier, and all you have to do is multiply by a constant to convert. That's a property of log that you should know: how to convert log with respect to one base into log with respect to another. The above trick does that that for you.

The log turns multiplication into addition. $n^{n}$ is $n$ multiplied by itself $n$ times, and $n!$ is $1\cdot 2\cdot 3 \cdots n$. So, $$ \frac{\log n!}{\log n^{n}}=\frac{\ln n!}{\ln n^{n}}=\frac{\ln 1 + \ln 2 + \cdots + \ln n}{\ln n+\ln n+\cdots \ln n}. $$ You can interpret the sum for $\ln n!$ as a lower Riemann sum for $\int_{1}^{n+1}\ln x\,dx$, which gives $$ \ln 1+\ln 2+\cdots+\ln n \le \left(\left.\int_{1}^{n+1}\ln x\,dx=x\ln x - x\right|_{1}^{n+1}= (n+1)\ln(n+1)-n\right). $$ Because $\ln 1=0$, you can also interpret the sum for $\ln n!$ as an upper Riemann sum for $\int_{1}^{n}\ln x\,dx$, which gives $$ \left(\left.\int_{1}^{n}\ln x\,dx=x\ln x-x\right|_{x=1}^{n} =n\ln n-n+1\right)\le \ln 1+\ln 2+\cdots\ln n. $$ Therefore, $$ \frac{n\ln n-n+1}{n\ln n} \le \frac{\ln n!}{\ln n^{n}} \le \frac{(n+1)\ln(n+1)-n}{n\ln n}. $$ The expression in the middle is sandwiched between two sequences which have a limit of $1$ as $n\rightarrow\infty$, which you can verify using the properties of limits that you know about.

For the second limit, write $n=e^{\ln n}$ and $c=e^{\ln c}$ for non-zero $n$, $c$, in order to rewrite the expression. You'll also need to know that $(e^{a})^{b}=e^{ab}$.

Disintegrating By Parts
  • 87,459
  • 5
  • 65
  • 149