Curious about more math this Pi Day? Here’s the problem we included in this year’s Pi Day Card:
In this game, x starts at 0, and your goal is to make x as big as possible. You can apply the four rules below, but each rule costs you points, and you only have 100 points to spend. What's the biggest you can make x, and how do you do it?
- Rule A: Add 0.1 to x. [1 point]
- Rule B: Replace x with 2x. [5 points]
- Rule C: Replace x with x2. [10 points]
- Rule D: Replace x with 2x. [50 points]
You do not need to prove your answer is the highest possible. The answer may be big enough you can't write it out; writing it in symbolic form is fine.
Are You ready for the solution? Here it is…
Let's ask a big question first: when should we use Rule D? It costs 50 points, and we only have 100 points in total.
We could use Rule D twice, but that only gets us to 2, and as you'll see we can get much further than that. Hence, we should use it at most once.
It feels like we should save it for last. And indeed, that's right. If you consider using it before or after each of the other rules, it always does better to use it after. So if you imagine writing out all the rules you want to use, you always do better if you swap Rule D with the rule after it until it's last. (For the details, see the note at the end.)
OK, we want to use Rule D at most once, and we want to use it last. Then what? Our goal is to get the biggest increase per point spent. Let's compare.
Rule A gives us an increase of .1 per point. Whereas Rule B gives us an increase of .2x per point. This means that applying Rule B can only match applying Rule A in increase once we have gotten x to .5. It also implies that once x exceeds .5, Rule B will be a better option than Rule A.
What about Rule C? It doesn't actually increase x until we're above 1, so for now we only need to trade off Rule A and Rule B.
Now we're ready to begin. To make x as big as possible we have to start by applying Rule A five times, and x is now .5.
From here we can either apply Rule A five more times or apply Rule B once (because as we mentioned above when x=.5 these rules have the same average increase). It doesn’t really matter which we do, so for the sake of the game let’s just say we have applied Rule A 5 more times. x is now 1, and we have used 10 points.
Now Rule C still can’t make x any bigger, so we need to apply one of the other two rules and we know that the average increase of Rule B is .2 at this moment, clearly beating Rule A. So we will go ahead and apply Rule B once. That brings x to 2, having used 15 points.
Rule B and Rule C get us to the same value of x, but Rule B is cheaper, so apply it again and we are at x=4, having used 20 points.
From here we know that we can use Rule B twice more or Rule C once with the same average increase over the next points. In both cases we will arrive at the same point, x=16 having used 30 points.
At this point, the average growth per point of Rule C is much higher: it's 24 per point when x=16, so we should use Rule C until our one use of Rule D. We apply Rule C twice, so x goes from 16 to 16⋅16 = 256 to 256⋅256=65536. We've used 50 points.
Should we use Rule C more, or Rule D? Rule C does keep increasing x, up to 2256. Use Rule D, though, and we get x=265,536 having used all 100 points.
In case you're wondering, this number is huge. It is vastly larger than the number of atoms in the entire observable universe (i.e., not just Earth but Earth plus every other solar system and galaxy we could possibly see with a telescope). It has over 20,000 digits. This is the biggest number we can get.
Note:
Here is one way to verify that you always do better if you swap Rule D with the rule after it until it's last.
Rule D first then Rule A 2x +.1 vs Rule B first then Rule D 2(x+.1) = 2x (2(.1))=2x(1.07…) =2x + 2x(.07)
Rule D first then Rule B 2(2x)=2(x+1)= 2(2x) vs Rule B first then Rule D 2(2x) =(2x)(2x)
Rule D first then Rule C 2x⋅2x = 2(x+x) = 2(2x) vs Rule C first then Rule D 2(x⋅x)
By comparing these outcomes we see that if x is at least 2, Rule D will always yield the greatest increase when used after another rule not before. If we were to use Rule D when x is less than or equal to 2, we would be using at least 50 points to get x less than or equal to 4, for an average increase per point of less than .08, which we certainly know that we can beat with rule A.
This shows that in all cases we should save D for last.
Want to Learn about the Digit Distribution of pi?
Check out our Pi Day blog post!