Solving Recursion Trees with Log Properties of a Constant

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 2K views
LauraSuh
Messages
4
Reaction score
0
Hi, I'd like to know the log properties when they are the power of a constant. I've searched everywhere but I can't find it. the reason I want to know it is that, when solving a recursion tree problem, my teacher got an result of n^(log4 3) but I got 3^(log4 n). the base of the log haven't changed, but i'd like to know if those are equivalent and if possible, in case the answer is that they are equal, why.
Thx in advance!
 
Mathematics news on Phys.org
If we have to solve for x in [itex]4^x=3[/itex] then we have defined a log function to answer this problem for us. We denote the answer to this problem as [itex]x=\log_43[/itex]. This means that if we plug that expression for x back into the original problem, we get

[tex]4^{\log_43}=3[/tex] (1)


Now, for your answer
[tex]3^{\log_4n}[/tex] (2)

notice that we can plug the expression I gave in equation (1) into equation (2) to replace the 3. i.e.

[tex]3^{\log_4n}=\left(4^{\log_43}\right)^{\log_4n}[/tex]

and by exponent properties [itex](a^b)^c=a^{bc}=a^{cb}=(a^c)^b[/itex] we then have

[tex]=\left(4^{\log_4n}\right)^{\log_43}[/tex]

But now notice the part in the brackets is equivalent to equation (1), that is, the log base 4 cancels the base of the exponent since they're the same value.

[tex]4^{\log_4n}=n[/tex]

and so you finally have that your answer is equivalent to

[tex]n^{\log_43}[/tex]
 
Thank you so much! You're like my super hero right now! =)
 
You're welcome :smile: By the way, may I ask what the question was? I'm guessing you were finding a time complexity, but I'd just like to see how that order arose.