The Number Mysteries
eBook - ePub

The Number Mysteries

A Mathematical Odyssey through Everyday Life

  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

The Number Mysteries

A Mathematical Odyssey through Everyday Life

About this book

From the author of The Music of the Primes and Finding Moonshine comes a short, lively book on five mathematical problems that just refuse be solved – and on how many everyday problems can be solved by maths.

Every time we download a song from i-tunes, take a flight across the Atlantic or talk on our mobile phones, we are relying on great mathematical inventions. Maths may fail to provide answers to various of its own problems, but it can provide answers to problems that don't seem to be its own – how prime numbers are the key to Real Madrid's success, to secrets on the Internet and to the survival of insects in the forests of North America.

In The Num8er My5teries, Marcus du Sautoy explains how to fake a Jackson Pollock; how to work out whether or not the universe has a hole in the middle of it; how to make the world's roundest football. He shows us how to see shapes in four dimensions – and how maths makes you a better gambler. He tells us about the quest to predict the future – from the flight of asteroids to an impending storm, from bending a ball like Beckham to predicting population growth.

It's a book to dip in to; a book to challenge and puzzle – and a book that gives us answers.

Trusted by 375,005 students

Access to over 1.5 million titles for a fair monthly price.

Study more efficiently using our study tools.

Information

Publisher
Fourth Estate
Year
2010
Print ISBN
9780007428069
eBook ISBN
9780007362561

FOUR

The Case of the Uncrackable Code

Ever since people first learnt to communicate, they’ve been finding ever more fiendish ways to hide messages from their enemies. Maybe you used a private code to write your diary so that your brother or sister couldn’t read it, just as Leonardo da Vinci did. But codes aren’t only for keeping things secret: they also make sure that information is communicated without errors. And we can use mathematics to create ingenious ways to guarantee that the message that is received is the same as the message that was sent—which is vitally important in this age of electronic transactions.
A code is simply a systematic way of arranging a set of symbols to convey a particular meaning. As soon as you start looking for them, you discover that codes are all around us: there are barcodes on everything we buy; codes enable us to store music in our MP3 players; codes let us browse the Internet. Even this book is written in code—English is simply a code formed of the 26 letters of the alphabet, and our ‘acceptable codewords’ are stored in the Oxford English Dictionary. Even our body contains codes—DNA is a code for reproducing a living creature made of four organic chemical substances called bases: adenine, guanine, cytosine and thymine, or A, G, C and T for short.
In this chapter I’ll show you how mathematics has been used to create and break some of the cleverest codes around, and how it lets us transmit information safely, efficiently and secretly, and lets us do everything from photographing the planets from spacecraft to shopping on eBay. And at the end of the chapter I’ll explain how cracking one of the million-dollar maths problems could help you to crack codes as well.

How to use an egg to send a secret message

In Italy in the sixteenth century, Giovanni Porta discovered that you could write a hidden message on a hard-boiled egg with an ink made by dissolving an ounce of alum in a pint of vinegar. The ink penetrates the shell and marks the hardened white inside, but while the writing stays on the egg white, it disappears from the shell. Perfect for sending secret messages—to crack the code, you crack the egg! And this is just one of the many crazy ways people have come up with to hide secret messages.
In 499BC a tyrant by the name of Histiaeus wanted to send a secret message to his nephew Aristagoras encouraging him to rebel against the Persian king. Histiaeus was stationed in Susa, in modern-day Iran, and his nephew was back home in Miletus, now a part of Turkey. How could he get a message to his nephew without the Persian authorities intercepting it? He came up with a cunning plan. He shaved the head of his faithful servant and tattooed the message onto his bald head. Once the hair had grown back, Histiaeus sent the servant off to find his nephew. When the servant reached Miletus, the nephew shaved the servant’s head, read the message and began a rebellion against the ruling Persian king.
While the nephew only had to shave the messenger’s head to retrieve the message, we have to pity the recipients of secret messages sent by an Ancient Chinese method. The message would be written on a piece of silk, which was then rolled up very tightly. The silk ball was covered in wax and given to the messenger to swallow. Recovering the message once it had reappeared was not a particularly pleasant affair.
One of the most sophisticated ways of hiding a message was developed by the Spartans in 500BC. They used a special wooden cylinder called a scytale around which they would wrap a thin strip of paper in a spiral. The secret message would then be written on the paper, lengthways down the scytale, but when the paper was unwrapped the message looked like gobbledygook. It was only by winding the strip of paper round another scytale of exactly the same dimensions that all the letters lined up again correctly.
These methods for sending secret messages are examples of steganography—the art of concealing—rather than coding. But however devious they were, once the message was discovered the secret was out. So people started thinking about how to conceal the meaning of the message even if it was uncovered.

How to crack the Kama Sutra codes by counting

B OBDFSOBDLNLBC, ILXS B QBLCDSV MV B QMSD, LE B OBXSV MH QBDDSVCE.

