Page 1 of 1
Compare big exponentials
Posted: Wed May 06, 2009 5:13 am
by mrlinx
I stumbled across a problem a long time ago where I was given several exponencial numbers, and was my mission to find the largest. I'm trying to remember what is the best way to solve this... I think there was a property in logarithms that allowed this to be made quite fast, but can't seem to get it to work.
Example, from this list, which is the biggest:
2^3^4^5
6^1^3^6
9^3^2^2
8^8^8^8
Thanks

Re: Compare big exponentials
Posted: Wed May 06, 2009 9:24 am
by sohel
I think this should work.
Suppose we are comparing a^b^c and d^e^f,
assume d = a^x
.. x = log(d) / log(a)
and so d^e^f = (a^x)^e^f = a^(xe)^f
then we have to compare b^c with (xe)^f and see which one is bigger!! This can be found using the above method.
Re: Compare big exponentials
Posted: Wed May 06, 2009 12:50 pm
by mf
sohel wrote:and so d^e^f = (a^x)^e^f = a^(xe)^f
No, (a^x)^e^f = a^(x e^f)
(Remember that exponentiation is right-associative: a^b^c = a^(b^c).)
Re: Compare big exponentials
Posted: Thu May 07, 2009 6:16 am
by sohel
Oops! You are, of course, right.
Then, is there any solution with logarithms, or do we have to bring number theoretic algorithms into action?