A magic word is a word whose Braille spelling contains precisely 26 dots (because the Morse code alphabet can be circularly encoded within). For example:

 ⠎ ⠝ ⠥ ⠛ ⠛ ⠇ ⠽ snuggly
 ⠏ ⠕ ⠇ ⠽ ⠛ ⠕ ⠝ polygon
 ⠝ ⠥ ⠛ ⠛ ⠑ ⠞ ⠽ nuggety
 ⠽ ⠕ ⠛ ⠓ ⠥ ⠗ ⠞ yoghurt

are all magic words.

Objective: Craft a program to identify 77 such magic words and output the word along with its Braille spelling.

  • 3
    \$\begingroup\$ Does the word have to be a valid english dictionary word? If so, which dictionary do we use? Lastly, we can use any words that are seven letters and are magic, right? \$\endgroup\$ – Embodiment of Ignorance Jun 9 at 3:47
  • \$\begingroup\$ @EmbodimentofIgnorance there’s nothing in the question that requires 7 letters is there? \$\endgroup\$ – Nick Kennedy Jun 9 at 7:25
  • \$\begingroup\$ @Nick Kennedy It's in the title. \$\endgroup\$ – lirtosiast Jun 9 at 7:50
  • \$\begingroup\$ @lirtosiast oops. Should really be in the spec too \$\endgroup\$ – Nick Kennedy Jun 9 at 10:19
  • \$\begingroup\$ If you took the requirement to write a program to do this, it would be a better fit on puzzling.SE. Either way I think we need to know which dictionary is applicable. The trouble is, once we know the dictionary, the output of the program will be fixed and we may as well use some kind of hard coding rather than solve using an algorithm. That may not be a huge issue though, as a naive hard coded program is probably not going to beat a more ingenious one. \$\endgroup\$ – Level River St Jun 9 at 12:55

Jelly, 77 74 bytes


Try it online! (Times out)

Demo using 4 words and starting the search later in the dictionary

All 77 words produced if enough time allocated

A full program that generates 77 seven-letter words from Jelly’s dictionary that require exactly 26 dots in Braille. Now outputs a list of lists with the word in ASCII and then Braille.

  • \$\begingroup\$ heh, I didn't actually expect anyone to try this one out. Nicely done Nick. \$\endgroup\$ – BbJug Jun 9 at 14:47
  • \$\begingroup\$ I converted all your words into base 36 and subtracted each word from the previous one. The biggest difference was a 33 bit number (should be well within 32 bits in base 26.) So I think you have a little under 308 bytes of entropy here. So good use of the Jelly dictionary! \$\endgroup\$ – Level River St Jun 9 at 18:02
  • \$\begingroup\$ Honestly you should've kept the 77 byte answer (because then it matches the challenge specification of 77 words). \$\endgroup\$ – Draco18s Jun 19 at 1:40
  • \$\begingroup\$ @LevelRiverSt thanks. Note I’ve also had to encode the translation from ASCII to Braille because the Unicode Braille codepoints are effectively a binary encoding rather than being I ASCII order \$\endgroup\$ – Nick Kennedy Jun 19 at 6:38

Not the answer you're looking for? Browse other questions tagged or ask your own question.