Morse Trie
2026-06-07
If you try decoding Morse code by ear, you'll probably implicitly build a mental trie. Here's it 1 written out explicitly. Solid lines for dash, dotted for dit.
It sort-of looks like a Huffman code , more frequent letters on shallower paths.
I'm doing some slight path-compression on the visualization here, writing terminals on non-leaf nodes. Although there are a few equivalent representations, I think it's best to conceptualize Morse code as trinary w/ symbols dot, dash, and "gap" as a stop codon 2 . This is much less efficient than a true Huffman code, but it does have an edge in that absolutely unambiguous letter-breaks minimize the blast-radius of any error, and the inclusion
is one where humans are already pretty good at computing the error-correcting projection on the fly, lol.3
Specifically, a subset of ITU-R M.1677-1 International Morse Code, plus a few prosigns. ↩︎
Since
" "is/gap{2,}/, our word-break (by convention,/) becomes the label given to the root node. ↩︎This does, however, make it incredibly annoying when trying to unambiguously send Morse on a channel which only supports impulses (clicking a pen, etc). There's competing conventions, but nothing obvious enough to be universal. ↩︎