Configurations for jenga

332 Views Asked by At

I came up with the following problem a couple days ago.

"Considering the rules and constraints of standard Jenga gameplay, how many combinatorially unique, structurally stable, practical configurations can a Jenga tower have?"

By practical, I mean configurations that can be feasibly achieved during actual gameplay, taking into account the typical moves players make and the inherent stability required to prevent the tower from collapsing prematurely. It emphasizes configurations that players are likely to encounter or aim for, rather than improbable or near-impossible arrangements.

I am trying to look at this under a primarily combinatorial lens rather than a physics based one.

(Also sorry if this is worded poorly, if you have any ideas to word it better let me know.)

I just have no idea where to even start, does anyone have any ideas? I have been staring at a blank page for so long.

There are 54 blocks with 3 blocks per layer, for 18 layers

1

There are 1 best solutions below

6
On

Ignoring the top layer, every layer has either all three blocks, one block in the middle, or any of the three possible combinations of two blocks. The number of configurations in one layer with a given number of blocks is thus described by the generating function $x+3x^2+x^3$. For a given number of $n$ layers the generating function thus becomes $(x+3x^2+x^3)^n$. If $a_n$ is the total number of configurations with $n$ blocks, we get $$\sum_{n=0}^\infty a_nx^n=\sum_{n=0}^\infty(x+3x^2+x^3)^n=\frac1{1-x-3x^2-x^3}.$$ Now consider the top layer. All possible combinations of the three positions either having a block or not are possible, except for the empty combination. This layer thus has the generating function $3x+3x^2+x^3$. If $b_n$ is the total number of configurations with $n$ blocks, including the empty configuration we get $$\sum_{n=0}^\infty b_nx^n=1+(3x+3x^2+x^3)\sum_{n=0}^\infty a_nx^n=1+\frac{3x+3x^2+x^3}{1-x-3x^2-x^3}=\frac{1+2x}{1-x-3x^2-x^3}.$$ With partial fraction decomposition, we get \begin{align} \sum_{n=0}^\infty b_nx^n&=\frac{1-2\sqrt2}{4(x+1-\sqrt2)}+\frac{1+2\sqrt2}{4(x+1+\sqrt2)}-\frac1{2(x+1)} \\&=\frac{3+\sqrt2}4\frac1{1-(\sqrt2+1)x}+\frac{3-\sqrt2}4\frac1{1-(1-\sqrt2)x}-\frac12\frac1{1-(-1)x} \\&=\sum_{n=0}^\infty\left(\frac{3+\sqrt2}4(\sqrt2+1)^n+\frac{3-\sqrt2}4(1-\sqrt2)^n-\frac12(-1)^n\right)x^n \end{align} Thus we get the closed form expression $$b_n=\frac{3+\sqrt2}4(\sqrt2+1)^n+\frac{3-\sqrt2}4(1-\sqrt2)^n-\frac12(-1)^n$$ In particular, $b_0=1$, $b_1=3$, $b_2=6$, $b_3=16$ and $$b_{54}=516036424787671732778$$ where $54$ is the number of blocks in a standard game of jenga.

EDIT: As @NoName pointed out in the comments, not all configurations are attainable under legal play, since you are not allowed to take bricks from the uppermost filled layer. This effectively means the second layer from the top has to always be filled. Furthermore, the top and third layer combined need to have at least three bricks, so they can not both have only a single brick.

Let us take the opportunity to work out the answer in a slightly different way. By the same reasoning as the generating function, we have a recursive formula for $a_n$ given by the initial condition $(a_0,a_1,a_2)=(1,1,4)$ and the recursion $a_{n+3}=a_{n+2}+3a_{n+1}+a_n$. From this, we can calculate any term $a_n$ in a linear number of arithmetic operations with respect to $n$.

We now take attainability into account. Recall that there are $54$ bricks in total. We exhaust all cases for the top few layers. Recall the second layer from the top always has three bricks.

If the top layer also has three bricks, this results in $a_{48}$ configurations. If the top layer has two bricks, this gives three options for the top layer, resulting in $3a_{49}$ configurations. If the top layer has only one brick, this gives three options for the top layer, resulting in $3a_{50}$ configurations. However, we need to subtract the configurations with one brick in both the top layer and the third layer from the top. There are again three options for the top layer, but only one for the second and third layers from the top, resulting in $3a_{49}$ configurations being subtracted.

The resulting total number of configurations is \begin{align} a_{48}+3a_{50}&=1425438846754932241+3\cdot8308066439093374804\\&=26349638164035056653 \end{align}