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 with more frequent letters on shallower paths. If we if represent time2 by fixing the path-length from the root node, instead of the x-distance, we get this:
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 3 4 . 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.5
Specifically, a subset of ITU-R M.1677-1 International Morse Code, plus a few prosigns. ↩︎
Path length the time needed to send the string formed by N repetitions of whatever character, for a large enough N. ↩︎
Since
" "is/gap{2,}/, our word-break (by convention,/) becomes the label given to the root node. ↩︎If we were to instead show it as a true binary tree w/ one solid for tone, dotted for silence, and one edge per unit time:
↩︎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. ↩︎