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 (, 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 and 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 2-tiles were combined to make 4-tiles. Since each of these 4-tiles adds 4 points, we conclude that the final score of 44 points was obtained as follows:

2. The sum of the tiles on the final board is . 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:

.

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

Substituting into the second equation:

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.

I'm a Professor of Mathematics and a University Distinguished Teaching Professor at the University of North Texas. For eight years, I was co-director of Teach North Texas, UNT's program for preparing secondary teachers of mathematics and science.
View all posts by John Quintanilla

## One thought on “2048 and algebra (Part 4)”