Dot, dot, dot, dash, dash, dash, dot, dot, dot: SOS! You have most certainly heard of this so-called ‘Morse Code’. Morse Code is a code in which letters, numbers and even some punctuation marks are represented in dots and dashes. Back in the days, this was a very useful way of communicating over longer distances. With a so-called telegraph, people would send small electric shocks, where a short shock would be a dot and a longer shock would be a dash. They used predetermined intervals to indicate for example a space in a sentence. The inventor of this code, Samuel Morse, tried to make the code in such a way that is could be transmitted as fast as possible, that is, he tried to make his code optimal. But how optimal was his code really?
Before I can explain to you how Samuel Morse tried to optimize his code, we need to know what the Morse Alphabet is. The Morse alphabet shows by how many dots and/or dashes a letter, number or punctuation mark is represented:
But why is, for example, the letter ‘A’ represented by ‘dot-dash’ and the letter ‘B’ by ‘dash-dot-dot-dot’? This all has to do with the frequency of these letters in the ‘average word’. As stated previously, a dot is a short electric shock, while a dash is a bit longer electric shock. What we know from this, is that it takes longer to send out a ‘B’ than it takes to send out an ‘A’. Obviously, the letter ‘A’ is way more common than the letter ‘B’, therefore it made sense to Samuel Morse to give the letter ‘A’ a shorter code. He tried to fully optimize his code by doing this for every letter and that is how he came up with the entire Morse alphabet.
In the time Samuel Morse invented the code, the technology was not developed far enough to get precise numbers on how often a letter occurs in the most commonly used words. These days we do have the techniques to perform such tests, which shows some interesting results. The following table shows the frequency of a letter in the official English language (UK):
How can we apply these frequencies to see how Morse did the ‘optimization job’? Define a dot as ‘1’ and define a dash as a ‘3’. Assume that the time it takes between two characters to be transmitted is 1 second. Using this, sending for example an ‘A’ (dot-dash) would take 1+1+3 = 5 seconds. The following table shows the number of seconds it takes for every letter to be sent sorted from the letter with the highest frequency to the letter with the lowest frequency:
From this table we can immediately conclude that Morse his optimization process was not really that optimal after all. For example, the letter ‘O’ takes 11 seconds to transmit and the letter ‘I’ takes 3 seconds to transmit, but the letter ‘O’ is more frequent than the ‘I’.
Researchers re-arranged the entire Morse Code to be optimal using this table. The result was that with the old Morse Alfabet, it took on average 6.1 seconds to send out a letter, while with theirs it only took 5.7 seconds. That is a difference of 0.4 seconds per letter, which can make a huge difference in the long run. And as we always say: time is money!
This article was written by Lars Beute