We received a new BreakoutEDU box the other day and it came with new and improved Multi-Locks. What is a multi-lock? It’s a combination lock that uses letters or arrows instead of numbers. Cool idea, but I wanted to generate a list of all possible words I could make.
After a bit of research, I found a post on the MetaFilter community blog with the answer. In a thread about solving a bike lock combination, user xueexueg provided a snippet of code that will run in the OSX Terminal app.
At first it wouldn’t run properly and returned an error. So, more digging. The answer was found in a GREP manual on GNU.ORG. I had to be sure the apostrophes were straight (not slanted) for the code to work. And voilå!
The default ring set generated 70 words! Some of them weren’t immediately familiar (names of European cities, Latin terms, and derivations) but others were. I changed out one ring and the next list topped out at 256 words! Wow!
Here’s the code if you want to try it yourself (it was easier for me to simply enter the code directly in Terminal than to copy/paste, thus avoiding the apostrophe issue).
grep -iE '^[xxxxxxxxxx][xxxxxxxxxx][xxxxxxxxxx][xxxxxxxxxx][xxxxxxxxxx]$' /usr/share/dict/words
Enjoy!
Update: after a bit more research, I’ve determined there are 240 possible ring combinations for this lock. The first 10 combinations alone resulted in over 1400 words.