An interesting puzzle came to me looking at the elevator buttons this morning.
You are required to generate a list of all Braille patterns that fit in a 2x3 grid. Use a hash
# to denote a bump and a hyphen
- to denote a flat area.
Expected output sample:
#- -- -- ## -- -- #- #- -- (and so on...)
- Your program must separate each pattern by at least one character or line.
- The patterns may be generated in any order.
- All patterns, regardless of what the Braille alphabet actually uses, should be produced. The completely blank pattern is optional.
- Only unique bump patterns should be generated. The following patterns are considered equivilent as the bumps are in an identical arangement. In these cases, use the pattern that is closest to the top-left corner (ie. the first option in this example.)
#- -# -- -- #- -# #- -# -- -- #- -#
Bonus points if you can make it work for any x by y sized grid. (EDIT: Within reasonable bounds. Up to 4x4 is enough for proof of concept.)
Reading the wiki article, it appears there are 45 patterns (including the blank) that meet this puzzle's rules.