Posts Tagged ‘Lego’

Lego Math

October 14, 2008

I ran across an interesting article about how many different ways there were to stack 2×4 Lego bricks into towers. “Aha!” I thought, “This would make a great post! I could include lots of pictures and everything!”.

I thought that because this is what the floor of our living room looks like:

It’s like a giant I Spy puzzle. I figured I wouldn’t have any trouble finding bricks, but it turns out that among the75 million Lego pieces adorning our house, there were precisely five of the right size.

Shortly after I took this, one of them mysteriously disappeared.

In thinking about the number of ways to build a tower from six 2×4 blocks, it’s easiest to first analyze how many ways there are to build towers out of just two of the blocks. Here are two examples:

Here are two more ways to stack them:

But wait, there’s more! The orange top piece could cover more of the bottom piece, or go on the other side, or even be perpendicular to the bottom piece. If you think of the bottom piece as being fixed, there are 46 different ways that the top piece could be aligned (21 ways with the top piece being “parallel” to the bottom, and 25 ways with the top piece “perpendicular”). Except that the 46 ways aren’t really different: all but two of them could be morphed into a different one by rotating the tower 180°.

So there are really only 24 different ways to start. But then you can build higher and higher towers, and do you know how many different towers can be made from 6 legos? Millions and millions and millions. More precisely, there are 102,981,504 if you want them to be 6-legos high, and 915,103,765 if they can be shorter, with several legos on the same level.

That’s a lot of towers. The paper I read that explained this (including citations to an earlier quote by Lego that was off by 4 towers) is “A Lego Counting Problem” by Søren Eilers, Mikkel Abrahamsen, and Bergfinnur Durhuus. (I also did a search to see what “Lego” and “Group Theory” might net, and came across the LEGO Algebra Group which made me really happy until I discovered that it had nothing to do with the toys.)