2048 and algebra (Part 4)

In this series of posts, I consider how algebra can be used to answer a question about the 2048 game: From looking at a screenshot of the final board, can I figure out how many moves were needed to reach the final board? Can I calculate how many new 2-tiles and 4-tiles were introduced to the board throughout the course of this game?


In the previous two posts, we developed two key insights (which will be used to develop of system of two equations in two unknowns):

1. Likewise, the 16-tile on the board was formed by adding two 8-tiles (16 points). Each of those 8-tiles was formed by adding two 4-tiles (2 \times 8, or another 16 points). And those 4-tiles, as well as the final 4-tile on the board, could have been (a) newly introduced by the game or else (b) formed by adding to 2-tiles (thus adding 4 points to the score for each of those 4-tiles).

Let t and f denote the number of 2-tiles and 4-tiles, respectively, that were introduced by the game. Since there are three 2-tiles on this final board, we conclude that t-3 2-tiles were combined to make (t-3)/2 4-tiles. Since each of these 4-tiles adds 4 points, we conclude that the final score of 44 points was obtained as follows:

16 + 2 \times 8 + 4 \left( \displaystyle \frac{t-3}{2} \right) = 44

2(16) + 2(t-3) = 44

32 + 2(t-3) = 44

2. The sum of the tiles on the final board is 2 \times 3 + 4 + 16 = 26. This also must be the sum of the 2-tiles and 4-tiles that were introduced during the course of the game. This gives us a second equation:

2t + 4f = 26.

So we have a system of two equations in the two unknowns t and f. This is actually a simple system of equations to solve. Starting with the first equation:

2(t-3) = 12

t -3 = 6

t = 9

Substituting into the second equation:

2 \times 9 + 4f = 26

18 + 4f = 26

4f = 8

f = 2

This indeed matches what happened: nine 2-tiles and two 4-tiles were introduced to the board. Furthermore, since two of these tiles were on the initial board, we can conclude that it took nine moves to reach the final board.


One thought on “2048 and algebra (Part 4)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.