Humble Pi Read online




  Matt Parker

  * * *

  HUMBLE Pi

  A Comedy of Maths Errors

  Contents

  List of Illustrations

  0 Introduction

  1 Losing Track of Time

  2 Engineering Mistakes

  3 Little Data

  4 Out of Shape

  5 You Can’t Count on It

  6 Does Not Compute

  7 Probably Wrong

  8 Put Your Money Where Your Mistakes Are

  9 A Round-about Way

  9.49 Too Small to Notice

  10 Units, Conventions, and Why Can’t We All Just Get Along?

  11 Stats the Way I Like It

  12 Tltloay Rodanm

  13 Does Not Compute

  So, what have we learned from our mistakes?

  Acknowledgements

  Index

  About the Author

  Originally a maths teacher from Australia, Matt Parker now lives in Godalming in a house full of almost every retro video-game console ever made. He is fluent in binary and could write your name in a sequence of noughts and ones in seconds. He loves doing maths and stand-up, often simultaneously. When he’s not working as the Public Engagement in Mathematics Fellow at Queen Mary University of London, he’s performing in sold-out live comedy shows, spreading his love of maths via TV and radio, or converting photographs into Excel spreadsheets. He is the author of Things to Make and Do in the Fourth Dimension.

  Dedicated to my relentlessly supportive wife, Lucie.

  Yes, I appreciate that dedicating a book about mistakes to your wife is itself a bit of a mistake.

  List of Illustrations

  Unless otherwise stated below, illustrations are copyright of the author and courtesy of Al Richardson and Adam Robinson. The author has endeavoured to identify copyright holders and obtain their permission for the use of copyright material. The publisher welcomes notification of any additions or corrections for any future reprints.

  1: ‘The Tacoma Narrows Bridge Collapse’ © Barney Elliott

  2: ‘Sydney Harbour Bridge’ by Sam Hood © Alamy ref. DY0HH0

  3: Torus ball © Tim Waskett

  4: ‘Manchester gears, 3D’ © Sabetta Matsumoto

  5: North American Union concept on gears © Alamy ref. G3YYEF

  6: Cogs and figures © Dreamstime ref. 16845088

  7: High-five © Dreamstime ref. 54426376

  8: Donna and Alex © Voutsinas Family

  9: Kate and Chris © Catriona Reeves

  10, Sumerian counting system and clay table, from Hans Jörg Nissen: Peter Damerow, Robert Englund and Paul Larsen, Archaic Bookkeeping: Early Writing and Techniques of Economic Administration in the Ancient Near East, University of Chicago Press, 1993.

  11: Laser units on rooftop © Claudio Papapietro

  12 © NASA ref. STScI-1994-01

  13, ‘How average are you?’ © Defense Technical Information Center

  14: Average man calculations, from Gilbert S. Daniels (1952) The ‘Average Man’? Wright Air Development Center.

  15: ‘ERNIE’ © National Savings and Investments

  16: Lava lamps at Cloudfare © Martin J. Levy

  17: ‘Quebec Bridge, 1907’ and ‘Quebec Bridge, 1907, following collapse’ © Alamy ref. FFAW5X and FFAWD3

  ZERO

  Introduction

  In 1995 Pepsi ran a promotion where people could collect Pepsi Points and then trade them in for Pepsi Stuff. A T-shirt was 75 points, sunglasses were 175 points and there was even a leather jacket for 1,450 points. Wearing all three at once would get you some serious 90s points. The TV commercial where they advertised the points-for-stuff concept featured someone doing exactly that.

  But the people making the commercial wanted to end it on some zany bit of ‘classic Pepsi’ craziness. So wearing the T-shirt, shades and leather jacket, the ad protagonist flies his Harrier Jet to school. Apparently, this military aircraft could be yours for 7 million Pepsi Points.

  The joke is simple enough: they took the idea behind Pepsi Points and extrapolated it until it was ridiculous. Solid comedy writing. But then they seemingly didn’t do the maths. Seven million sure does sound like a big number, but I don’t think the team creating the ad bothered to run the numbers and check it was definitely big enough.

  But someone else did. At the time, each AV-8 Harrier II Jump Jet brought into action cost the United States Marine Corps over $20 million and, thankfully, there is a simple way to convert between USD and PP: Pepsi would let anyone buy additional points for 10 cents each. Now, I’m not familiar with the market for second-hand military aircraft, but a price of $700,000 on a $20 million aircraft sounds like a good investment. As it did to John Leonard, who tried to cash in on this.

  And it was not just a lame ‘tried’. He went all in. The promotion required that people claimed with an original order form from the Pepsi Stuff catalogue, traded a minimum of fifteen original Pepsi Points and included a cheque to cover the cost of any additional points required, plus $10 for shipping and handling. John did all of that. He used an original form, he collected fifteen points from Pepsi products and he put $700,008.50 into escrow with his attorneys to back the cheque. The guy actually raised the money! He was serious.

  Pepsi initially refused his claim: ‘The Harrier jet in the Pepsi commercial is fanciful and is simply included to create a humorous and entertaining ad.’ But Leonard was already lawyered up and ready to fight. His attorneys fired back with ‘This is a formal demand that you honor your commitment and make immediate arrangements to transfer the new Harrier jet to our client.’ Pepsi didn’t budge. Leonard sued, and it went to court.

  The case involved a lot of discussion over whether the commercial in question was obviously a joke or if someone could conceivably take it seriously. The official notes from the judge acknowledge how ridiculous this is about to become: ‘Plaintiff’s insistence that the commercial appears to be a serious offer requires the Court to explain why the commercial is funny. Explaining why a joke is funny is a daunting task.’

  But they give it a go!

  The teenager’s comment that flying a Harrier Jet to school ‘sure beats the bus’ evinces an improbably insouciant attitude toward the relative difficulty and danger of piloting a fighter plane in a residential area, as opposed to taking public transportation.

  No school would provide landing space for a student’s fighter jet, or condone the disruption the jet’s use would cause.

  In light of the Harrier Jet’s well-documented function in attacking and destroying surface and air targets, armed reconnaissance and air interdiction, and offensive and defensive anti-aircraft warfare, depiction of such a jet as a way to get to school in the morning is clearly not serious.

  Leonard never got his jet and Leonard v. Pepsico, Inc. is now a part of legal history. I, personally, find it reassuring that, if I say anything which I characterize as ‘zany humor’, there is legal precedent to protect me from people who take it seriously. And if anyone has a problem with that, simply collect enough Parker Points for a free photo of me not caring (postage and handling charges may apply).

  Pepsi took active steps to protect itself from future problems and re-released the ad with the Harrier increased in value to 700 million Pepsi Points. I find it amazing that they did not choose this big number in the first place. It’s not like 7 million was funnier; the company just didn’t bother to do the maths when choosing an arbitrary large number.

  As humans, we are not good at judging the size of large numbers. And even when we know one is bigger than another, we don’t appreciate the size of the difference. I had to go on the BBC News in 2012 to explain how big a trillion is. The UK debt had just gone over £1 trillion and they wheeled me out to explain that that is a big number.