LH FLE QBDDSVCE BVS OMVS QSVOBCSCD DFBC DFSLVE, LD LE ASNBGES DFSJ BVS OBTS ZLDF LTSBE. DFS OBDFSOBDLNLBC’E QBDDSVCE, ILXS DFS QBLCDSV’E MV DFS QMSD’E OGED AS ASBGDLHGI; DFS LTSBE ILXS DFS NMIMGVE MV DFS ZMVTE, OGED HLD DMUSDFSV LC B FBVOMCLMGE ZBJ. ASBGDJ LE DFS HLVED DSED: DFSVS LE CM QSVOBCSCD QIBNS LC DFS ZMVIT HMV GUIJ OBDFSOBDLNE.
This looks like gibberish, but it’s a message written using one of the most popular codes ever created. Called the substitution cipher, it works by switching every letter of the alphabet with another one: so a might become P, t might become C, and so on. (I’ve used lower-case for letters in the unencrypted message—the plaintext, as it’s known in the trade, and capitals for letters in the ciphertext.) As long as the sender and receiver have agreed the substitution key in advance, the receiver will be able to decipher the messages, but to everyone else they’ll be a meaningless string of nonsense.
The simplest version of these codes are called Caesar shifts—after Julius Caesar, who used them to communicate with his generals during the Gallic Wars. They work by shifting each letter the same number of places along. So with a shift of three, a becomes D, b becomes E, and so on. From the Number Mysteries website you can download and cut out your own cipher wheel for creating these simple Caesar shifts.
Shifting each letter by the same number of places gives you only 25 possible ciphers, so once you’ve spotted that this is how the message has been encoded it’s quite easy to unscramble. There’s a better way to encode a message: instead of simply shifting all the letters along together, we can mix things up and allow any letter to be substituted for any other. This method of encrypting messages was actually suggested some centuries before Julius Caesar, and surprisingly it wasn’t in a military handbook but in the Kama Sutra. Although this ancient Sanskrit text is usually associated with a description of physical pleasures, it covers a host of other arts that the author believed a woman should be versed in, from conjuring and chess to bookbinding and even carpentry. The 45th chapter is dedicated to the art of secret writing, and here the substitution cipher is explained as a perfect way of concealing messages detailing liaisons between lovers.
While there are only 25 Caesar shifts, if we allow ourselves to substitute any letter for any other then the number of possible ciphers is somewhat greater. We have 26 choices for what to change the letter a into, and for each of those possibilities there are 25 choices of where to send the letter b. (One letter has already been used to encrypt the letter a.) So there are already 26x25 different ways to scramble the letters a and b. If we keep going, choosing different letters for the rest of the alphabet, we find that there are
26x25x24x23x22x21x20x19x18x17x16x16x15x14x13x12x
11x10x9x8x7x6x5x4x3x2x1
different Kama Sutra codes. As we saw on page 40, we can write this as 26!. We should also remember to take 1 off this number because one choice will have been A for a, B for b through to Z for z, which isn’t much of a code. When we multiply out 26! and take away 1 we arrive at the grand total of
403,291,461,126,605,635,583,999,999
different ciphers—over four hundred million billion billion possibilities.
The passage at the beginning of this section is encrypted with one of those codes. To give you an idea of how many possible permutations there are, if I wrote out the passage using all the different possible codes, then the piece of paper would stretch from here to well beyond the outskirts of our Milky Way galaxy. A computer checking one code a second since the Big Bang went off over 13 billion years ago would still be just a fraction of the way through checking each of the codes—and a very small fraction at that.
So the code looks virtually uncrackable. How on earth (or beyond) can you find out which one of this vast number of possible codes I’ve used to encrypt my message? Amazingly, the way to do it is by a very simple bit of mathematics: counting.
images
TABLE 4.01 The frequency distribution of letters in plain English, to the nearest 1%. With this information we can start to crack codes encoded with the substitution cipher.
It was the Arabs in the time of the Abbasid dynasty who first developed cryptanalysis, as the science of codebreaking is called. The ninth-century polymath Ya‘qub al-Kindi recognized that in a piece of written text some letters crop up again and again, while others are used rarely, as shown above. This is something that Scrabble players are well aware of: the letter E is worth only 1 point, as it is the most common letter in the English alphabet, while a Z is worth 10 points. In written texts every letter has its own distinct ‘personality’—how often it appears, and in what combinations with others—but the key to al-Kindi’s analysis is to realize that a letter’s personality doesn’t change when it is represented by another symbol.
So let’s make a start at cracking the code used to encrypt the text at the beginning of this section. Table 4.02 contains a breakdown of the frequency of each of the letters used in the encrypted text.
From the table we can see that the letter S occurs with a frequency of 13%, more than any other letter in the ciphertext, so there’s a good chance that this letter is the one used to encode the letter e. (Of course, you have to hope that I haven’t chosen a passage from Georges Perec’s novel A Void, which was written without using the letter ‘e’ anywhere in the text.) The next most common letter in the ciphertext is D, with a frequency of 12%. The second most common letter in the English language is t, so this would be a good guess for the choice of D. Third in order of frequency in the encrypted message is B, which is used 10% o...

Table of contents

  1. Title Page
  2. Copyright
  3. Dedication
  4. Contents
  5. Introduction
  6. One - The Curious Incident of the Never-ending Primes
  7. Two - The Story of the Elusive Shape
  8. Three - The Secret of the Winning Streak
  9. Four - The Case of the Uncrackable Code
  10. Five - The Quest to Predict the Future
  11. Picture Credits
  12. Keep Reading
  13. A Note on Websites
  14. Index
  15. Acknowledgements
  16. About the Author
  17. Also by Marcus du Sautoy
  18. About the Publisher

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.5M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1.5 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access The Number Mysteries by Marcus du Sautoy in PDF and/or ePUB format, as well as other popular books in Mathematics & Mathematics General. We have over 1.5 million books available in our catalogue for you to explore.