4 ms·
In this format, exponents are evaluated left to right, so this is 4^9 which is 262144 and is reasonable.
by mathgladiator 7y ago
In this format, exponents are evaluated left to right, so this is 4^9 which is 262144 and is reasonable.
- vecter 7y agoThat's certainly not the standard. If anything, exponentiation is usually performed right to left, with some exceptions [0]. However, the fact that we even have carets in this conversation isn't because the GP wanted to adopt a left-to-right convention, but due to limitations in the richness of HN's text editor. If you write a tower of 2^2^9 on a whiteboard and ask 1000 mathematicians and computer scientists to evaluate it, I'm sure 999 or 1000 of them would evaluate it as 2^(2^9). [0] https://en.wikipedia.org/wiki/Order_of_operations#Serial_exponentiation https://en.wikipedia.org/wiki/Order_of_operations#Serial_exp...
- mathgladiator 7y agoI'm a mathematician and a computer scientist, so I must be one in a thousand. The link even indicates that ambiguity exists in wild, and I think clear notation would help. In this case, the absurdity of the number suggests a more realistic number.
- vecter 7y agoDon't you think it's more likely that the original poster made a mistake and that a graph algorithm isn't actually O(2^2^n)? I can't name a single meaningful algorithm that has that time complexity.
- umanwizard 7y agoA good mnemonic is that a^b^c normally associates to the right because if you meant (a^b)^c, you could have just written a^(bc).
- kachnuv_ocasek 7y agoBut that would not be hyperexponential as GP claimed.