Apparently, shouting, ‘It’s really big, now back to you in the studio!’ was insufficient, so I had to give an example.

  I went with my favourite method of comparing big numbers to time. We know a million, a billion and a trillion are different sizes, but we often don’t appreciate the staggering increases between them. A million seconds from now is just shy of eleven days and fourteen hours. Not so bad. I could wait that long. It’s within two weeks. A billion seconds is over thirty-one years.

  A trillion seconds from now is after the year 33700CE.

  Those surprising numbers actually make perfect sense after a moment’s thought. Million, billion and trillion are each a thousand times bigger than each other. A million seconds is roughly a third of a month, so a billion seconds is on the order of 330 (a third of a thousand) months. And if a billion is around thirty-one years, then of course a trillion is around 31,000 years.

  During our lives we learn that numbers are linear; that the spaces between them are all the same. If you count from one to nine, each number is one more than the previous one. If you ask someone what number is halfway between one and nine, they will say five – but only because they have been taught to. Wake up, sheeple! Humans instinctively perceive numbers logarithmically, not linearly. A young child or someone who has not been indoctrinated by education will place three halfway between one and nine.

  Three is a different kind of middle. It’s the logarithmic middle, which means it’s a middle with respect to multiplication rather than addition. 1 × 3 = 3. 3 × 3 = 9. You can go from one to nine either by adding equal steps of four or multiplying by equal steps of three. So the ‘multiplication middle’ is three, and that is what humans do by default, until we are taught otherwise.

  When members of the indigenous Munduruku group in the Amazon were asked to place groups of dots where they belong between one dot and ten dots, they put groups of three dots in the middle. If you have access to a child of kindergarten age or younger with parents who don’t mind you experimenting on them, they will likely do the same thing when distributing numbers.

  Even after a lifetime of education dealing with small numbers there is a vestigial instinct that larger numbers are logarithmic; that the gap between a trillion and a billion feels about the same as the jump between a million and a billion – because both are a thousand times bigger. In reality, the jump to a trillion is much bigger: the difference between living to your early thirties and a time when humankind may no longer exist.

  Our human brains are simply not wired to be good at mathematics out of the box. Don’t get me wrong: we are born with a fantastic range of number and spatial skills; even infants can estimate the number of dots on a page and perform basic arithmetic on them. We also emerge into the world equipped for language and symbolic thought. But the skills which allow us to survive and form communities do not necessarily match formal mathematics. A logarithmic scale is a valid way to arrange and compare numbers, but mathematics also requires the linear number line.

  All humans are stupid when it comes to learning formal mathematics. This is the process of taking what evolution has given us and extending our skills beyond what is reasonable. We were not born with any kind of ability to intuitively understand fractions, negative numbers or the many other strange concepts developed by mathematics, but, over time, your brain can slowly learn how to deal with them. We now have school systems which force students to study maths and, through enough exposure, our brains can learn to think mathematically. But if those skills cease to be used, the human brain will quickly return to factory settings.

  A UK lottery scratch card had to be pulled from the market the same week it was launched. Camelot, who run the UK lottery, put it down to ‘player confusion’. The card was called Cool Cash and came with a temperature printed on it. If a player’s scratching revealed a temperature lower than the target value, they won. But a lot of players seemed to have an issue with negative numbers …

  On one of my cards it said I had to find temperatures lower than −8. The numbers I uncovered were −6 and −7 so I thought I had won, and so did the woman in the shop. But when she scanned the card, the machine said I hadn’t. I phoned Camelot and they fobbed me off with some story that −6 is higher, not lower, than −8, but I’m not having it.

  Which makes the amount of mathematics we use in our modern society both incredible and terrifying. As a species, we have learned to explore and exploit mathematics to do things beyond what our brains can process naturally. They allow us to achieve things well beyond what our internal hardware was designed for. When we are operating beyond intuition we can do the most interesting things, but this is also where we are at our most vulnerable. A simple maths mistake can slip by unnoticed but then have terrifying consequences.

  Today’s world is built on mathematics: computer programming, finance, engineering … it’s all just maths in different guises. So all sorts of seemingly innocuous mathematical mistakes can have bizarre consequences. This book is a collection of my favourite mathematical mistakes of all time. Mistakes like the ones in the following pages aren’t just amusing, they’re revealing. They briefly pull back the curtain to reveal the mathematics which is normally working unnoticed behind the scenes. It’s as if, behind our modern wizardry, Oz is revealed working overtime with an abacus and a slide rule. It’s only when something goes wrong that we suddenly have a sense of how far mathematics has let us climb – and how long the drop below might be. My intention is not in any way to make fun of the people responsible for these errors. I’ve certainly made enough mistakes myself. We all have. As an extra, fun challenge I’ve deliberately left three mistakes of my own in this book. Let me know if you catch them all!

  ONE

  Losing Track of Time

  On 14 September 2004 around eight hundred aircraft were making long-distance flights above Southern California. A mathematical mistake was about to threaten the lives of the tens of thousands of people onboard. Without warning, the Los Angeles Air Route Traffic Control Center lost radio voice contact with all the aircraft. A justifiable amount of panic ensued.

  The radios were down for about three hours, during which time the controllers used their personal mobile phones to contact other traffic control centres to get the aircraft to retune their communications. There were no accidents but, in the chaos, ten aircraft flew closer to each other than regulations allowed (5 nautical miles horizontally or 2,000 feet vertically); two pairs passed within 2 miles of each other. Four hundred flights on the ground were delayed and a further six hundred cancelled. All because of a maths error.

  Official details are scant on the precise nature of what went wrong but we do know it was due to a timekeeping error within the computers running the control centre. It seems the air traffic control system kept track of time by starting at 4,294,967,295 and counting down once a millisecond. Which meant that it would take 49 days, 17 hours, 2 minutes and 47.296 seconds to reach 0.

  Usually, the machine would be restarted before that happened, and the countdown would begin again from 4,294,967,295. From what I can tell, some people were aware of the potential issue so it was policy to restart the system at least every thirty days. But this was just a way of working around the problem; it did nothing to correct the underlying mathematical error, which was that nobody had checked how many milliseconds there would be in the probable run-time of the system. So, in 2004, it accidentally ran for fifty days straight, hit zero, and shut down. Eight hundred aircraft travelling through one of the world’s biggest cities were put at risk because, essentially, someone didn’t choose a big enough number.

  People were quick to blame the issue on a recent upgrade of the computer systems to run a variation of the Windows operating system. Some of the early versions of Windows (most notably Windows 95) suffered from exactly the same problem. Whenever you started the program, Windows would count up once every millisecond to give the ‘system time’ that would drive all the other programs. But once the Windows system time hit 4,294,96
