Understanding Cell Phone Technology: Data Compression

STEM education often stops short of explaining how mathematics underlies modern technologies. There’s a reason for that: it’s complicated. But students must be curious about how their cell phones manage to transmit their voices and data from and to anywhere on the planet, right? For the next several weeks, this blog will explore this subject.

Modern communications stand on the shoulders of giants. Our cell phones evolved out of 200 years of scientific research and invention on electricity and magnetism. We’ll warm up today with the mathematical ideas behind data compression, brought to us by the earliest electrical communication capability, the telegraph.

In the United States, we attribute the invention of electric communications – telegraphy – to Samuel F.B. Morse. It took him over ten years of tinkering during the 1830’s and 1840’s before he had a model he could demonstrate publicly. His telegraph relied on stringing a wire between two points and sending an electrical signal along the wire. The signal was sent using a telegraph key like the one pictured above. The operator would push down on the button on the left to send each letter in the message. Each letter was composed of a pattern of dots (dits) and/or dashes (dahs). A dot corresponded to pushing down the key for a short amount of time, sending a short signal. A dash corresponded to pushing down the key for a longer time, sending a long signal. Since there were only two symbols allowed to be sent using this communication system, we can say it was a binary signaling system, just like today’s modern digital systems.

With his partner Alfred Vail, Morse drove the popularization and success of the telegraph. Morse and Vail collaborated to design efficient code to transmit messages, later known as Morse code. They designed this code to take advantage of the fact that different letters occurred more or less frequently in written English text. Whoa, they were using statistics!

You can demonstrate this for yourself. Go paste some English text into the following tool (I’ll wait):

https://www.mtholyoke.edu/courses/quenell/s2003/ma139/js/count.html.

For example, if you pasted the Declaration of Independence in, you’d get back these frequency counts for individual letters:

 

A565  I 512R507

B105                J           35               S          540

C          214                  K22                    T          701

D          272                  L          286            U     225

E          953               M       185                V          78

F          191                N         559              W        122

G         154            O         589               X          10

H         404               P          154            Y          97

Q          6                 Z           4

 

Morse and Vail noticed that E is the most frequently occurring letter in English, so they reasoned it should be sent with the least amount of transmitted signal. Their choices were some combination of dots and dashes, so they chose a single dot to represent E. The second most frequently occurring letter was T, so they represented it with a single dash. Continuing this way, Morse and Vail designed an entire code for sending letters which used the available capacity of the telegraph wire most efficiently. This is data compression.  Even back then, time was money.

A conference of European nations would adopt a slightly different version, International (or Continental) Morse Code, in 1851, which accommodated the need for accented letters (a feature in non-English text). You can actually read the modern version of this standard at https://www.itu.int/rec/R-REC-M.1677-1-200910-I/, but here’s the code itself:

 

  a  . –  i . .  r .-.

b – . . .                j       —              s      . . . 

  c  – .  .                k       – . –                  t  –

  d – . .                  l         . .               u      . . 

                    e . m – – v . . . –

     (accented)  e  . .  . .            n       – .                     w      – –

                    f   . .  .              o     – – –                x       – . . 

                    g  – – .                  p     – – .                y       – . – –

                     h  . . . .               q     – – . –              z       – – . .

1     – – – –                   6   – . . . . 

                                    2     . . – – –                   7   – – . . .

3     . . .  – –                  8   – – –  . .

4     . . . . –                   9   – – – – .

5     . . . . .                   0   – – – – –

 

Data compression harkens back in electrical communications to the time of the telegraph. In future blogs, we will look at the history of some of the other inventions that contributed to the capabilities we now carry in our pockets with our cell phones.