how many different ways can you combine 6 lego bricks ( the standard 2 x 4 original lego brick ) ?
The answer is on the back of a lego book one of my sprogs got for Xmas , I was going to ask my eldest sprog ( 11 ) how he thought you might calculate this and then I started to think about it.....
google does have the answer but as usual it's more fun to have a ponder .
Do you care about invisible differences where a brick is rotated 180 deg but looks the same?
I can’t think of a formula for it.
I would draw a tree. One brick and branches for each position the other brick can be added with each branch carrying the number of rotationally equivalent branches (which themselves aren’t drawn). Then repeat for each additional brick, pruning any duplicates that emerge and annotating the first of the matches with the number pruned. Numbers propagate down the tree, being multiplied by duplicate counts. Add all the numbers at the bottom of the tree.
Rough guess order of magnitude is more than a billion ways if you’re not eliminating symmetries. So the only way I am drawing such a tree is with a computer.
I count 24 ways you can join just 2 together to give non-identical outcomes, and seeing as the options for subsequent blocks will depend very much on each previous choice, I don't think there will be a mathematically elegant solution. A lower bound for the solution would be 24^5, which is what you would get if each block had to sit on top of the previous; that gives nearly 8 million combinations. The true answer will be orders of magnitude higher.
> A lower bound for the solution would be 24^5, which is what you would get if each block had to sit on top of the previous; that gives nearly 8 million combinations.
I made it about 50 ways if you care about absolute rotation of the bricks, which got me 50^5 ~ 0.3 Bn for a six level structure. If you allow multiple bricks on the same level that number goes up a lot.
Its just occurred to me that I was implicitly assuming that the bricks are interchangeable. If each brick is treated as unique then the placement order gives another factor of six factorial = 720 to the final answer, so it could be up around a trillion.
We need better defined parameters, are the bricks all different colours, do we need to consider that each stud has the word "Lego" on it, thus making the orientation of each brick significant, do any of the bricks have teeth marks in them?
> do any of the bricks have teeth marks in them?
no, but one is imbedded in my knee
What if the resulting structure has to be strong enough to survive being dropped?
How I would do it:
- Assume every brick is the same colour. Also assume that rotationally symmetric structures are only considered once.
- It follows that we don't care about the order of construction. Given the complexity of computing acceptable structures by adding bricks sequentially (e.g. each 2 brick combo will have a different number of acceptable 3rd brick positions) I would start with 6 bricks.
- The envelope our structure must fit in is 6 blocks high x 35 pips x 35 pips.
- The 1st block must be on the bottom of the envelope, and because of rotational symmetry many other positions are eliminated as well.
- The other 5 blocks can be anywhere in the envelope. This gives us an upper bound on the total number of structures.
- Now eliminate all impossible combinations; those with either overlapping or non-touching blocks.
- Now eliminate all identical combinations. First order them in some way and then work along the list checking against every previous one.
Are they identical colour?
> What if the resulting structure has to be strong enough to survive being dropped?
Or carried by a swallow?
Do all the bricks have to have their edges alligned parallel. If not there are an infinite number of solutions as when one brick is sitting on a single stud, it can be freely rotated about the stud through about 135’.
I can't imagine how you'd calculate the answer. It's not too hard if they all have to stack one on top of the last but once you consider the possibility of multiple bricks on a single layer the possible numbers of combinations explode. Even ignoring the results that are visually similar but are actually different (rotating superficially symmetrical bricks) the answer must be in the millions.
jk
I rather liked this factoid: It would take 1 billion minifigures, lined up in a single row to wrap around the Earth’s circumference one time. Today there are enough minifigures to wrap around the Earth at least 4 times.
I think the answer would depend on whether mirror images are considered identical. And whether each of the 6 blocks is considered unique or identical. And whether placing the blocks next to each other is considered "combining" or whether they actually have to be attached by a knob in a hole. And whether you are allowed to cut up the bricks to make some of your shapes. And whether all 6 must be assembled together or if you can have 3 pairs or 1 group of 4 and a pair or whatever. And whether, in the case of single knob attachments, every different angle of rotation is considered to be a different combination (in which case there are infinite solutions). And whether making the same "pattern" with different orientations in a 3 dimensional space are considered different (again this would give infinite solutions). And whether deformation of the blocks with a blunt object is allowed. And probably various other things I can't think of right now.
So, I'd say "between a big number and infinity depending on how you define the rules" :P
> I can't imagine how you'd calculate the answer.
Depends on what precisely you mean by “calculate”.
If it’s “bung Numbers in to a formula” I think you’re out of luck. If it’s “use a computer to find out”, it’s not so hard.
You could do a brute force and ignorance exploration, but what I would do is....Define a “geometric hash” that efficiently (in terms of processor cycles and bytes of storage) captures a unique description of any given configuration that is blind to rotational symmetry and placement order. You then walk a tree of all possible block combinations, collecting and checking geometric hashes as you go to prune branches that only differ by rotation, keeping track of their existence by folding their existence in as a counting number on the first branch to have that hash. This massively collapses the size of the tree being walked.
With the results you can then compute the number of places with and without rotational invariance and with and without placement order invariance.
I would think it reasonable to assume the blocks are identical and indistinguishable and that each block is indistinguishable from itself if rotated 180 degrees about its shortest axis. And that rotations of the final structure do not count, but reflections do. I also assume the blocks are actually attached by the knobs into a single structure.
I've had a bit of a think and suspect it is really quite a hard problem.
You'd also need to specify whether blocks must be only orthogonal or parallel since six can be assembled into a hexagonal structure (though the few odd cases like that probably don't change the result much).
jk
> If it’s “bung Numbers in to a formula” I think you’re out of luck. If it’s “use a computer to find out”, it’s not so hard.
It's still quite (read: beyond me) hard!
jk
> You'd also need to specify whether blocks must be only orthogonal or parallel.
I would assume that to be the case, otherwise there are infinite possibilities even with just two blocks!
This thread reminds me of what I have been thinking for quite a while about Lego. When one simply got a load of blocks and got on with it like I did when I was a child, it offered almost limitless scope for imagination and creativity - which made it the perfect, never ending toy. Nowadays, sadly, most Lego seems to be sold in prescriptive kits to make a car or whatever, and I strongly suspect children will get bored more quickly and learn much less.
> Nowadays, sadly, most Lego seems to be sold in prescriptive kits to make a car or whatever, and I strongly suspect children will get bored more quickly and learn much less.
Thats why I buy knock off Duplo for Wintertree, Jr. You can get large packs of nothing but 2x2s and 2x4s. The mechanical tolerances are good enough for use with actual Duplo but they’re not good enough for mixing with actual Lego in the way Duplo does.
I’m looking forwards to 3D printing some custom Duplo pieces to link our wooden railway set up with blocks, to make an elevated railway.
not really " how to do it " , but a clip of a maths professor on how difficult it is :
youtube.com/watch?v=3ItV57Mnnh8&
> not really " how to do it " , but a clip of a maths professor on how difficult it is :
Brilliant!
http://web.math.ku.dk/~eilers/lego.html
My brief pondering got as far as the 24 connections, and deduced the rotational symmetry issue, giving 46^5/2. I missed the subtlety.
Coincidentally, I was looking at Lego bricks for work, and asked a colleague whose partner builds models and Legoland, and she pointed out the 6 bricks thing. We pondered about it for a bit, and then I remembered this thread...
I asked my 9 year old son and Lego fan and without hesitation he said "Probably millions"!
Interesting question. Seems simple at first but the more you think about it the harder it seems.
One of the biggest problems I can see in getting a precise answer is that for each brick you add beyond the first two, there are a number of 'prohibited' placements where you can't connect a brick because there is another brick in the way. The number of 'free' placements is entirely dependent on the configuration of the previous bricks which makes calculating in really difficult.
For example, if you have a configuration where the first brick is directly on top of the second brick then there are only 48 possible unique 'free' placements for the third brick.
If however your first two bricks are only connected by a corner stud then there are 95 possible unique free placements for the third brick.
I suspect you’d need a good program and use nested calls to subroutines.
The first layer can have a maximum of 5 blocks. If it has 5 blocks, the sixth block on the second layer can only go in one position but I think there are only 7 positions for the 5 blocks as lots of the positions will have rotational symetry. As soon as you add a second block to the second layer a lot of the rotational symetry positions starts to get lost.
Sounds like a tough program to write comparing each solution with all the previous ones to eliminate symmetrical solutions. Maybe use a octal based value system to describe each brick in a layer as occupying a position and rotation on a 19x19 grid.
Each extra block on a layer reduces the number of total layers.
The second BMC Members Open Forum webinar took place on 20 March. Recently-appointed BMC CEO Paul Ratcliffe, President Andy Syme and Chair Roger Murray shared updates on staff changes, new and ongoing initiatives, insurance policy changes and the current...