Matt Parker: "The Greatest Maths Mistakes" | Talks at Google

Video Statistics and Information

Video
Captions Word Cloud
Captions
[GOOGLE LOGO MUSIC PLAYING] [APPLAUSE] MATT PARKER: All right. Thank you very much. Thank you for the kind introduction, Ian. It was very kind of you. It's always nice to be introduced by the organizer, saying I didn't think this talk was going to be well-attended. So my name is Matt Parker. And, oh, as appears on the screen here. It's an absolute pleasure to be back at Google. I did a author's talk at Google-- trying to make it out-- it was 2014, late 2014, I think. So it's been over four years since I was last here. And it's pushing me back. I do a little work on YouTube, as was kindly mentioned. And so I've been to the building here before. Last time I was over near Victoria Station. I've been to this building previously. But it's the first time I've been allowed out of the basement, which is-- it's really nice, the rest of the building. Anyway. So the idea is I'm going to talk to you today a little bit about my book, "Humble Pi," which is kind of the whole conceit of the talk. And so the book came out a couple weeks ago. And it's all about mathematics mistakes. And so what I thought I would do is-- oh, there will be Q and A at the end, right? So that anything I don't cover or you've worn your favorite Parker square t-shirt and you think I won't notice, then there'll be a time for that kind of interaction later on. I'll take questions and I'll be around to chat afterwards. What I thought I would do in the more straightforward part of this talk is initially I'll talk a bit about the book and why I wrote it and what's going on there. And then secondly, well, I thought would be a bit different. Because it's easy to go along. And you get asked to do a lot of talks when you write a book, and so I try to make them all a little bit different, particularly at Google, who are very keen on digitizing just everything. And so this talk will be recorded, and it will be online. Hello, everyone. I don't even know where they've hidden the cameras. They may be filming the audience. That's going to be quite an immersive experience. You can watch it back from my point of view. So I thought I'd mix it up and do something a bit different, which is what really happened on some of the greatest maths mistakes. And when I foolishly read the reviews on Amazon for this book-- and I should have learned having been honed in YouTube comments-- and I read the reviews. And people say, oh, why isn't this story in there? This story should be in there, or this story. And I'm, like, OK. A lot of them I fact checked and turns out it wasn't right. And a lot of them-- what the general consensus of that mistake was is correct or they're slightly off. So what I thought I would do is, once I've introduced the book, I'm going to go through my favorite stories that made it into the book and what I actually found when I researched those stories. Because a lot of them I kind of knew this maths mistake happened and there was an interesting result. But I was surprised, when I dug into it, what the true and slightly more accurate, if not more precise, answer is to what happened. So we'll start with the book itself. So as was covered very efficiently, my career is an unusual mix of different types of mathematics communication. So I used to be a secondary school teacher. So I used to teach maths to teenagers, originally in Australia, where I'm from. I grew up in Perth in Western Australia. I studied mathematics and miscellaneous other bits and pieces when I was at university. Then got my teaching qualification, taught in Perth for a year, moved to the UK. I taught in a couple of different schools in and around London. Fairly easy going to difficult schools, because I enjoyed challenge. And I knew each time I was just teaching at the school for a year. And you can tolerate a lot for a single year. And I'll take my hat off to some of the teachers who do that day in, day out. Right? And they're there every single year, and they actually learn, like, the students' names. Whereas I was kind of in, boom, maths out, which is great fun. And I gradually transitioned from being a classroom teacher to what I do now, which is doing a lot of work on YouTube, doing bits of writing. I originally started doing newspaper articles and doing little live shows. So actually, if anyone does want to come along to "An Evening of Unnecessary Detail", it's once a month in East London. It's exactly what it says. That is not an ironic title. We invite comedians who like science. And scientists who think they're comedians. And we get them to come and talk about something in an unnecessary level of detail. It's fantastic for me. Reviews in the audience vary. So it's a weird mix of things. And I've gone to writing books. And my first book, which I came and spoke about here previously, was all about hands on mathematics. It was recreational maths. Here's some interesting maths. Here is how you can actually try a puzzle, build a thing, or somehow interact with it. Because so much of mass is about the doing, and the experimenting, and then having a go, of which I am a big fan. And when I went back to Penguin to write a second book, they're, like, "Things to Make and Do in The Fourth Dimension"-- great book. It sold adequately. I'm paraphrasing. It sold-- because it sold good for a maths book. It sold adequate as a book. And that's kind of what Penguin care about. And they're like why should we publish another maths book from you? Again, they didn't say this, but it was in their eyes. Why should we publish another maths book from you when we could do another celebrity cookbook, which is the only other option? And I said, hey, what if I wrote a book about maths mistakes, when maths goes wrong? And they're like, oh, that's interesting. Because they thought there would be a much wider appeal of a book about mistakes and things going wrong than another pure mathematics book. And I was, like, oh, brilliant! So I started collecting stories of when maths had gone wrong. And my kind of ulterior motive, and what I talk about quite a bit in these talks, is that I wanted to show how much maths are required in our modern society, how much goes on behind the scenes, behind all types of technology and finance and medicine, and things I don't have to labor in front of this audience. And I thought, oh, you know, when it goes wrong, that's a good excuse to have to explain the maths about why that went wrong. And it means I can cover all these interesting areas of technology and modern life when maths goes wrong. But then as a teacher, I was, like, yeah, but I don't want to have a whole book which is making fun of people who get maths wrong or discouraging people from making mistakes. I'm a big fan of these things. And so partly I put in a bunch of just-- I'm always curious. How was that mistake made? Is it important? What was going on behind the scenes? And so actually, as a teacher, this was one of my absolute favorite posters, which I managed-- I saw this online. I got a copy of this. This is absolutely brilliant. And try not to skip ahead to the punch lines. "Education works best when all the parts are working." Now just-- if you would tolerate me breaking this down into unnecessarily small steps-- it's students, the cog labeled students is going clockwise. Anything that meshes with it has to go the other way. So teachers are going to be going anti-clockwise. But neither of them can move, because parents are jamming up the whole system, which makes this one of the more accurate educational posters out there. And I had a good chuckle at this. Someone just hadn't thought through the geometry. And it's not important. But it's funny, right? So I thought this poster was hilarious, which is why I went and bought a copy. And now I started spotting this everywhere. Is it the frequency illusion, where you're aware of something and suddenly you start spotting it in loads of different places? And so this was in Manchester, when they brought out a new public transport system-- "making the city work together." Brilliant, pretty accurate for the trans in Manchester, in my experience. And then someone did point out online that-- well, hang on, hang on-- there's a whole third dimension available here. All right? You've only got one perspective on it. You've got to broaden your mind. Look at that! If you think outside the plane, look at that! It works a treat. That doesn't work, though, if you've already used the third dimension in the cogs. So early on in the Trump administration they were going to renegotiate the North America Free Trade Agreement, right? And so "USA Today" illustrated the incredible progress they were making-- so good. And they were already 3D. So you've used up your third dimension, right? So I paid good money. I paid more money than I should have, out of my own pocket, to license this image so I could put it in my book. So if you've got the book, I believe in the fine Google tradition, they will show up late. There will be copies around. Are they here? Or are they still-- SPEAKER 1: They're here, yeah. MATT PARKER: They are here. SPEAKER 1: [INAUDIBLE]. MATT PARKER: Wow, you guys are more organized than ever. OK. Oh, that's fine. [INAUDIBLE] you've got them. OK. If you flip through the book, you'll find I paid money to put this in the book just because I've wanted to have the caption Making Cogs Great Again. I took the rest of day off after writing that. And my favorite example, possibly, is the two pound coin. So these came out about 20 years ago, two decades past. And there's different circles that different ages of the UK. And there's one in the middle with lots of cogs. And there was a competition to design the coin. It was won by a guy called Bruce Russian, who lives in Norwich. He's a art teacher and an artist in his own right. And he had the winning design for this. However, if you count the number of cogs, you will see that there are an odd number of cogs. And so if they're alternating clockwise, anti-clockwise, they will not be able to move, right? So famously, in particularly niche circles, the cogs in the two pound coin don't go anywhere. I will let you decide what era of the UK that represents. And I thought about contacting Bruce. Because online you can find out who won the competition. That's public knowledge. I figure I can probably find this guy. And so I thought, I will look them up and I will very politely inquire if they had deliberately done this. Right? Or did they not even think about it? What was the thought process? I was always curious to what went on behind the scenes. Because obviously, it's not important if the cogs work in a coin. They can't move anywhere. They're made of one piece of metal, which is a bigger flaw than just the number of cogs that mesh. And so I went to their website and found the original design. This is on Bruce's website. And I had a close look at it. And that would have worked. That is an even number of cogs. But when it was turned into the two pound coin, these three were removed. And that set it to an odd number of cogs. And so the original design would have worked. I was, like, wow. Now I'm extra curious. Was that deliberate? And it was broken by the mint? So I emailed him. I said, hey, really sorry, just wondering-- did you think this through? Did you know it would have worked? Did you blah blah blah, all this, yours sincerely, Matt. All right, send. I got a reply back. And it turns out he did think about it. He replied and said, yeah, I thought about it and I realized that it would only work if there was an even number of cogs. But I decided that's not important. And he said how he was an artist. And as an artistic expression, he doesn't think it's important if it's actually mechanically plausible or not. It's just important that it gets across the right impression, which to be fair, I kind of agree with him on that right. I'm all for the artistic impression of what's going on here. So I'm not making fun of people who get this wrong. I just think it's interesting the thought process behind it. But then he went on to say that he decided in the end to make sure it would work, because otherwise, he would get loads of annoying emails from [INAUDIBLE].. Anyway, that bit was in bold. But hey. And then, yeah-- and then the mint broke it. So when they turned it into the thing, that took the cogs out. And it no longer worked, right? And this one, for me, this was the kind of fun trivial example. And I kind of use these as a way of getting people just thinking about the geometry and the logic, right? And hopefully I've done it in a way that is nice and positive and engaging and everyone can get involved. And so this one hobby I picked up recently, which is trying to spot-- I'll show you the example first. See if you can work out why I'm so upset with almost every iteration of "Sesame Street's" "I Don't Want to Live on the Moon", as sung by Ernie. This gets me really outraged because you can see stars shining through the moon. The moon is still there. I also accept that is not an accurate crescent, as if you were illuminating a sphere from one side, right? But that's just going too far. But I don't like the fact that you'll see these crescent moons, and you can see right through them. And there's loads of great examples. I've shown this in a few talks, actually. People have emailed me. And they've realized a wallpaper or something on their laptop is fake. It was meant to be a real photo. But you can see stars shining through the moon. It's obviously been photoshopped. People have sent me screen grabs of TV shows. And they're, like, it just totally took me out of the moment when I realized you could see stars through the moon. And I found the license plates in Texas, which were used-- oh, let's just zoom in, in case it being 5% bigger helps. These are the license plates from Texas. And to celebrate NASA's presence in the Lone Star state, they have this in the corner. And I saw these images online. I was, like, oh, hang on. That star looks dangerously close. The only way I could find out would be to actually buy some license plates from Texas so that I could get a high quality scan. And you may notice that's quite a high quality scan. Because I bought the plates. These are mine now. I've got two of these. I put them on the scanner, which is the image you're looking at here. I zoomed right in on that moon. And if you fill in the circle, sure enough, the plate's undone by a lone star. There you go. And people have since argued that-- some people have argued it's gravitational lensing. I'm not buying that. Number one, mass, and number two, lensing doesn't make things appear in front. You just see them around the sides, right? Anyway, as if I'd taken that complaint way too seriously already. Although, someone said it might be marking the first Apollo landing site. And it's pretty much in the right spot. So I'm prepared to give them a pass on that and just assume it's labeling where NASA landed on the moon. The plate will be around. If you want to come and check it for yourself and convince yourself either way, I'll have that around afterwards. These were the kind of ridiculous examples I was coming up with. And then I gradually pieced them together with more and more serious ones. And so by focusing on ones that weren't so important, and looking at why it happens, and a big focus in the book is the fact that humans are not good at maths. And I go on and on about this because people see people who are good at mathematics and think, well, they must be a genius. It must come naturally. And I'm, like, no, for the vast majority of people who are into maths, they don't find it easy. They're just people who enjoy how difficult it is. And the public don't know-- this is particularly true for everyone here who is a coder, right? It's just-- you've got a thing for self-punishment. It's insane, all right? Just what's the most frustrating task I can try and achieve, right? And it's the fact that it's a challenge, and it's hard. And you eventually notice one semicolon, right? And it's hard work. And it's difficult. But that's why people do it. Not because it comes naturally and it's easy, but because it's a challenge. And that was the kind of goal. And there's obviously a lot in there about why we make mistakes, how we make mistakes, and systems we can put in place to avoid them, and how mistakes end up becoming disasters, and all these things. But now, now we're going to play the middle part of the show, the game of guess what stories Matt put in the book. And I've got three, at least, here that I'm prepared to talk about. But I'm just curious to know, if those of you who have not flipped through it or you haven't already read the book or listened to the audio one available on Audible.com. Does anyone know? What stories do you think might be in there? What are the classic-- very hesitant person in the second row? AUDIENCE: Yeah. The Mars Lander getting that [INAUDIBLE].. MATT PARKER: That's great. You're absolutely correct. In fact, you are so correct, you even gave the correct units that were wrong. So I'm going to break with my normal tradition and say that you should have a round of applause, well done for that. That's-- [APPLAUSE] Let me bring that up. That's so good. So the Mars-- it was the Mars climate orbiter. And when it was launched in, oh, goodness, over a decade ago and sent to Mars, there was a famous understanding that there were-- the general understanding that there was a spacecraft from NASA which crashed into a planet because of a unit's conversion error. And that's the kind of headline a lot of people-- hands up, who's aware there was a spacecraft that crashed because of a unit? That's everywhere, right? Now the most common version of the story is it was a Lander going to Mars, which is correct-- which it was an orbiter. It wasn't a Lander. And it was a unit's conversion between metric and imperial. And they were using feet instead of meters. So it was too close or something, and it hit. And often it's a length measurement. You were absolutely correct. It was actually the force on the aircraft, on the spacecraft, on its way to Mars. So as it was flying to Mars, you got this big gyroscopic, big flywheel thing, which is used for controlling the spacecraft in space. Because there's very, very little to push against in space. And so you got to bring your own thing to push against. And so you bring a big spinning wheel. But sometimes the wheel goes too fast. And you've got to have these angular momentum desaturation events, right, where you slow it down. You adjust it. But that slightly alters the trajectory of the spacecraft. And so over the course of all these corrections, you have to keep track of exactly what twists and force was applied to the spacecraft. And the contractor was in charge of doing that. And then they had to give the final results over to NASA so they knew exactly its final approach towards Mars. And this is where it went wrong. The contractor-- oh, by the way, it's often said that NASA got it wrong. No, NASA actually specified very clearly in all their documentation to the contractors that it had to be metric. NASA were totally metric. They wanted to be metric. They thought it was metric. It wasn't the other way around. The contractor, however, did it in-- because normally you do it in newtons or newton meters if you're doing torque. And they did it, I don't know-- in pounds per bushel or something. And they just fed the numbers in and it all went wrong. And here's a little-- this is my version of a famous graphic. This is the sort of AMDs, so the Angular Momentum Desaturation events, where they're adjusting the flywheel. And this was the actual path that it was coming in on, much bigger forces. Because they were using, effectively, it was a pounds-kilograms, ironically, kind of mistake. This is what they thought was happening. And they thought they would have 150 to 170 kilometers clearance from the surface. It actually came in about 57 kilometers off the surface. Mars hasn't got a whole lot in the way of atmosphere, but it's a non-zero amount of atmosphere. And it slowed it down quite dramatically, and then it crashed. So it was, like, half a billion US dollars' worth of spacecraft slammed into Mars because a units correction, that the contractor didn't follow the specification document given by NASA. Does anyone know the other spacecraft rocket maths mistake? Right over on the wall, in fact. AUDIENCE: Ariane 501? MATT PARKER: The Ariane 5, yes-- so the Ariane 5-- I have got it. I've got the video of the launch of the Ariane 5. This is the first ever launch in French Guiana. Now I've taken the sound off and everything. This is just the launch of the rocket. And I've never been to a rocket launch. But my wife does physics research. She does space physics research. She looks at magnetic fields in the atmosphere of the sun and all her observations come from spacecraft. And her colleagues actually had some of their spacecraft on the Ariane 5 when it was first being launched. The Cluster mission-- they had four spacecraft on there. But then, very unfortunately, it did this. No one's on there. There's no humans on that, right? It's just spacecraft, which still-- now I know a friend of mine-- I didn't realize this until later on. A friend of mine had just started her PhD. I know her because she's a friend of my wife's. She just got her PhD when this happened. And her PhD was going to be on the Cluster data. And she was there watching it with everyone else. And this happened. And the room went about that happy. And the room just went silent when it happened. And she was just thinking, there goes my PhD, right? And the bits rained down on the mangrove swamps in French Guiana. And they actually posted it back to them. So more detail than normal, but it's that kind of crowd. So my wife works at UCLA in the Mullard Space Science Laboratory. And so they actually design the instruments that go on the spacecraft there. And it's in an old, Victorian era mansion, out halfway between Guilford and [INAUDIBLE],, in the Surrey countryside. And they've converted a bunch of it in to clean rooms and engineering workshops. They literally make spacecraft in the old potting sheds. And it's phenomenal. So they make all this. And it takes so long to design and make these instruments and these detectors. And the cluster ones were going to be orbiting the Earth, tracking the Earth's magnetic field and how it responds to changes from the sun. And they spent ages on this instrumentation. And they got it launched. And then they weren't expecting to get it back. And it came back in a box, covered in bits of swamp. And there was, like, decades of people's lives were there. And what went wrong was an operant error. So the way this system worked was they had a bunch of sensors which were dotted around the spacecraft. They were all feeding into a thing called the inertial reference system, or the SRI for System Reference-- eh, it's ESA. And then that took all the raw data from the sensors, turned it into meaningful navigation or location data, and then pushed that off to the main processor. I know. For some of you, this is an excruciating amount of data that you don't need. You're, like, Matt, we know how sensors work. So the problem was they were given quite strict budgets on how much power and, effectively, computation they were allowed for all the different bits of spacecraft. And people working on the SRI were trying to keep their overheads in terms of energy use down. And they looked at all the sensors which were coming in. They had to turn them into 16-bit values before they were then sent off. And looked at all the instruments, and seven of them could give a 64-bit read out. OK. So we need to check everything from these seven sensors. And they went, well, hang on. What values are we actually going to get from them? And of the seven which could give a 64-bit number, three of them would never actually physically be able to record a value that big. And so they actually worked out they didn't have to check those before they put them into whatever the memory was. And so those three didn't have a check. The other four did have a check. And the whole system worked great on the Ariane 4. Then, without checking it properly, put the same stuff on the Ariane 5. And because it had a different flight trajectory and slightly different sensors, I believe-- don't quote me on that. I spent a long time reading through ESA official reports. Because of this, the sensor wasn't being checked. It gave a 64-bit value. It was copied into a 16-bit space. It caused an overflow error. And that crashed the SRI. Which, in and of itself, would have been OK. There are backups. Except when it crashes, it sends off an error message, like, the final-- I always describe error messages-- it's like the cliched, someone's oh, tell my spouse I love them. But it's, like, tell my debugger the following context relevant information. And so it did that. But no one had noticed it was going to send that at the same channel to the main processor or computer as it was sending its navigation data. That the system got it, thought it was navigation data. Thought the rocket had veered off to one side and tried to correct. But it wasn't veering, and the correct ironically, was the veer. And then it rightfully decided to self-destruct at that point, and rained down on the swamp. And so I get a little annoyed. Because everyone goes, oh, it was just an overflow error or maths error or programming thing. Actually, no-- the original code was very clever. It just hadn't been properly checked before it was put into the new system. And actually, that sensor didn't have to be on. It was actually a pre-launch. I think it was location or something or tilt sensor. And originally, the Ariane 4, they got really annoyed that, if they went to launch and they turned off the pre-launch stuff, it took a long time to reset everything if they didn't end up launching and they wanted to do it again. So they changed the code so it would continue running for 50 seconds after the initial launch in case it had to be restarted or it wasn't an actual launch that time. And it caused this error. It actually exploded 40 seconds into the launch. And so it didn't even have to be on, right? And so all these extra layers and details are what I find fascinating about what went wrong. And sure enough, in the common room at the Mullard Space Science Laboratory, where my wife and her colleagues have coffee, they have the bits of the spacecraft. They dusted off most of the bits of swamp. Apparently, you're not allowed to touch them because they've still got rocket fuel on it, which is something something carcinogenic. And they had them in a box as a reminder to future generations of space scientists that decades, like, their entire career, can go up. It could disappear in the blink of an eye because someone didn't double check some code. And they weren't insured. However, ESA decided to rebuild them and relaunch them. And there was a bit of discussion about should we? Because by then, technology has moved on. They're, like, should we upgrade them, or should we just rebuild them exactly the same? They decide to rebuild them exactly the same. And they launched them. They're working fine. They've been up there for years now. So ultimately, it was a successful mission. But all of that, wow, because there's a couple lines of code. OK. So Mars Orbitor, good guess-- the other answers maybe shorter. So any other guesses? What might have gone in the book? I got one on the side over there. We're going to go with person on the side. We got reluctant-- Let's get person on the side. Yeah? AUDIENCE: [INAUDIBLE]? MATT PARKER: Oh. OK. So I wasn't able to find out any details on this. There was a fly-by-wire aircraft which, correct me if I'm wrong, is the kind of aircraft where the controls are connected to what's actually happening. It's not like electronics. And they flipped at the equator. I don't-- that's not in there. I can't remember if I tried to fact check that or not. Has anyone else heard of that? We'll talk afterwards. What I have put in is the US-- I think it was Air Force-- had a bunch of F22s. And this is in the early, mid-2000s. The first time they flew from Hawaii to Japan that crossed the International Date Line and their navigation systems turned off. Genuinely happened, incredible-- they tried to restart them in the air. It's so good. But they couldn't. And so they always have this fueling aircraft with them-- because they couldn't navigate, but they could still fly-- they had to just limp back, following the refueling aircraft all the way back to Hawaii. That definitely happened. I found reports on that. I guess what I couldn't verify in that story is there were rumors that they were in the aircraft, and they heard the Microsoft Windows startup noise. Cannot verify that. That would be so good-- no way. And I managed to verify there was a US aircraft carrier, a massive warship, which was cut adrift without any power because one of its systems divided by zero. Mwah. Mwah. Any other guesses what's in the-- OK, you, second row. AUDIENCE: I think it was the Patriot missile [INAUDIBLE]?? MATT PARKER: Oh, yes. So the Patriot missile-- this was a missile defense system which was to stop SCUD missiles in the first of n Iraq wars. And it had an issue where it was keeping track of time. I forget the interval, something like milliseconds in a certain space. And the longer it was on, the less precise its time. Therefore, location calculations [INAUDIBLE].. And that's particularly horrific, because people died in that case. But they'd already told them it was a problem. They just hadn't done the restart often enough. And there was already an updated version of the software. It arrived days later at the camp. So yes, that's a tough one. Because in so many of these stories, they end, and then everybody died. Because in engineering and medicine, and anything with a military application, that is so. And because I've promised Penguin a comedy book about maths, I couldn't have every second story-- and then everybody died. This collapsed, everyone died. This happened. Guess what? So I've tried to be careful and strategic with what I put-- because it is important. Because if these maths things go wrong, people do die. But I've tried to be careful how and when I put them in and how many examples I use like this. Actually, all the aviation stories in my book, nobody dies. And that's partly because aviation is phenomenal in terms of how they deal with mistakes and how they avoid disasters. Obviously, it does still go wrong. I was really annoyed. The Ethiopian report into the Boeing 737 was supposed to come out on Monday, yesterday. And they've delayed its release. And everyone keeps asking. Because obviously I've got a book about maths mistakes with a plane on the cover. And I'm doing media interviews. And I'm, like, I just don't know, right? There's a lot of rumors and reports and pilot's testimony and stuff about the autopilot, I think, in piloting speak, that's the up and down flapping movement of the plane. And something is going wrong there. But I don't know the details. I'm waiting for that report to come out so I can read it. But I was very careful to only put in ones where nobody died. And then likewise, there was one, again, kind of roll over errors. I didn't mean to do entirely roll over errors, but I think they were fascinating. And obviously, a lot of people here are well aware of the limitations of binary and coding and roll over errors. But to the general public, it's just fascinating that you've just not left enough room to write down a big enough number. Right? And obviously, the millennium bug is a great example. We only used two digits, and then the year got bigger than that. And obviously, there's a bit about Unix time and the Y2K 38, crash harder, the sequel is coming up. And I found-- this is great. I did not know this. In Switzerland, trains are not allowed to have 256 axles. How great is that? A train must not have an effective total number of axles equal to 256. Because they use axle counting detectors. And they roll over once they hit 256. And so if a train has exactly 256 axles, it would count it as zero, and it would move around as a phantom train on the network. And I mean, I've seen hardware problems fixed in software. There's that before. I've never seen a hardware problem fixed in bureaucracy. That's such-- such a Switzerland solution to the problem. And again, I found many cool machines which had the same roll over error. One machine used for radiation had a bunch of checks to make sure it wasn't going to overdose. Because it could do electrons or x-rays. And if it had the wrong setting, it could have a horrific overdose of radiation. And the check-- they had a thing called check call to check if the columnar was in place. And check call, if it was non-zero, it wouldn't run the machine. And every time it does the check, if it wasn't in the right place, it would increment check call. Except that every one in 256 times, it would over roll to zero. And if the person hit go right then, and it wasn't safe, and it happened to be rolling over then, it would still turn on despite the fact that checks hadn't been done and the things were in place and people died. Right? Because of this-- it's just terrifying. So I tried to balance that with, hey, funny story about trains, people die, and Pac-Man! So this-- oh, I've got-- I shouldn't have converted this to widescreen without looking at it closely. Fixed, I reckon I could have done that, and if I hadn't been talking out loud, no one would have noticed. OK. So this is the final level of Pac-Man. People are often vaguely aware that the 256th level of Pac-Man crashes. This is what it looks like. This is actually me playing the level, because I know how to cheat using an emulator. And when you hit this level, the left is what you expect. This is the classic arcade version of Pac-Man. The left is what you expect, and the right is just this mess. As it's often said that you hit the 256th level, and that number is too big to fit in your 8-bit of memory. And so it overflows and everything crashes. And that's actually not what happens. So I dug through this. People have gone through. And there has been a project to comment the original-- whatever it is, machine, I don't know, whatever code this was written in. People try and comment it and look at it. And people, in fact, have released a patch that fixes this problem now-- oh, nerds! And if you dig through what happened, it's not the level. Right? Because 256-- I mean, programmers know how to index from zero. Please. Right? So the first level 1 is indexed as 0. Level 2 is indexed as 1. So when you get to level 256, it's indexed as 255. It's fine. That does not cause any problems. The problem is when it tries to draw the pieces of fruit at the bottom of the screen. And in Pac-Man, they're generally called fruit. But there's keys that he eats and all sorts of other objects. And the idea is there's a different one for each level. And for no reason other than decoration, they decided to display, at the bottom of the screen, the pieces of fruit from the recent levels the player had played. Few people play more than one level, so no one really ever notices. But they show up to, I think, it's seven or eight of the last levels that you've gone through. And the way that it prints them is in the memory. They've stored the table of fruits and the graphics for each one. And first of all, it checks if there have been-- actually, I'm going to bring in my pseudocode. Oh, OK. So the first step is-- this is a paraphrase this-- the first step is, is it level 7 or lower? Because it is level 7 or lower, then it only needs to print as many pieces of fruit as the current level number. If it's greater than 7, it'll only go up to the most recent, 8. Let's say 7 or 8. And so what happened was it would take the index of the level, increment it by one to get the actual level number-- this is where it went wrong-- so 255. That becomes zero. It does a quick check to go, oh, is that below or above seven? Zero is below seven. But then what it did was to print anything from below seven. So instead of just doing the most recent eight, what it would do is, first of all, draw a piece of fruit. Then let's not check now. Let's first of all subtract one from the level number, then let's check if it's zero and stop, then otherwise keep on fruiting. And so it would print a bit of fruit. Subtract one. Go back down to 255. That's not 0. Keep on fruiting. And so it was this weird-- it was just hovering above and below zero at just the wrong times. It tries to print 255, 56, eh, off by one, one of the two pieces of fruit and the rest of it. So it starts printing fruit. And because of the way the coordinates work, it prints across a couple times. And then it starts top left and just runs down until it thinks it's done enough fruit. And this is just the rest of the stuff in the memory being interpreted. It looks like it finds with where the characters are stored. It's just whatever else is in the memory, splashed onto the screen. And the levels don't finish when Pac-Man has eaten all the dots. The levels know how many dots there should be, and they finish when Pac-Man has eaten that many numbers of dots. And because it doesn't print them all, because they've been obliterated by the fruit, it's impossible to go on to the next level. And that's why it crashes. In the original version, you would loop back to one. And you would just continue playing forever. This is actually preferable, in my humble opinion. And so that's it. So you can check out the online project to fix it, which I think is incredible. And I did play it myself once. I've been meaning to learn to play it properly to get there legitimately. But I just used the emulator and I got there. And it was kind of fun. So again, another fun example of a roll over error. So you know what? Let's do one more guess. And then I'll go into Q&A. So we'll do-- any other guesses what I might have put in the book, any other classic stories? Very hesitant person in the middle here-- AUDIENCE: I think I remember a story about Royal Navy guns being inaccurate in the Southern Hemisphere because they did the Coriolis effect wrong. MATT PARKER: Oh. That's a good one! That rings a tiny bell. That's not in the book. And so if you missed it. It's Royal Navy guns being inaccurate in the Southern Hemisphere because the Coriolis effect is going to bump them off into the other direction. And too late-- the thing is now-- because in the book, I didn't want to make the book just be a bunch of stories people could find on Wikipedia. I liked the fact I got the common, famous stories and properly fact checked and researched them and put them in there. So now it's on the public record what actually happened in a bunch of these situations. And then some of them were people I knew or had worked with or contacts or anonymous. I wanted to have extra stuff that's in there which were new stories that weren't out before. And so people I know, friends of mine who were engineers and developers and database people and occupations I'm not allowed to reveal, would give me these stories. And I would put them in either anonymously, or carefully, as the case may be. And so I was quite happy to add new ones. But now the book is out, loads of people are contacting me with more great stories. And I'm, ah, I should keep a list and just write a lazy sequel. No. But I haven't come across that. The only thing I have done is-- you know there's the classic, the water goes the different way down the plug on the toilet thing, right? And it's not true. It's not true. The best you can do if you actually imagine a sink, which is, like, a meter in radius, like, a two meter diameter sink. And you fill it with water. And you let the water totally settle so there's no movement whatsoever. And then you very carefully release-- you can't just pull the plug out, because that's too much movement. If you release some kind of valve or something at the bottom, and let it drain over the course of hours, you will get different rotations in that situation in the different hemispheres. And people have done that experiment. Smarter Every Day, YouTube channel Destin did it with Veritasium with Derek. And so they filmed the same set up in different hemispheres, brilliant. And I was, like, wow, hang on. But what about in a sink? Will it work in an actual working environment? And so I got a sink. I took it to London so I could film me at the front of the Houses of Parliament. So I'm definitely in London. And I fill the sink with a bowl of water. And I drain it. And I had a plumbing thing set up into a bucket. You know, I put a lot of effort to make it look super suspicious. And no one told me to stop. There you go. And so I filled this thing and emptied it loads of times, to where it was a mix of both directions. It depends what the water is doing. I even tried-- I had a thing to try and pacify the water, like dividers, to stop it from moving. But any movement, it goes different ways. I then got the same sink, put it in a suitcase, flew it to the Southern Hemisphere, did the same thing in Sydney. And so I got a split screen of me with the same sink in both hemispheres. And it goes in different directions all the time, right? There's no consistency. But I imagine, yeah, it would make a difference launching-- firing something like a trajectory of that kind of scale would make a difference. OK. So I am going to take some questions in a second. They don't have to be guessing what's in the book. It's not just me crowd sourcing the sequel. They can be questions of anything I do or bits of maths or other stories and the rest. I'm going to put my slide back up here. So that's kind of what I covered. There's the book. I think about people already got it. I'll be around and defacing them afterwards. I am fluent in ASCII, so I'm happy to encode your name. Most people get very upset about the URL being wwwh.umble-pi.com. People here are, like, yeah, you're jerking your subdomains. There you go. I thought I was so funny when I got that working. Penguin less so, because they noticed if you go to umble-pi.com, it doesn't work. And I was, like, yes, people have to earn it. Matt, you have misunderstood marketing. So that's that. If you've not come across anything I've done, as I've mentioned before, I do Numberphile channel, which is great fun. I imagine a lot of people have come across those videos. In fact, the most recent video on Numberphile was filmed in this building, the one that I did. So I always wanted to do-- channels do live coding, which I love on YouTube. And often, in videos, I will say, I found this number by-- I coded a thing up. And I found it. I did this, right? And I'm amateur to terrible level Python coding. And so live, I wrote a little bit of Python-- still in version 2. That got a lot of comments. And so never code live on the internet. It's a terrible idea. People have opinions, it turns out. And so the video went out. And it shows me doing the live coding. Like, for people who've never done it, and I keep saying, I wrote a program to do this-- what that actually entails. And so I quite enjoyed it. But we filmed that. Brady and I just happened to have some time before a YouTube event. And so we're in a dark corner, literally, it's the dark corner in the basement somewhere that just went out. So check out Numberphile. Stand Up Maths is my other channel. That's just me. And I put Patreon on there, as well, because why not? Because they're all crowdfunded, basically. So my stand up maths videos-- what I'm saying is Aunty Adsense doesn't give me enough pocket money. And so on Patreon, people contribute. And I do ridiculous things filming mass videos with that. So if you want to check out anything more about what I'm doing, there are links. I will wrap up the official part of today's proceedings there. And we'll move on to any other business. Let's punctuate this with around of applause, and then we'll do questions. That's the end of my talk, [INAUDIBLE].. [APPLAUSE] Oh! How genuine-- so how-- [INAUDIBLE] got the mic. How are we going to do questions? SPEAKER 1: Yes. I just wanted to ask you to go to the middle, to the microphone, so we can hear you when you ask the questions. MATT PARKER: Oh, yeah, so we've got a mic on the stand right in the middle. So if you wish to ask me a question, to there's a certain amount of public awkwardness involved. So you have to walk over to the mic there. If I was playing a game of are they leaving, or are they asking a question? AUDIENCE: Yeah, thanks for the talk. There was a story of some scientists that tried to give cocaine to elephants as a part of an experiment. And they messed up the scaling. They scaled it by the mass instead of scaling by the radius. And turns out the volume grows with a cube of the radius. But what they needed for the dosage was the surface area of the organs, which grows with the square. And so they massively-- I mean, they killed an elephant with cocaine. MATT PARKER: I mean, what I love about your question-- and there is a lot to choose from-- is that you said, you know, there were scientists who were giving an elephant cocaine. That's not even it. That's just the start to my favorite bit. And they did it based on the cube of the radius, as if we're all, like, well, we all know how to dose an elephant. Those amateurs! No. Thank you. It's a great story everyone can connect with in their normal lives. No. I hadn't come across that. That's amazing, right? So I don't know. Drug dose-- I guess they don't necessarily scale with body mass, do they? And so they did it with mass. And it's actually area. That's lovely. Ah. Can someone write these down? I hadn't come across that. That's great. I have nothing more to add, other than I will be looking that up afterwards from a browser in private settings. OK. Any other questions-- one elephant's worth of cocaine, please. Oh, here we go. The individual in the Parker Square t-shirts. That's going to be-- AUDIENCE: [INAUDIBLE]. MATT PARKER: Is that unrelated? It is what you normally wear to work? Or is-- AUDIENCE: Yeah. MATT PARKER: Oh, really. Just threw it? You didn't even think. You just threw it on this morning. AUDIENCE: Thank you for the talk. My question would be, have you ever considered making another channel with maybe more advanced features? And another question I have are you aware of Three Blue, One Brown? MATT PARKER: Yes. So great, great-- two questions for the price of one. You may sit down now. So OK. First of all, to deal with the [INAUDIBLE] question, the t-shirt, which I've made a couple references to-- I did a video ages ago about how no one has ever found a magic square, a three-by-three magic square, so that's nine numbers in a three-by-three grid, where every single column and row and both the main diagonals all add to the same total, such that all the numbers in the magic square are themselves square numbers. No one's ever found that-- with certain extra constraints, like, all the numbers have to be different, and a few other things. Right? So I found one which is close, but not quite. I gave it a go. Same story-- I gave it a go. I wrote some code. I did a bit of a search. I found the best one I could. And I knew people have checked them up to some crazy threshold. So I knew I wasn't going to discover the whole solution. I wanted to see how well I could do, as a fun thing to talk about. As I made the video, and I showed this square in the video on Numberphile. And then the guy making it, Brady, behind the camera, just went, it's not very good, is it? And I was, like, what? This is my best effort. He's, like, nah. He's, like, what's it called? And I said I am not going to call it the Parker Square. Because then you'll be ha, ha, ha, that classic Parker Square it'll become-- and so he's, like, OK, fine, fine, fine. I won't make a big deal out of it. And then he released a range of t-shirts and named the video the Parker Square. Now it's become this mascot for when your best is not just good enough, right? But I like it, because I've tried to repurpose it to be give it a go, right? So much in maths is you try something, and people think maths are all about getting the correct answer. You try something, and it's important you get the right answer. But it's not. You give it a go and you're wrong. You go, oh, OK. And you try again, and you're less wrong. Yeah? And you try again, you're more wrong. And then eventually, hopefully, you converge in on getting it right. And so I like the fact that it's all about giving it a go. I'm going to answer your second question simultaneously. So have I considered doing more advanced mathematics? And am I aware of Three Blue, One Brown? Which is-- I do, yes, great channel. And so it's difficult how you pitch a YouTube channel about particularly technical subjects. And you're going to get slightly different audiences depending on what you do. Numberphile we pitched higher than anyone else thought was smart. And it's because it was the part of the original-- back in 2011, it was a part of the early Google funded channels, when Google was, like, TV is dead. And so we had a little freedom when we first set it up. And partly because of the people Brady chose to work with and partly deliberately, we pitched it higher than most people would expect, and it worked. People liked seeing mathematicians nerding out on their favorite numbers and doing actual working out. But since then, now it seems quite tame in comparison. And now, a lot of people who were into it when they were younger have now gone on to become mathematicians. I've met people now are, like, oh, I finished my PhD. And I remember watching your videos when I was in high school. And I'm like, oh. Now I feel old. And so it's kind of stayed around that level. Stand Up Maths-- I like to do two things. I occasionally like to have quite heavy content in the videos, but not often, to be fair. In fact, I'm due one which is a bit more pure, or interesting, or more advanced mathematics. I tend to go for one of two things. I tend to go for accessible things I think will-- while being enjoyable for nerds-- will help draw in new people. I'm much more of an evangelical channel than a teaching channel. And secondly, I try and do things which people of a nerdy persuasion will just find delightful. And that's because I'm largely making the videos to entertain myself. And a bit like we do on Numberphile when we printed out over a mile of pi, and we had the first million digits on one continuous piece of paper on a runway at an airport, it's just ridiculous. But it was great. And recently, someone-- I did a video which was a little bit more in depth, but we didn't go into any of the technical details, about things called superpermutations. Which I won't go into here. They're a very long list of symbols that contain all the possible permutations of the symbols in there and every single permutation's in there somewhere. And how short can you find the permutation is kind of the challenge. And there's a lot of open questions in superpermutations. And I did a video about it. And someone pasted a new breakthrough, like a new, shorter superpermutation for seven symbols. It's like 5,907 symbols long. They just pasted it in as a YouTube comment. Like, no fanfare, just here it is, boom. And I'm, like, wow! So new mathematics happened in the comment section of my video. But then, based on those breakthroughs, because there were people working on it, got in touch with the person who did it. And they had a bit of a chat. And some other stuff they were working on kind of meshed up. And they found one even shorter. They had another breakthrough. And we're, like, well, how are we going to announce this? And then we realized, basically, this one was one shorter. So it was 5,706 symbols. But there's only seven different symbols. And we're, like, well, an octave on a piano has seven notes, right? Eh, music-- and so we hired a self-playing piano. And the first ever announcement of this mathematical result was played on a grand piano. And I was, like, that's just fun. Like why? And if you support me on Patreon, that's how I waste your money. And so I'm just trying do fun things to enrich nerd culture, I think, is the shortest way to put it. Channels like Three Blue One Brown I'm super envious of. Because they guy, Grant runs Three Blue One Brown, he's a fantastic individual And maths YouTuber community is super friendly and nice, right? And so I know Grant reasonably well. He's a great guy. And we chat and nerd out on mathematics. And one day we'll actually both do a collaboration we keep talking about. But he's incredible at animating advanced mathematical causes. I'm super envious that he can take these more advanced things I would like to do and he can actually make them happen. And I struggle. His visualizations are incredible, and my visuals are adequate. That's my career. And I do so many different things that I don't have as much time. I can't justify too much time, because I make a loss on my channel, as it stands. I can't justify too much time. I throw a lot of time at it, don't get me wrong. Right? But doing difficult advanced maths well, so it's still engaging-- and there are other channels like Red Pen, Black Pen, and obviously, Khan Academy, and these other channels who are doing more advanced maths in much more of a lecturing style. They're great, and they kind of already feel that niche. So I stay at the low hanging, entertaining fruit-- the most concise description of my job I've ever made. We'll do one more question, and then I'll loiter around afterwards to say hi and deface books. Oh, we're forming a queue. AUDIENCE: Sorry. Were you in the queue? MATT PARKER: No, you got there first. AUDIENCE: OK. MATT PARKER: We'll hear both of them, and we'll vote. AUDIENCE: So in this company, as you may know, we have quite a strong postmortem culture. So when stuff goes wrong, we write postmortems with the main goal to learn from them and not repeat mistakes. Entertainment value is kind of secondary. And given that you've spent quite a lot of time, apparently, to look into some of these things that went wrong, did you find a commonality? What's kind of the big learning to take from those, other than don't do this? MATT PARKER: That's a really good question. And do the postmortems done at Google ever get made public, or are they entirely internal, locks down? Sometimes? OK. It's interesting. It's interesting how much things [INAUDIBLE].. So I've got two answers, which are I'll try and do pretty swiftly. One answer is it's interesting which industries do and don't make their postmortems public. And so there's a sampling bias that I have of the ones I'm able to see. And I know of ones that have happened in other industries. But I cannot put them in the book, because I only know about them because I know the people involved. And there is no way they can release them. And I talk about a friend of mine-- let me think about how vague I have to be. They worked on a project which was a thing. And there was a trivial mistake, which slightly changed it aesthetically. And I was, like, this is such a good example. Because the maths mistake is lovely. The result is lovely and funny, but not important. And nothing is actually compromised. And it's a contemporary one, and no one died, and all the things I look for in just my life. And I was like, hey, can I put the story in that you told me that time in the pub? And they were, like, no way. They're still under so many NDAs that they cannot disclose what happened. And so it'll often feel like, when you're reading my book, lots of the examples come from the military or government or things that were quite obvious. So actually, you have a lot of engineering ones where either it was an organization who have some duty to the public to release a certain level of report into what happened, or it was so big and so obvious that a report had to come out. And so I've kind of got a problem where I only get a lot of the public ones I can talk about. In terms of what I've actually learned, what I found amazing is the different attitude between different industries to blaming the human. And in aviation, they don't blame the human. In medicine, they blame the human. And there are loads of others in both categories, right? But they're just my two favorites. And aviation are great at looking at the system as a whole and why the mistakes became disasters. And there's the Swiss cheese model of accident prevention. People have come across this, which is where you imagine your mistakes as being projectiles, and they're going through a bunch of layers of Swiss cheese. And each layer is like a different part or component of the system. And each one is meant to stop mistakes. And so ideally, the mistake will hit one of these. But occasionally, the holes line up, and a mistake will make it all the way through the entire system and become a disaster. And aviation is big on and this [INAUDIBLE].. I don't think that came out of aviation. It was actually research from the UK that came out with that. But it's a big one for aviation, the Swiss cheese model. And it's the system as a whole. Whereas in medicine, if you give someone the wrong dose of a certain drug, if you're, I think, as a pharmacist or something, that's actually illegal. And so that's not encouraging people to discuss when it's gone wrong if you make the mistake and you're arrested, or fired, or all these things. And so you get this false sense of the only people left in medicine are the people who never made mistakes. And that's not good for teaching the next generation. It's not good for developing systems that deal with it. And so I think that is fascinating. And then there's a whole other category of when the safety features you put in place cause a new type of mistake. And there's some great researchers, a group called ChiMed, who are based at Queen Mary University of London, where I used to work. It's a great place. And they looked at the hot cheese model, where they imagined horizontal slices of cheese, which occasionally, the pieces of cheese themselves might drip and cause extra mistakes. And in medicine, they found if they bring in a new system of barcodes-- so you've got to scan the patient's barcode and scan the medication barcode to stop mistakes when they get the wrong medication. They discovered when it was actually implemented staff would just get duplicate barcodes and stick them on their clipboard to scan patients, because it's quicker. Or they'll have a bunch up in the storeroom. And so there were new ways of giving the wrong medicine now, because of a system to stop people from giving the wrong medicine. It's just fascinating. So blaming the individual versus looking at the system and also the intricacies of the system I find fascinating. I don't know how much that meshes up with what happens here at generic tech company, but that's just how anonymous I can make your stories if you see me afterwards. So we'll wrap up there. I will be around. I would love to talk and chat for a bit, if people want to come and tell me stories. Or I'll sign your books, et cetera. Is there any more official business to be done? We're done. At which point, I thank you so much for having me along, it's always a treat, I'm done. [APPLAUSE]
Info
Channel: Talks at Google
Views: 370,525
Rating: 4.7953348 out of 5
Keywords:
Id: 34detVy-Hiw
Channel Id: undefined
Length: 58min 41sec (3521 seconds)
Published: Mon Apr 22 2019
Reddit Comments

