View related sites
Have you heard of the etaoin shrdlu?
More on that in a minute. But first … picture the scene: you’re a fearless but very green wireless operator during WWII. You are employed to decode Morse code messages which then get sent on to Bletchley, and you’re new and slow. You’re desperate to get better at decoding this new, strange language.
Which tool(s) would you find most helpful?
How about a grid, with the Morse code letters on them? Here’s one arranged alphabetically, with a few extras in case you need them:
Here’s your first message of the day – are you ready? Too late … here it comes …
- .... . / --- .--. . .-. .- - .. --- -. / -- .- -.-- / -... . / -.-. .- -. -.-. . .-.. .-.. . -.. / .. ..-. / - .... . / .-- .. -. -.. / .. ... / - --- --- / ... - .-. --- -. --. .-.-.- / .- -. / ..- .--. -.. .- - . / .-- .. .-.. .-.. / -... . / ... . -. - / - --- -- --- .-. .-. --- .-- / .- - / ----- --... ----- ----- .-.-.- i
Don’t forget you wouldn’t be seeing these as symbols, either – they’d be sounds you’d hear. The sounds would usually be made by a person, each with a distinctive aural handwriting called a list – a particular style incorporating pauses between sounds, for example.
Did you spot the problem with the alphabetic list? Scanning it is tricky, and somewhat inefficient. Once we hear the first sound of the letter, it would be useful to eliminate all other possibilities quickly – what if we organised our table by the first symbol type (dot or dash), and then the second, and so on, in some systematic way? Something like this, perhaps:
Adapted, with permission, from an original by Sandeep Baruah
Better? What’s that? You’ve noticed something?
When organised like this, it is clearer to see that Morse code seems to be structured to make it most easy to use in terms of letter frequency. In fact, there is an inverse relationship between length of letters represented in Morse code symbols and letter frequency in English. Although letter frequency does vary across languages, it seems relatively stable across some of them; for example:
Image reproduced under licence CC BY-SA 3.0 from Wikipedia
And maybe you’ve recognised something a little like the phrase from the beginning: etaoin shrdlu (this phrase is the subject of many other interesting stories in its own right).ii But it’s not exactly the same, is it? This brings me back to one of my favourite mathematical themes: counting things is hard. Even something that sounds as simple as counting letter frequency in English to order letters by the highest frequency is far from straightforward – there are at least three different ways to do it (counting all words from the same root separately vs together, for example, or counting words in the dictionary, or counting words actually in use in a large number of contexts, known as a corpus).
But back to our Morse code translation. The grid with grouped letters was better, but can you think of an even more elegant solution?
Image reproduced courtesy of Imgur
The beauty of this tree structure (technically a trie – which is the computer science version – gorgeously named after the word retrieval but pronounced “try” which is also wonderfully evocative) is its efficient yet elegant design. In Morse code (ignoring spaces between letters and words), one listens for either a dot or dash; a binary choice, making it perfect for a tree structure like this – provided, of course, there are a reasonably limited number of options, corresponding to the length of the “letter strings” in Morse. (For example, if the letter strings were allowed to be up to ten symbols long, this tree might look and feel a great deal more crowded.) Contrary to what we might believe as maths teachers, tree diagrams aren’t just good for probability – they can be a remarkably useful tool for all kinds of decision-making, decoding, tracing paths, mapping skills or storylines, and considering permutations as in this case. Below, you can see a tree structure representing a “choose your own adventure” story structure.
© Courtesy of Chooseco LLC, Publisher of Choose Your Own Adventure® books
This one is very interesting because it contains edges that loop back or around.
How might you use tree structures creatively in the maths or computing classroom?
Join the conversation: You can tweet us @CambridgeMaths or comment below.