7,295, it would loop back to zero. Some programs – drivers, which allow the operating system to interact with external devices – would have an issue with time suddenly racing backwards. These drivers need to keep track of time to make sure the devices are regularly responding and do not freeze for too long. When Windows told them that time had abruptly started to go backwards, they would crash and take the whole system down with them.

  It is unclear if Windows itself was directly to blame or if it was a new piece of computer code within the control centre system itself. But, either way, we do know that the number 4,294,967,295 is to blame. It wasn’t big enough for people’s home desktop computers in the 1990s and it was not big enough for air traffic control in the early 2000s. Oh, and it was not big enough in 2015 for the Boeing 787 Dreamliner aircraft.

  The problem with the Boeing 787 lay in the system that controlled the electrical power generators. It seems they kept track of time using a counter that would count up once every 10 milliseconds (so, a hundred times a second) and it capped out at 2,147,483,647 (suspiciously close to half of 4,294,967,295 …). This means that the Boeing 787 could lose electrical power if turned on continuously for 248 days, 13 hours, 13 minutes and 56.47 seconds. This was long enough that most planes would be restarted before there was a problem but short enough that power could, feasibly, be lost. The Federal Aviation Administration described the situation like this:

  The software counter internal to the generator control units (GCUs) will overflow after 248 days of continuous power, causing that GCU to go into failsafe mode. If the four main GCUs (associated with the engine-mounted generators) were powered up at the same time, after 248 days of continuous power, all four GCUs will go into failsafe mode at the same time, resulting in a loss of all AC electrical power regardless of flight phase.