Find 77 7-letter Magic Words

0

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.

BbJug

Posted 2019-06-09T03:45:20.063

Reputation: 11

Question was closed 2019-06-09T07:48:37.270

3Does 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? – Embodiment of Ignorance – 2019-06-09T03:47:43.263

@EmbodimentofIgnorance there’s nothing in the question that requires 7 letters is there? – Nick Kennedy – 2019-06-09T07:25:23.293

@Nick Kennedy It's in the title. – lirtosiast – 2019-06-09T07:50:10.593

@lirtosiast oops. Should really be in the spec too – Nick Kennedy – 2019-06-09T10:19:18.683

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. – Level River St – 2019-06-09T12:55:07.657

The words must be valid however the pool from which they are found is not specified. – BbJug – 2019-06-09T14:47:57.233

@BbJug Is the dictionary / pool allowed to be external to the byte count or not? Also if you don't specify the pool from which they are found then the number of words found depends on the external pool so it's not guaranteed to be exactly 77. What should happen if the program finds less/more? If you don't specify a dictionary you get arguments about what is a valid word. What about these for example? WOWEEEE OOOOOOH HEHEHEH – Level River St – 2019-06-09T17:53:02.040

should you choose to use a dictionary its size would not be included in the byte tally. how you end up with precisely 77 words is up to you 8). And a valid word is simply one that has a tangible definition and has seen plenty of unironic use – BbJug – 2019-06-10T04:16:15.857

Would've been nice if the challenge was just to get magic words from an input list of strings... it's hard to define what constitutes "using a dictionary" and the bytecount stuff that you're mentioning. – Value Ink – 2019-06-19T04:17:26.033

Very valid point @ValueInk. In hindsight this is definitely the right approach for the most consistency. – BbJug – 2019-06-19T16:35:14.117

Answers

3

Jelly, 77 74 bytes

×6‘ḃØ⁵ịØJ⁾“»jVŒu
“¢~ỌƈY⁴⁸ġƁUP©¥!ḃ^⁶ẹøD’ḃ61
ÑOị¢BSS×LƲ⁼182µ77#Ñ€Ożị¢+⁽$ṁƊ$Ọ

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.

Nick Kennedy

Posted 2019-06-09T03:45:20.063

Reputation: 11 829

heh, I didn't actually expect anyone to try this one out. Nicely done Nick. – BbJug – 2019-06-09T14:47:06.537

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! – Level River St – 2019-06-09T18:02:37.283

Honestly you should've kept the 77 byte answer (because then it matches the challenge specification of 77 words). – Draco18s no longer trusts SE – 2019-06-19T01:40:59.550

@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 – Nick Kennedy – 2019-06-19T06:38:32.553