WHAT IS A DESIGN SPACE?

The huge sets of possible permutations for LEGO Bricks and Q-BA-MAZE cubes are called "design spaces" (Beinhocker, p. 193). It is up to the designer, the person playing with LEGO or Q-BA-MAZE, to discover the best designs among the zillions of possiblities. The enormity of these "design spaces" describes both the potential challenge and the level of freedom for the designer.

How many combinations are there? How big are these design spaces? Just six 2x4 studded LEGO bricks of a single color can be rearranged in 102,981,500 different configurations (Bedford, p. 19). The Rubik's Cube* can be scrambled in 43,252,003,274,489,856,000 ways (Walsh, p. 230). The LEGO "Creator" set contains 500 pieces of different shape and color which can be combined in roughly 10 to the power 120 combinations (1 followed by 120 zeroes) (Beinhocker, p 193). Given that the universe contains around 10 to the power 80 atoms (1 followed by 80 zeroes), the 500-piece LEGO set is pretty impressive!

I've always been impressed with these huge numbers, but also a little skeptical, because I like seeing proof. It seems the math behind these figures is never shown. And probably, the math cannot be shown, because the problems are so complex that a computer program needs to be written to calculate the combinations. This is the case with Q-BA-MAZE. I can't easily get the answer to the seemingly simple question, "how many ways can the Q-BA-MAZE cubes be reconfigured?" because it would take a custom computer program to calculate this.

It is possible, however, to make a rule that describes a subset of the ways Q-BA-MAZE cubes can be rearranged and to express this rule in a simple mathematical formula. The results of our calculations, just a subset of the total possibilities, yield these surprisingly huge numbers of ways 18 to 36 Q-BA-MAZE cubes can be rearranged:

Calculation 1B above of the 18 single-exit cubes in a 50-pack yields 9,656,357,112,229,430,000,000 and can be described as roughly 10 billion trillion combinations.

The helical construction of Q-BA-MAZE cubes in the photo at the top of this post is a single continuous pathway with no jumps. It is made with the single-exit cubes that come in the Cool Colors 50-pack (Q50C) and is one of the configurations included in both Calculation 1A and 1B.

HERE'S THE MATH

To satisfy my curiosity, and with the help of some mathematician friends, we devised this formula:

If you would like to see this formula in action just open up this Excel file and you can manipulate it as you like and see what happens as you change the variables. Here is a screen shot of the Excel calculations:

Five marble run pathways may converge on every Q-BA-MAZE cube in a construction. This formula, however, describes only a single pathway entering any particular cube, or even just a stacked connection. So the results of this formula are far lower than what an eventual computer program will find, but it will at least provide a minimum starting point for understanding how many ways the cubes may be reconfigured.

- N is the total number of cubes in a construction
- Nb = number of blue cubes, Ng = number of green cubes, Nc = number of clear cubes
- N = Nb + Ng + Nc
- C = number of connections
- when C = 4, there is a single continuous pathway with no jumps (the side joint on each cube is always engaged with the cube below)
- when C = 8, the path may be discontinuous and jumps are allowed (either the side joint or the bottom pegs may be used to connect to the cube below)
- the ! symbol means 'factorial' (as an example, 6! = 6 x 5 x 4 x 3 x 2 x 1 = 720)
- the left side of this equation deals with the color combinations
- the right side of this equation deals with the cube configurations

* I include Rubik's Cube here because I found this huge number that describes it and so it makes a good example of how many ways something can be scrambled. Because Rubik's Cube is a puzzle, it is mostly thought of as having only one solution: all sides a single color. But there are interesting checkerboard and other patterns in the design space of 43 quintillion Rubik's combinations, its just that the mechanism of rotating cubes intentionally makes these difficult to find.

If you have an answer to the question "How many ways can the cubes of the 50-pack be reconfigured?" I'd be very interested in hearing from you!

Sources for this post:

*The Unofficial LEGO Builder's Guide, *Allan Bedford, 2005, No Starch Press Inc., ISBN 1-59372-054-2

*The Playmakers: Amazing Origins of Timeless Toys, *Tim Walsh, 2004, Keys Publishing, ISBN 0-9646973-4-3

*The Origin of Wealth: Evolution, Complexity, and the Radical Remaking of Economics, *Eric D. Beinhocker, Harvard Business School Press, ISBN 13-978-1-57851-777-0

## Comments