I'm try to prove the equality:
$$a^{\log_b c} = c^{\log_b a}$$
I'm having trouble finding information regarding this, also I need to figure out why $n^{\log_2 3}$ is better than $3^{\log_2 n}$ as a closed form formula for $M(n)$? Thank you!
I'm try to prove the equality:
$$a^{\log_b c} = c^{\log_b a}$$
I'm having trouble finding information regarding this, also I need to figure out why $n^{\log_2 3}$ is better than $3^{\log_2 n}$ as a closed form formula for $M(n)$? Thank you!
On
For the first part, you could use the fact that
$$\begin{align}\log_b{c} &= \frac{\log_a{c}}{\log_a{b}}\\ &=\frac{\log_a{c}}{\frac{\log_b{b}}{\log_b{a}}}\\ &=(\log_a{c})\cdot(\log_b{a})\end{align}$$
And then apply it to LHS:
$$\begin{align}a^{\log_b{c}} &= a^{(\log_a{c})\cdot(\log_b{a})}\\ &=\left(a^{\log_a{c}}\right)^{\log_b{a}}\\ &=c^{\log_b{a}}\end{align}$$
Taking the logarithm to base $b$ of both sides, the equation is equivalent to $$(\log_bc)(\log_ba)=(\log_ba)(\log_bc)\ .$$
I would say $n^{\log_23}$ is better because it makes it clear that it is $n$ to a constant power. This is of course also true for $3^{\log_2n}$, but it's not so obvious.