Interesting. There’s something to be said for a manually curated dictionary, even if it is a bit short– “commonly occurring” code words don’t necessarily lead to cool-sounding code phrases :). (On a related note, the example Python code is arguably a really bad example of appropriate actual use for a project. That is, I found it fun to generate a couple dozen code names at a time, and find at least one or two that were amusing… but in practice this would lead to “searching” for code names that might have some actual relationship with the project whose security you’re trying to protect.)

]]>No, I was referred to this problem in Peter Winkler’s latest Mathematical Puzzles book. The linked video is a great explanation of what’s happening… but it doesn’t mention what I think is one of the most interesting wrinkles, namely that we don’t actually know whether the easy-to-state “theorem” describing this behavior is actually true or not! That is, does m=10^(2d) *always* yield a number of bounces given by the first d+1 decimal digits of pi? It’s possible that it could “miss” for some values of d, but this depends on sufficiently long sequences of 9s appearing in the digits of pi, the frequency of which we don’t currently have any proven guarantees.

]]>If a piece has been successfully placed then a check is made not to create spaces smaller than a piece or in which it is impossible to place pieces by using another 11-th lookup table ( for the moment it has 313 entries ) . If impossible spaces are created then give up testing the rest of the pieces and start another loop.

Thus running ( just for fun) on a PIC16F18857 microcontroller running at 32 MHz (8 MIPS) , starting from a purple part position (there are 228 possible positions but 114 unique starting positions without rotations) all positions are calculated in about 3 days with the remaining 9 pieces.

In total about 1 year all 1.14 x 10 exp 22 positions of the parts are tested ]]>

Just a quick follow-up — my friend and I both managed to create solvers using python that generate the full set of solutions. Mine runs in about 191 seconds, which is *far* slower than yours, but fast enough to not inhibit me.

We made some density plots for each of the pieces to see where each piece tends to be placed the most often, and have identified many 2-piece “starts” where there is only a single solution. I’m still running the tool to see if there are any single-piece starts with a single solution, i.e., if you put piece X in a certain spot, there’s only one solution after that. I suspect there aren’t any, but I haven’t confirmed that yet.

I’m also curious what … say… 5-piece start results in the largest number of unique solutions, meaning if you started someone with that board they have the easiest job of finishing.

I realized this problem is a little bit like an ant colony climbing up a tree looking for fruit on the branches. The ants can search every branch, which will take a long time (what else do they have to do), but if they could figure out how to eliminate branches without searching them that could save them a huge amount of time.

I still have no clue how your tool actually attacks this problem to identify dead-ends as shallowly as possible. My tool borrows an idea from my friend and takes the “L” (“+”-shaped) piece and moves it around the top left quadrant, then tries to fill in the remaining pieces, starting in the top left corner. Switching to this approach, I went from a few dozen solutions a second to like 1800 solutions per second (not all of them unique).

Thanks for the fun problem, help, and discussion!

]]>