# How many ways can six 8-peg lego blocks of six different colors be combined?

I have seen the number quoted as > 650 billion. The quote is from a Danish mathematician, Soren Ehlers. Intuitively, this does not seem correct to me. Any mathematicians/statisticians out there who can help either verify the huge number, or give me a correct number?

• This might be a question better suited for Stats.SE or Math.SE. Oct 22 '14 at 16:19

To expand on Zhaph's answer, I'm assuming that you have a fixed set of six colors, and each block is one color.

If that's the case, this is a simple combination problem on top of the orientation problem. Since there are six colors and six bricks, there are 6! ways to assign those six colors to the six bricks, or 720 ways.

Now, we apply this combination to our orientation, and get:

915,103,765 orientations x 720 color combination/orientation = 658,874,710,800 combinations

• So it's true! Thank you for your verifications, Zaph and Nick. Very much appreciated. FYI, I'm using this to explain the complexity in large data sets. i.e. if six Lego blocks can connect in this many combinations, how many ways can six humans connect? Traditional Taylorist management theory says one! That leaves lots of possibilities unexplored. Oct 22 '14 at 20:33
• @Bonifer people connect simultaneously in much simpler ways than Lego bricks (Sam knows Bob or not) and in much more complex ways (Sam has heard that Bob is not very nice, but from someone Sam thinks is unreliable). There's not a good match to the Lego "one stud to the left" relationship modelling.
– Móż
Oct 23 '14 at 3:04
• This number is probably too high. Some arrangements will be symmetrical such that switching the brick colours doesn't give a new creation, just a rotation of the previous one. Oct 27 '14 at 18:41
• @Mr.ShinyandNew安宇 is right. It's difficult to guess how many different brick configurations are radially symmetric. However, it's safe to assume that the number is fairly low, because the only possible configuration would have to be 90 and/or 180 degrees rotationally symmetric. 90 degree symmetric sets would have 1/4 as many combinations, and 180 degree symmetric sets would have 1/2 as many combinations. Oct 31 '14 at 23:23

I'm not sure what the rules are around the colours, however from the LEGO Facts page:

Take six eight-stud LEGO bricks (2x4) – how many ways can they be combined?

With the aid of computers, the exact number of combinations has been calculated as 915,103,765!

Just so you know, two eight-stud LEGO bricks can be combined in 24 different ways and three eight-stud LEGO bricks in 1,060 ways.

This is probably based on the work done here.

The colour combinations would therefore be higher than that - but you'd need to be avoiding duplicate combinations.