First check out the guest comic I did for Irregular Webcomic! (irregularwebcomic.net). I think it's better than the one I posted below.

If you haven't heard of it before, Irregular Webcomic! is a webcomic of Lego and gaming photo comics by David Morgan-Mar. My favorites are the math related strips of course :D

(Double check the math since I did it rather quickly without checking).

If you haven't heard of it before, Irregular Webcomic! is a webcomic of Lego and gaming photo comics by David Morgan-Mar. My favorites are the math related strips of course :D

(Double check the math since I did it rather quickly without checking).

Nice! Although the hard part is to get people to create random towers. I bet that the chances that the tower a person create less than random towers is not negligable.

20! is a really loose bound on the number of constructions. That essentially covers putting the 20 different bricks in order in a row. But suppose we restrict ourselves to using standard 2x4 bricks. There are 20 ways to position one 2x4 brick on top of another so that they are connected by at least one dot. So there are at least 20^16 * 20! ~= 1.5e39 ways to connect 20 distinct 2x4 bricks. However, consider that there probably aren't 20 different colors of brick in your random sample and the number drops (well, if you consider two same-color 2x4 bricks interchangeable, anyways).

Determining how many different configurations are possible from your own LEGO collection is left as an exercise for the reader.

Yup very true. My bound is off by several orders of magnitude, but is sufficient for what I wanted to argue :D

You also have to consider that some shape configurations of Lego bricks may occur with higher frequencies than other. It is therefore probable that the configuration used in the above problem is one of these. In those cases, the probability of the shape configuration occurring again is fairly likely.

On another note, using the assumption of one configuration per second, the probability of a particular configuration NOT occurring over a period of 1x10^6 years: http://www.wolframalpha.com/input/?i=%28%2820!-1%29%2F20!%29^%283600*24*365*1000000%29

Of course, you don't need to suppose 20 different colours: there are certainly 20 distinct types of Lego bricks (in fact, there are far more).

Now, it's no fun if we let the pieces be distinct.

If we assume that all pieces are the same; all of them red 2x4 bricks, for instance; now comes the interesting question: How many distinct towers of height 20 can we then build?

Even better: If we don't require the pieces to be all on top of each other; how many ways can they be combined?

The first question could be a fun exercise; the second one is quite a bit harder.

I know about this because a professor here at University of Copenhagen, Søren Eilers, happens to have looked into the whole LEGO counting thing. If you're curious (and I bet you are); I would encourage you to take a look at his page about his findings.

Absolutely. It should have occurred to me that the "Lego counting" problem is one that people have already studied in depth!

I'm sure Søren would be very excited if you happened to come up with a solution for the second question, however. ;)

I've seen something similar to this but it used a deck of cards.

The claim was that if you have a (thoroughly shuffled) deck of cards,then no other deck of cards in the history of the world has had the same exact configuration as the one that you just shuffled.

I think you would be hard pressed to find 20 differently colored 2x4 blocks in any LEGO collection, For the first many years LEGO produced only 6 colors (red, yellow, black, white, blue, green) and they have been quite restrictive introducing more. Furthermore, as others have pointed out, you are really not doing justice to the versatility of LEGO by bounding below with 20!. The number of ways to create a contiguous building with 20 identically colored 2x4 LEGOs is at least 2*10^33. Some of these would contain symmetries so you cannot multiply by 20! to get the total count with 20 differently colored blocks, but you wouldn't be far off. If you want I would be happy to find you a precise lower bound for this which was roughly 10^50. But I'd strongly suggest to go with fewer colors to stay realistic.

That's silly, with a computer it is clearly possible to do far more than one construction per second ( let alone using a supercomputer or a computer of the future )

Reading this makes me feel like I'm going to create a black hole if I create the exact same tower a second time just to see what would happen :P

Of course., the argument is that its 'highly unlikely' that the same other tower has been made before or will be again., however due to the law of large numbers, chances are it has happened and will happen again that some towers have infact matched. Sorry, no black holes forming in your toy closet today.

This has all happened before.

It will all happen again.

But with TinkerToys.

I would guess one tower per second is not enough. That's only about 30 million towers a year. But certainly there are more than 30M people posessing LEGOs and build more often than once a year.

You also have to take into consideration the fact that most people don't just stack bricks in a random order, and try to create coherent objects, such as a vehicle, building, or creature of some sort. The chances that a somewhat random configuration of bricks would be created by someone else is incredibly small, since nobody has really had a reason to randomly connect LEGOs to each other, except for storage, and now us nerds (see previous comic to find out if this term applies to you). So in theory, the probability that someone will build the same random lego tower as you has just gone up a bit, now that it's been suggested to us. Anyway, I'm off to get some Mega Blocks, so as to further improve my chances of a unique configuration.

Now figure it out for Construx! ;)