Conan Doyle's Dancing Men
The fictional stick-figure cipher Sherlock Holmes solves in The Adventure of the Dancing Men (1903) — a frequency-analysis primer disguised as a Strand magazine story.
Fictional substitution cipher
Interactive Exhibit
Type a short message and the widget will display each letter as a labelled 'dancing man' tag. The story below explains how Holmes used counts and context. Track B — illustrative.
Why This Matters
Arthur Conan Doyle’s The Adventure of the Dancing Men (1903) uses a pictographic substitution cipher as a central plot device. Holmes combines symbol counts, likely letters and contextual guesses to interpret messages threatening Elsie Cubitt. It is a fictional demonstration of cryptanalytic reasoning, not the first popular account: Poe’s The Gold-Bug appeared in 1843.
Doyle’s story shows stick-figure glyphs for only part of the alphabet, with little flags marking word breaks. Later complete alphabets are reconstructions. The cipher in the story is broken in the classic way: count letter occurrences in the longest message, identify the most frequent symbol as E, then use word patterns (single-letter words = A or I, three-letter common words = THE) to back-solve the rest. Holmes solves the system in a few hours — the same way William Friedman would later teach US Army Signal Intelligence Service trainees to attack monoalphabetic ciphers in the 1930s.
A monoalphabetic substitution preserves letter counts and repeated patterns. These clues often help with language text, but no fixed fifty-letter threshold or minutes-long solution guarantee follows. Short messages and unusual vocabulary can remain ambiguous, and published glyph transcriptions need to be checked against the relevant edition.
The story illustrates how patterns and context can expose a substitution. Publicly known glyphs provide encoding rather than secrecy; a hidden monoalphabetic key has weaknesses even with a large permutation space. This does not imply that every short substitution cryptogram has a uniquely recoverable plaintext.
| Hall | Hall XIII · Culture |
| Region | Norfolk, England (in-fiction); London (publication) |
| Era | Edwardian Britain · 1903 |
| Discipline | Monoalphabetic substitution |
| Track | B (alphabet mapper) |
| Modern echo | Cryptography in fiction · Holmes as proto-Bletchley |