Kinda strange to write a book about "math mistakes" and present nothing but programming mistakes. I would've expected Frege's inconsistent foudations of arithmetic to be more exemplary.

πŸ‘οΈŽ︎ 20 πŸ‘€οΈŽ︎ u/SOberhoff πŸ“…οΈŽ︎ Apr 23 2019 πŸ—«︎ replies

Summary:

  • 6:36: Graphic designs containing gears combined in such a way that they cannot move.
  • 12:00: Illustrations of the night sky where you can see stars through the unlit part of the Moon.
  • 16:33: Lockheed Martin using the wrong units when reporting values for the trajectory of the Mars Climate Orbiter, which thereby was lost.
  • 22:01: Software on the Ariane 5 had an overflow when reading a sensor value into a data type that was too small. The software had originally been developed for the Ariane 4, and was not ready for the different range of possible sensor values on the new rocket, which had to self-destruct shortly after lift-off.
  • 27:09: F-22s flying across the date line, causing their navigation systems to turn off.
  • 28:04: Aircraft carrier drifting without power due to a division by zero.
  • 28:26: Patriot missile keeping time in a floating-point variable, thus losing accuracy over time, as the value increases. (However, Wikipedia says that the problem was how a conversion from fixed-point to floating-point was done.)
  • 31:09: Due to roll-over in an 8-bit axle counter, Swiss trains must not have exactly 256 axles, as it would count as zero, rendering the train invisible to the system.
  • 32:00: A medical radiation machine (Therac-25?) increased a counter every time it checked for, but did not find, a collimator being installed. After every 256 failed checks, it rolled over to zero and could be started, even though it was unsafe.
  • 33:03: Pacman crashes on level 256 due to an overflow.
  • 43:49: Story from audience member: For an experiment with cocaine in elephants, the dose was calculated based on the volume of the animal, instead of the surface area of the organs (which apparently was the relevant scaling).
πŸ‘οΈŽ︎ 17 πŸ‘€οΈŽ︎ u/Bromskloss πŸ“…οΈŽ︎ Apr 23 2019 πŸ—«︎ replies

Anybody else remember the alt.risks newsgroup?

EDIT: should have said "comp.risks."

πŸ‘οΈŽ︎ 2 πŸ‘€οΈŽ︎ u/nealeyoung πŸ“…οΈŽ︎ Apr 23 2019 πŸ—«︎ replies

Matt Parker of South Park fame, right?

πŸ‘οΈŽ︎ 2 πŸ‘€οΈŽ︎ u/grosses-baerchen πŸ“…οΈŽ︎ Apr 22 2019 πŸ—«︎ replies

I actually had the pleasure of seeing him give this very same bit live. Loved every minute of it. He has such an enthusiastic and magnetic personality.

πŸ‘οΈŽ︎ 1 πŸ‘€οΈŽ︎ u/crazy_celt πŸ“…οΈŽ︎ Apr 24 2019 πŸ—«︎ replies
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.