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 this post, we consider the event horizon of 2048, which I reached after about four weeks of intermittent doodling:
In yesterday’s post, we developed a system of two equations in two unknowns to solve for and
, the number of 2-tiles and 4-tiles (respectively) that appeared throughout the course of the game:
.
In this post and tomorrow’s post, I consider how the two sums in the above equations can be obtained without directly adding the terms.
In yesterday’s post, we showed that the formula for the sum of a finite geometric series can be used to calculate the first sum:
Let’s now consider the second (and more complicated) sum, which can be written as
For reasons that will become clear shortly, this sum can be written in expanded form as
Let’s now rearrange the terms of this sum. We will do this by adding along the diagonals instead of along the rows. In this way, the above sum can be rearranged as
Each of these new rows (or the original diagonals) is a geometric series and can be calculated using the formula:
So, thus far in the calculation, we have established that
.
Simplifying,
The first sum on the right is the sum of a constant being added to itself 15 times:
The second sum on the right is yet another geometric series. Indeed, it’s the same geometric series from the first diagonal above:
Therefore,
Not surprisingly, this matches the sum that was found via direct addition.
One thought on “2048 and algebra (Part 8)”