RPN Challenge 1 - Answer Key
RPN Challenge 1 - Answer Key
Problem 1
The largest expression is:
2 3 4 5 ^ ^ ^
This evaluates as $2^{(3^{(4^5)})}$. This seems right, but is it a proof? No. Let’s consider one other possibly big number: 3 2 4 5 ^ ^ ^
To compare it with 3 2 4 5 ^ ^ ^, we will use logarithms. Let
Both numbers are greater than $1$, so logarithms preserve their order.
Take $\ln$ of $A$:
\[\ln A = \ln\left(2^{(3^{4^5})}\right) = 3^{4^5}\ln 2.\]Now take $\ln$ of that result:
\[\ln(\ln A) = \ln\left(3^{4^5}\ln 2\right) = \ln\left(3^{4^5}\right) + \ln(\ln 2) = 4^5\ln 3 + \ln(\ln 2).\]The same two steps applied to $B$ give:
\[\ln(\ln B) = 4^5\ln 2 + \ln(\ln 3).\]Now compute decimal values. We can ignore $\ln \ln 2$ and $\ln \ln 3$ because they are tiny. So we’re just comparing $4^5 \ln 2$ against $4^5 \ln 3$. Obviously $\ln 3> \ln 2$: \(\ln(\ln A) \approx 1024(1.098612) \approx 1124.97,\)
\[\ln(\ln B) \approx 1024(0.693147) \approx 709.78.\]Since $1124.97 > 709.78$, we have $\ln(\ln A) > \ln(\ln B)$, and since $\ln$ is increasing, this means $A > B$:
2 3 4 5 ^ ^ ^ > 3 2 4 5 ^ ^ ^
Problem 2
The smallest expression is:
2 3 4 5 ^ ^ -
This evaluates as $2 - 3^{(4^5)}$.
Problem 3
The closest expression to $e$ is:
2 5 3 4 + / +
This evaluates as $2 + 5/7 = 19/7 \approx 2.7142857$.
Problem 4
Using each number 2, 3, 4, 5 exactly once, and allowing the numbers to be reordered, the following RPN expressions construct each target value. The operators are +, -, *, /, and ^.
2 3 + 4 - 5 ^5 2 3 - 4 + -5 2 3 * 4 - -2 3 + 4 + 5 -2 3 + 4 - 5 *2 3 + 4 - 5 +2 3 * 4 - 5 +2 3 - 4 + 5 +5 2 3 - 4 * -5 2 3 - 4 - -4 2 3 / / 5 +2 4 + 5 3 - *3 2 4 + * 5 -2 3 + 4 + 5 +2 3 + 4 * 5 -3 2 4 * + 5 +2 3 ^ 4 + 5 +3 2 ^ 4 + 5 +2 3 * 4 * 5 -5 4 2 3 - ^ /3 4 + 5 2 - *3 4 * 2 5 * +3 2 4 + * 5 +3 2 4 ^ + 5 +2 3 + 4 * 5 +5 2 ^ 3 4 - -2 3 ^ 4 * 5 -4 2 5 * 3 - *2 3 * 4 * 5 +5 2 3 / 4 / /2 3 ^ 4 * 5 -2 3 * 4 - 5 ^2 5 ^ 3 4 - -4 2 3 * 5 * +3 2 4 - 5 ^ -3 4 * 5 2 - *2 3 ^ 4 * 5 +3 4 ^ 5 - 2 /3 4 + 2 5 ^ +4 2 - 3 ^ 5 *3 2 ^ 4 * 5 +3 4 2 5 * + *3 2 4 ^ * 5 -3 4 + 2 ^ 5 -2 3 + 4 + 5 *2 3 4 5 * + *- Impossible
2 4 + 3 5 + *3 4 + 2 5 + *