Hacker News new | ask | show | jobs
All Combinations of Six 2x4 Lego Bricks (c-mt.dk)
42 points by mattmalin 3938 days ago
6 comments

Well that makes my "how many ways can I arrange an Ikea train set" look pretty lame.

http://blog.jgc.org/2010/01/more-fun-with-toys-ikea-lillabo-...

Nonsense! Your post was great fun. The code was fun, too. I particularly enjoyed your comment about to how Pi was referenced in the bible, along with the ensuing rabbit trail of research that took me down.[1]

[1] http://www.tektonics.org/lp/piwrong.php

and how many combinations if I buy two sets?
The Ikea one seems more practical.
Thanks for your post. You've inspired me to write some code for similar problems!
You can create more arrangements if you treat the bridge like two pieces, which it is.
How so? If your goal is to create a loop, the two pieces must be joined together.
You could lengthen the bridge (theoretically, the pieces might not fit that snug) with any combination of the pieces all the way down to the case of a reverse bridge connected at the bottom.
Unless they fit very snugly, I don't think anything would hold up the extra pieces in the middle, especially not well enough to support a train.
The original creator of this type of train track offers just such a support piece.[0] You can also 3D print your own supports![1]

[0] http://i.ebayimg.com/00/s/MTIwMFgxNjAw/z/DAUAAOSwGvhT3ny3/$_...

[1] http://www.thingiverse.com/thing:110221

It bugged me that the 2-brick possibilities pic in [1] wasn't ordered so I made this http://i.imgur.com/ShWZnwl.png

[1] http://www.math.ku.dk/~eilers/lego.html

Won't their definition conflict with the rectilinear definition? Specifically, there are distinct rectilinear configurations which are homotopic. With two bricks connected by at corner, there are two rectilinear configurations but both are homotopic. So their method used to count "homotopy equivalence classes which contain at least one rectilinear configuration" would yield a lower number than the previous result. This seems to contradict when the paper says that their definition extends the previous one.
Where are you getting two from? By the definitions on this page, it seems to me like there are four corner-connected rectilinear configurations of two bricks, and also four homotopy equivalence classes, so there's no inconsistency.

    +--+       +--+
    |  |       |  |
    |  |       |  |
    |  |-+   +-|  |
    +--+ |   | +--+
      |  |   |  |
      |  |   |  |
      +--+   +--+
    
    +-----+       +-----+
    |     |-+   +-|     |
    +-----+ |   | +-----+
         |  |   |  |
         |  |   |  |
      	 +--+   +--+
Your ascii art has convinced me! I imagined you could rotate the left two into each other but that makes no sense.
Note: this is not my work, just something I stumbled across.

GitHub project is here, including examples of all angles considered: https://github.com/LasseD/BrickCounting

I've always wanted to make a sorting box that, given any quantity of random Lego Mindstorms parts, sorts the parts into shape/size/purpose bins. A static box, no moving parts but the raw feed.

I suppose it will have to be a big box, mathematically.

http://thetechnicgear.com/2014/02/best-lego-sorting-machines...

Some of these are interesting.

I'd be interested to see how good something that sorted purely by weight could be. And then with a vision stage?

A minor typo in this paper yields the quote "Our result is that using sic [sic] bricks, one can combine them into different models."