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.

/ TM O0 98 GQZ ,7N KYGO AHEADC ATTENTION DX B6E AWJ 1'PR OUT.L"& / WAIT IU 2? FSV 3ROGERH4 5ERROR

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

i:  meaningful English sentences [[:print:]]* i:\ \text{meaningful English sentences} \hookrightarrow \texttt{[[:print:]]*}

is one where humans are already pretty good at computing the error-correcting projection i +i^+ on the fly, lol.3


  1. Specifically, a subset of ITU-R M.1677-1 International Morse Code, plus a few prosigns.  ↩︎

  2. Since " " is /gap{2,}/, our word-break (by convention, / ) becomes the label given to the root node. ↩︎

  3. 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.  ↩︎