How does $\sqrt{2}^{\log n}$ become $n^{\log \sqrt{2}}$

4.1k Views Asked by At

In proving that $(\sqrt2)^{\log n}$ = O(n)$, where log is base 2, the solution is below. I understand the solution except for the two lines that I starred. How does the first line become the second line?

$$* \space \space \space \space\sqrt{2}^{\log n}$$

$$*= n^{\log \sqrt{2}}$$ $$= n^{1/2}$$ $ \le n$, for $n \ge 1$
So, $n_0 = 1$ and $c = 1$.

5

There are 5 best solutions below

0
On BEST ANSWER

$$ \begin{align} \sqrt{2}^{\log_2 n}\qquad\qquad \text{Given Equation}\\ = 2^{\frac{1}{2}\log_2 n}\qquad\qquad\qquad \sqrt{n} = n^{\frac{1}{2}}\\ =2^{\log_2 \sqrt{n}}\;\;\qquad a\log_b n = \log_b n^a\\ = \sqrt{n}\qquad\qquad\qquad\quad b^{\log_b n} = n\\ \end{align} $$

0
On

$$a^{\log b} = \left(2^{\log a}\right)^{\log b} = 2^{\log a \log b} = \left(2^{\log b}\right)^{\log a} = b^{\log a}$$

If your log base is something other than $2$, use that instead.

0
On

Using the rule $a=2^{\log_2 a}$, we have $\sqrt{2}^{\log_2 n}=2^{\log_2(\sqrt{2})\log_2 n}=n^{\log_2\sqrt{2}}$.

0
On

We have \begin{align} \sqrt{2}^{\log_2 n}&=\left(2^{1/2}\right)^{\log_2 n}\\ &=2^{(1/2)\log_2 n}\\ &=2^{(\log_2 n)(1/2)}\\ &=\left(2^{\log_2 n}\right)^{\frac{1}{2}}\\ &=n^{\log_2 \sqrt{2}}\quad\text{since }\log_2\sqrt{2}=\frac{1}{2} \end{align}

0
On

Let $n = 2^y$ Therefore $\log_2(n) = y$

LHS = $\sqrt{2}^{\log (n)} = \sqrt {2}^y = 2^{\frac{y}{2}} = \sqrt{n}$

RHS = $n^{\log(\sqrt{2})} = \sqrt{n} = \sqrt{2^y} = 2^{\frac{y}{2}} = \sqrt{n}$