 All right. Well, I can say one thing, Star Trek sells and the price was right, I suppose So thank you all for coming. I hope for many of you This might be your first time here, but I hope it won't be your last time We're delighted to have you here. We run these programs the first Wednesday of every month courtesy of the Simons Foundation So our thanks go out to them. I'd like to Introduce to you the person who will be our introducer tonight. Let me give you Connor Trinear Thank you. Thank you Welcome ladies and gentlemen teens and tweens and boys and girls and Humans and humanoids And a Trek talk. I think we bought a cover all the bases. So my name is Connor Trinear I played Charles Triptucker the third on Star Trek Enterprise. I was the chief engineer And it's a real honor for me to be here at the Museum of Math and to introduce James Grime and the in the math of Khan The connection between math and Trek is many and varied and you may not know this But you're going to be hearing things for the first time as am I they didn't tell us anything Which is probably a good thing because most actors will tell you that one of the reasons they're an actor is because terrible at math So Us actors being the storytellers We weren't given really any information and for example My very first day on the show in engineering. We walked into engineering. It's the crowning jewel. I think of the sets Dr. Fox might say something else regarding sickbay, but he's not here So we walk in I Enter the executive producers enter the producers craft service people from the kitchen everybody is there To show off the the engineering room So as we stand there Michael and Denise Okuta walk in They wrote the Bible of Trek which was the manual for how all of it was supposed to work and as they're detailing What this panel does where the information goes for this thing? How the warp core works and it goes through this and that and the other thing and out through the nacelles and yada yada yada yada I am literally I've got cement shoes and I'm transfixed because all I'm doing is I'm staring at the warp core And I'm totally intimidated by it So as they carry on with their speech It became pretty clear. I think to our lighting designer Billy Pete's that Something was going on with me So they end the tour. I'm about to start my first day and Billy says Connor kid Come here We walk around the warp core And he pops open the hatch Take a look inside and inside is a big wooden disc holes cut out of it Color gels in it one light on one side and one light on the other I look out and I say wait Is that it? That's that's the whole thing and he goes That's your warp core Kid none of it works That's our job. So just relax and you'll be fine another example of this is so We used phase pistols. The other shows called them phasers, but for some reason we had to call them phase pistols because we were first so Very first day of using phase pistols still in the in the pilot episode So as any kid who's been given a toy gun There are certain ways to manage it and play the game So we're having this big firefight with the Sula Bonn. I'm main enemy And I've got my face pistol in my hand and I'm hiding behind a bulkhead that's not unlike this right now And it's my turn and it's they're gonna do the whole hero shot on me and action and I I turn out They go cut cut Connor yeah You don't need to make the sound of the face I was like, what do you mean? Yeah, you're making you don't need to go I was like, oh My bad. Sorry. Can we do it again? Yeah, we're gonna do it again Connor Action Cut cut. I'm sorry. I'm so sorry you guys. I'll never do it again and I didn't But for the rest of the show for the rest of the series in my inside voice. I was going The last one I'll tell you is the monitors that we had on the show we had hundreds of monitors Different screens look a lot like those back there And any time we were up there it looked as though we were Pushing on it and something else would show up or it be minimized or advanced or what have you? Well, they didn't work There was a wizard behind the curtain named Ben Betts who had a an office at the corner of the soundstage and He had what the camera saw on a monitor and a little clicker and Every time we touched something he and we looked very impressive and very professional But we never did any of the work. It was always done for us. It was always done in post as they say in post production Well on that note One more thing before I introduce James Have you seen his YouTube channels? Yeah, not enough of you believe me go to singing banana. That's one of them and Numberphile he is so charming you're gonna find this out so smart and so spot-on and he really brings it home to you What he's talking about with math? So on that note, I'd like to give it over to James Grime Okay, we'll get started all right. I'm gonna stop by saying hello to everyone first of all hi everyone Hi, nice to meet you. Hi. Let me introduce myself. My name is James I've just beamed in from England as you can tell and I'm here to talk about the maths of Star Trek so the first question that you might be asking is why Why the maths of Star Trek or even why the Star Trek of maths and the reason is because I'm cool Okay, this this is a picture me trying to work out what I would look like if I was evil And Star Trek is cool. So let's see what we've got here. So who who's here for the maths? Who's here for the maths? So we got like some here. We got like a half of you. Who's here for the Star Trek? Yes, the other half exactly. That's like 5050. That's pretty nice So we got half you here for the Star Trek half you here for the math So yeah, Star Trek is cool Especially now you've got these new films with these young beautiful people and their funky trendy lens flares But Star Trek always was cool even going back to the beginning 50 years ago with the original Crew the original series. So for the people who don't know what Star Trek is So Star Trek is essentially you've got the Starship Enterprise. It's like a Navy ship So it's a Navy ship in space. You're seeking out new life new civilizations The captain of the ship is James Kirk there in the center James Kirk He's the captain on the left here is his science officer. This is mr. Spock. That's the side Cheer with one person just one person James mr. Spock So fan favorite mr. Spock science officer. He's a Vulcan. He's an alien So Vulcans have no emotions like all scientists On the other side here, we have dr. McCoy dr. McCoy No tears for dr. McCoy not as popular as he used to be dr. McCoy is human. He's very passionate He's very human and episodes tend to be centered around some sort of moral choice There's usually some sort of moral choice captain Kirk gets advice from mr. Spock the science officer He gets advice from dr. McCoy and he has to come up with some sort of moral decision But Star Trek, you know amazing show and predicted a lot of futuristic technology as well things like warp speed going well going faster than light Transporters so beaming you from one place to another teleporting you and things like green alien space babes And all these things have been discussed in great detail in the past by scientists and by nerds especially the green alien space babes To which I say boring right fine. This has been done right dammit. I'm a mathematician not a physicist so I'm not interested in this stuff right. This is all science fiction stuff I might as well be magic as far as I'm concerned, but in something like Star Trek You don't really have maths fiction so any maths that appears in the show Should be on firmer ground right at least it is something that we can check Right, or as mr. Spock says in this clip Even in this corner of the galaxy captain 2 plus 2 equals 4 Even in this corner of the galaxy 2 plus 2 Equals 4 so there were some mathematical questions that did come up on the original series So these are the things I want to talk about but for I'm going to be talking about what is the probability that we are alone in The galaxy I want to talk about the mathematics of biology so that might be alien biology But sometimes biology here on earth as well. I might be talking about the liars paradox This is a paradox where it's confused 23rd century androids and 20th century mathematicians as well and the most important question of all Does the color of your shirt affects your chance of survival? Now just to warn you in case you're disappointed some things I'm not going to be talking about tonight. I won't be talking about the Star Trek films I won't be talking about Star Trek films. I won't be talking about the 90s Star Trek the next generation and those series. I'm going to keep this pure old school pure 1960s awesomeness All right. Yes So let's start with our first question and the most important question of all then Which is your probability of survival? Otherwise known as the red shirt question So does the color of your shirt affect your chance of survival? You see when you're traveling in space, you're visiting these strange planets these strange new worlds. It's dangerous work People died and when people died that was usually followed by dr. McCoy's following diagnosis McCoy Dad Jim. He's dead. He's dead doctor. He's dead. Yeah, it's dead. He's dead captain You'll die Jim. It's dead. It's dead Jim. Dad. The man is dead. He's dead. He's dead He's dead, sir. She's dead Jim. He's dead Jim. He's dead Jim. That man's dead back there. She's dead He's dead. Must be dead. It was worse than dead His brain has gone His brain has gone. Oh my god So here are a few of my favorite deaths from Star Trek So there was green he died when all the salt was removed from his body Matthews he he died. He was pushed off a cliff. He was actually pushed off a cliff by a homicidal Android You have to look out for those There was Galway. She died after rapid aging due to exposure to radiation There was Hendoor cupcake. He died after being poisoned by a pod plant and there was Kelso He died after being strangled by a crew member game godlike powers of ESP Just another day on the Starship Enterprise So it is important to know Your chances of survival if you were captain, you need to know how dangerous this situation is So what's coming up next is a little clip of mr. Spark Performing such a calculation Mr. Spark you are second in command. This will be a dangerous hunt Either one of us by himself is expendable both of us are not Captain there are approximately 100 of us engaged in this search against one creature The odds against you and I both being killed are 2200 28.7 to 1 2200 and 28.7 to 1 Those are pretty good odds mr. Spark and they are of course accurate kept of course Well, I hate to use the word but logically with those kind of odds You might as well stay But please stay out of trouble mr. Spark That is always my intention captain So there's mr. Spark working out the calculation calculating the odds of survival You can tell it's an accurate calculation because he gave the answer to one decimal place Which is always a good sign of an accurate calculation So Star Trek fans began to notice a pattern when they're watching the show when they were watching the show They started to notice it seemed to be like the red shirts were the ones that died now is this true now to find out If this is true We would have to tally up all the deaths in Star Trek and work out what shirt they were wearing actually Now you don't need to tally what you need is a pie chart So we're gonna get a pie chart up here on the screen. Okay, so the red shirts This is engineering or a security. There were 59 deaths in Star Trek They're 59 deaths 16 of them. We didn't see 16 were off-screen. They were a space plague and other things like that So of the 25 deaths we saw of red shirts that we saw 43 so 25 out of 43 that is 58% of the deaths we saw where red shirts if you compare that to the gold shirts 10 gold shirts died only 10 10 out of the 43 deaths we saw that's 23% and with the blue shirts that was 19% 8 out of the 43 So it does appear that it's very dangerous to be a red shirt But this is wrong All right, this is why the Star Trek fans believe the red shirts are the most likely to die But this is in fact the probability you are red shirt if you die What we want to know something different. We want to know the probability you die If you are a red shirt, it sounds similar, but it's subtly different That's what we want to know if you want to know the probability you die if you are red shirts We need to know how many red shirts there are on the ship to begin with and to do that You need to do something very nerdy. You need to look at the technical manuals, which is what I did But I do like the way that this says authentic blueprints down here. It's authentic blueprints So if you do that, let's look at how many red shirts that are on the ship. In fact, there was loads There were 239 red shirts on the ship 25 out of 239 died, right? Which is about 10 percent if you compare that with the gold shirts There's only 55 gold shirts on the ship. So 10 out of 55 died That is 18 percent You are more likely to die if you are a gold shirt than if you are a red shirt now this Idea does have real-life applications. So this idea when you're kind of mixing up the conditions that you're looking at when you're doing these Probabilities this does have a name. It's called the prosecutor's fallacy And this does appear in real life and in peers in court cases. Hence the name One famous example when this appeared was in the court case of O.J. Simpson Now we have some young people in the audience. So I might have to explain who O.J. Simpson is If you don't know O.J. Simpson was a football player. He was very famous He was a football player He was a movie star and he was arrested for the murder of his ex-wife and they found blood at the scene of the crime and The probability and O.J. Simpson's blood type did match the blood they found at the scene of the crime The probability of a match was one in four hundred So the prosecutor said Well, if the probability of a match is one in four hundred, then the probability of his innocence is one in four hundred It's very unlikely to be innocent But again, this is the wrong calculation What his defense did and this is correct and what they said is correct the defense said, okay If the probability of a match is one in four hundred then in Los Angeles alone I could find eight thousand people with that blood type I could fill a football stadium with people with that blood type and O.J. Simpson would just be one of them So this is the correct calculation This said the defense said the probability of his guilt is one in eight thousand He got eight thousand people with this blood type. O.J. Simpson is one of them Therefore, it's very unlikely didn't do it right now They are guilty of their own fantasy there because they kind of dismissed the evidence It is true. You've got this eight thousand people in Los Angeles with that blood type O.J. Simpson is one of them. You can't then discount O.J. Simpson. He is one of that eight thousand You then add in the other evidence on top of that like he knew the victim and so on and That number starts to narrow down. What I'm saying is he did it. Am I allowed to say that? However, there is some truth in the old Star Trek myth if you look at security officers If you actually look at the security officers who died in the original series of Star Trek 20% of them died So the moral of the story is if you want to be on the Starship Enterprise and you won't have a good chance of survival Become a scientist Now what sort of things can you study as a scientist on the Starship Enterprise? Well, what about Xenobiology right Xenobiology the study of alien biology not the way Captain Kirk used to study it with his lips But speaking of reproduction, let's take a look at some alien biology then that's mentioned in Star Trek For example, let's look at the Vulcans Okay, so this is a particular famous episode of the original Star Trek when we learn quite a lot more about mr. Spock's alien heritage is Vulcan biology and what I'm gonna show you here It's a clip from the show where mr. Spock is talking about his alien biology. I want to show you this clip I just want you to appreciate Leonard Nimoy, William Shatner Vulcans choose their mates Haven't you wondered I guess the rest of us assume that it's done Quite logically it is not We shield it with a ritual And customs shrouded in antiquity the humans have no conception Strips our minds from us Brings a madness which rips away our veneer of Civilization it is the porn far time of mating there are precedents in nature kept The giant eel birds of Regulus 5 once each 11 years they must return to the caverns where they hatched On your earth salmon They must return to that one stream Where they were born to spawn Would die in trying so what isn't said in that clip there So mr. Spock has to return to his home planet to reproduce what isn't said in that clip there is he actually has to return every seven Years to reproduce now this sort of behavior and they didn't mention it in that clip You do see that sort of behavior in real life, but in particular I want to talk about these things which are called periodic Chicago's so these things are little locusts like insects and the periodic cicadas have a Life cycle where they come out they reproduce and then they lie dormant so there are 13 year Cicadas 13 year life cycle now see like dormant and then they come out they reproduce and there's 17 year Cicadas as well, so they also like dormant for that time then they come out They have a party the e they reproduce they make a lot of noise right people have to move out because they're so noisy But these numbers I've mentioned 13 year life cycle 17 year life cycle notice these numbers are prime numbers and it's believed that that's not a Coincidence that they actually believe that this has been evolved behavior these prime numbers Because it's a method to avoid predators So imagine you've got your Chicago here and let's say he comes out every six years So this is not a prime number six It's not a prime number he comes out every six years look six year 12 year 18 and so on now I imagine there is a predator who has a sort of periodic life cycle as well So we have a predator here and he comes out every Three years let's say so the predator comes out every three years as you can tell He will coincide with the Cicadas every time they appear If the Chicago's instead change their life cycle a bit just nudge it a bit Let's say that's making them come out sooner Let's make them come out every five years if instead they came out every five years five is a prime number So they're coming out every five years and now their life cycles are out of sync with the predators Until this point here year 15 But this is several generations of predator that never gets a chance to eat The Cicadas so it keeps you out of sync with your predators So this is a real-life example This is one extreme of protecting yourself from predators Oh, so I'm guessing on Vulcan they have some predator that comes out so they've got a seven-year life cycle The other extreme is obviously to reproduce a lot to reproduce a vast Amounts. Oh by the way these Cicadas and The last time they appeared the 17 year ones they came out in 2013 the last time they came out before that was 1996 If you remember 1996 Well, so they came out along with other pests like beanie babies the Macarena and Hanson So this is the other extreme of predators. This is the Tribbles. So the Tribbles reproduce a lot so They actually reproduce at a what is called a geometric rate like they reproduce so much. It's a vast rate I could explain what geometric rate means, but I don't have to well I've got next here. It's a clip of Sulu from Star Trek explaining what geometric growth is If you aren't the mathematics of this Mitchell's ability is increasing geometrically That is like having a penny doubling it every day in a month. You'll be a millionaire So in a month, you'll be a millionaire. Let's have a look at that So geometric growth if you have a penny if you double it on the next day You've got two pennies if you double it again you have four you double it again You have eight if you do that 30 times you do it every day for a month if you do that 30 times Then you have 1 billion pennies. It's about 10 million dollars. So suddenly this shoots off rapid increase But mr. Spock performs a similar calculation when looking at the Tribbles the Tribbles are these cute balls of fluff Like you can pet right and they pair very cute, but they reproduce so fast Here's mr. Spock explaining Tribble population growth. They seem to be gorged Gorged on my grain Kurt I am going to hold you responsible It must be thousands of them hundreds of thousands one million seven hundred seventy one thousand five hundred sixty one That's assuming one Tribble Multiplying with an average litter of ten producing a new generation every twelve hours over a period of three days And that's assuming that they got here three days ago So that figure there was one million seven hundred seventy one thousand five hundred and sixty four So when I used to watch Star Trek as a kid and they used to do something like that I used to I used to think is that a real number or have they just made up? Has the writer of the episode just made up a big number that sounds impressive or have they actually worked it out? Well, let's find out. We're actually going to see if that works So mr. Spock was saying that if you start with one Tribble every twelve hours It produces a litter of ten baby Tribbles and then twelve hours later Those Tribbles produce another letter of ten baby Tribbles each Including the original Tribble which produces another letter of ten baby Tribbles So if you're starting with a population, let's just do this generally Let's say you start with a population P Tribbles, whatever that number is Twelve hours later. You're gonna have ten times as many little baby Tribbles If you then include the original population as well That means you now have eleven times as many Tribbles as you started with so if we do this calculation Let's have a look. So we're gonna start with one Tribble Twelve hours later. You'll get eleven Tribbles then you multiply it by eleven again by eleven again This happens every twelve hours. So in three days, this happens six times So we're going to multiply it now eleven to the power six and the answer you get is One million seven hundred seventy one thousand five hundred sixty one. Mr. Spock was right. I Was delighted In fact, I was amazed that he actually bothered to do the calculation I actually emailed the author of this episode a guy called David Gerald I actually emailed him saying I just done the calculation. I never thought you act I thought that was just a made-up number. He did say that Oh, you know, it's easy enough to do with pen and paper and he yeah, and he's right. So this geometric Population growth is part of something called mathematical biology. So you might be looking at reproduction population growth by the way Geometric growth is a thing that also happens in real life If you have a species where there's plenty of resources and no predators then you do get geometric growth including Human beings human beings gets a geometric growth as well But if we're looking at mathematical biology, here's another topic in Mathematical biology that I want to talk about and this is a rather striking image farm Star Trek Which are these guys these aliens are half black and half white so we've got Guy here's black on the right hand side guy here this black on the left hand side in the episode The people who were black on the right hand side were being oppressed by the people who were black on the left hand side It was a message episode But this striking pattern surprised spot can dr. McCoy in the episode Here's a clip of them discussing this alien that they've just discovered and how surprised they are You are a certain doctor that this pigmentation Is the natural condition of this individual that's what I've recorded mr. Spock do we have any knowledge of a planet that could have produced such a race of beings negative captain Bones, what do you make of it? Well, I can't give you any specific circumstance that will explain him judging by looking at him We know at the very least he is the result of a very dramatic Conflict spot. There's no theory captain from the basic work of Mandel to the most recent nucleotide studies Which would explain our captive all gradations of color from black to brown to yellow to white are genetically predictable We must therefore conclude that this alien is that often unaccountable rarity a mutation One of a kind yes, I would agree. That's the case here So mr. Spock has decided that this alien is not a race of aliens It must be a mutation and he's right you do get mutations that look like that they're called chimeras So you do get animals like this lobster who is half black this cat here half black on one side Or even this this budgerigar here half green half blue. So these are mutants This one mr. Spock concludes so he's rather surprised that there is a race of these aliens And he says well, there's nothing that could explain that he's kind of right. He's kind of wrong There is something that explains that it's called morphogenesis and morphogenesis is the study of the mathematics of animal patterns And this topic was started by a famous mathematician You might know I don't know you might know a man called Alan Turing now Alan Turing If you don't know one of the 20th century great Mathematicians he was a great mathematician. He's the father of computer science He was a world war 2 code breaker and after world war 2 he's turned his attention to mathematical biology So then he started doing mathematical biology and he was interested in Animal patterns and he came up with a theory to explain it which he described as waves on cows and waves on Leopards so he wanted to know why does a cow have patches? Why does a zebra have stripes? Why does a leopard or a cheetah here? Why does that have spots? And so he came up with an idea to explain it and he thought Maybe what the mechanism is it's not just one thing. There's actually two things that are happening in conflict There is one chemical reaction that is producing color in the animal And there was a second chemical reaction that is stopping that that is inhibiting the creation of color so these two chemical reactions are happening in the body and they reach a Stable point they reach an equilibrium a stable point and that equilibrium gives you these patterns in these animals and the equation that he came up with to explain this stability Was similar to the same type of equations that physicists use when they're describing waves So imagine You're hitting a symbol like I've got here You're hitting a symbol you're creating a wave, but you can hit the symbol in a way that you create a standing wave All right, so imagine you've got a standing wave Well, okay this time instead of hitting a symbol imagine hitting a symbol in the shape of a cow All right, so you're hitting a symbol like that man And you're trying to create a standing wave if you create a standing wave The stability there those peaks and troughs are where the color appears on the animal so this It does explain this does explain cows and zebras with a bit more work He could use the same sort of theory to explain these rather more exotic animals such as the tapia Which are half black and half white We've got a colobus monkeys here the same kind of thing half black half white and these which I love Valets goats which are half black and half white But notice these animals the dividing line is here It's along the belly kind of halfway down the body and none of these are Directly vertical down the body I've spoken to people who do this properly I'm not the expert but I've spoken to them and apparently that's a lot more difficult To explain so if you did meet something a race of people who were half black half white that would be quite surprising So I'm just saying I guess more study of alien life is needed And I believe Captain Kirk has volunteered now That brings me on to my next thing. I wanted to show you which is How populated is the galaxy this Captain Kirk hanging out with some of his alien friends? How populated is the galaxy? So here's another clip where they're considering that question. Here's a Captain Kirk and Dr. McCoy Captain Kirk in slightly reflective mood I look around that bridge I see the men were waiting for me to make the next move Some bones What if I'm wrong? I don't really expect an answer But I've got one Something I saw them say to a Customer Jim in this galaxy is a mathematical probability of three million Earth-type planets And in all of the universe three million million Galaxies like this and in all of that and perhaps more and one of each of us Don't destroy the one name Kirk. So Dr. McCoy's invoking something there He's invoking something that is known as Drake's equation So Frank Drake was an astrophysicist and we're talking in the 1960s here And he was trying to detect alien life with these big dishes these big radio dishes They're trying to detect alien life that may live in our galaxy So he came up with an equation to estimate how many civilizations that might be out there that we could detect So let me look at this equation. This is Frank Drake's equation and I'm just going to go through this equation term by term Let's see what it all means So the thing we're interested in is the number of civilizations in this galaxy that we can detect Now, let's look at the rest of these terms the first term here are That is the rate of star formation So in the 1960s Frank Drake estimated this to be about one star per year That we're creating one star each year NASA now estimates this to be about seven seven stars each year This is multiplied by this next term, which is the fraction of stars with planets Which is now to be believed to be about a hundred percent like like almost all stars have planets This is then multiplied by this next term which the number of planets per star that can support life This is then multiplied by this next term, which is the fraction of those planets that go on to support life That's then multiplied by the fraction that go on to support intelligent life So this number is now ring now right each time we're narrowing this number down And then this is multiplied by the fraction with civilizations that have radio that we can detect And then finally this is multiplied by the last term here L Which is the duration that such a civilization would exist Now when Frank Drake was doing this he kind of estimated that most of these terms would cancel out That's what he thought so really the main term the most important term is the last one So he reckoned that the number of civilizations we're looking for really depends on how long a civilization like that will last and Frank Drake estimated it to be somewhere between a thousand and one hundred million civilizations out there Now the purpose of this equation is not really to find an exact number The purpose that Frank Drake was doing was to find also to start a conversation with his colleagues to start a conversation About it. What do we need to know? But if you change the parameters and people do people with different estimates will get different values Some people estimate this to be in the tens of millions or in the tens of billions Some people estimate it to just be one that earth is the only planet with intelligent life like that The only thing that we know for sure is that the probability isn't zero because we exist Actually the creator of Star Trek Jean Roddenberry actually used Frank Drake's equation When he was pitching the show Star Trek when he was pitching the show to the studio bosses to justify All these aliens that Captain Kirk was going to encounter on his travels Although in the meeting he couldn't quite remember what Drake equation was off the top of his head So he actually came up with his own variant of Frank Drake's equation Which is what I'm going to show you next. This is Jean Roddenberry's variant of the Drake equation. Here it is and This means Absolutely nothing There is a nice story. I don't know if it's true. I would love it if it was true I don't know there is a story that Frank Drake visited the Star Trek set when it was being filmed and Someone showed him Jean Roddenberry's variant of the Drake equation and he said, oh, yeah That's very nice politely But he didn't have to point out that a number raised to the power one. It's just the number itself So some of these mistakes like this some of these mistakes actually even reached the screen In fact what I'm going to show you next is a notorious mathematical gaffe that appeared in the show Let's see if you can find what it is What's happening in this clip is Captain Kirk is trying to find someone who's hiding on the ship So he's trying to find this person. They're going to use the ship sensors to find this person They're going to try and listen to this person's heartbeat to find him see if you can spot the mathematical mistake in this clip Ready mr. Spock from it of captain Gentlemen this computer has an auditory sensor. It can in effect hear sounds By installing a booster we can increase that capability on the order of one to the fourth power I don't know. I Know you know one to the fourth power One to the fourth power means one times one times one times one We see good one so captain not very good at maths perhaps He is actually better with computers in fact captain Kirk is able to talk Computers to death on no less than four separate occasions in the original series of Star Trek by the use of paradoxes or moral dilemmas What's it? Here's coming a clip showing you our captain Kirk Talking a computer to death the infant he's talking in Android to death as he's trapped on a planet of Android of Android Let's see how he does it But there was no explosion I lied but he lied Everything Harry tells you was alive remember that everything Harry tells you was alive. Listen to this carefully Norman You say you are lying, but if everything you say is a lie Then you are telling the truth, but you cannot tell the truth because everything you say is a lie But you lie you tell the truth, but you cannot what you love Logical please explain you are human only humans can explain the behavior Please explain. I am not programmed to respond in that area So captain Kirk is using something they're called the liars paradox Which can be more simply stated as this sentence is false. So this sentence is false So if that's true it contradicts itself, but if it's false it contradicts itself as well So it's a paradox But this paradox this liars paradox is actually central to some of the most important results in 20th century Mathematics it goes back to the very foundations of maths itself You see maths is built from some basic truths some basic assumptions They're called axioms. They're really basic things are things like one is a number Every number has a successor the most basic assumptions you can make and from these basic truths You can then build up all other mathematical results Now at the beginning of the 20th century a German mathematician called David Hilbert set out a series of challenges To 20th century mathematicians one of them was to show that the axioms of arithmetic are not contradictory what that means is we that we can't use the axioms of arithmetic to prove Something is true and then use those same axioms in a different way and prove its false at the same time So that would be a contradiction. That would be like saying one equals two and the whole of maths falls apart So this is what David Hilbert wanted to know Unfortunately, he was disappointed a few years later when this mathematician came along a guy called Kirk Girdle Who has the best hair by the way half black half white? and he came up with something called the incompleteness theorems and He showed that in maths there will always be a mathematical statement that is equivalent to the liars paradox But instead of using this statement is false. He used something that was like this statement is not provable Now he's saying that there is always something in maths Equivalent to that this statement is not provable now if that's true That means there are true things in maths that we can't prove These things are there. They are true and they are there, but we can't reach them without axioms We can't prove them. We just can't get there. There are holes in maths if this is false Then it contradicts itself. So if that's false, we have contradictions in maths So either we have holes in maths or we have contradictions in maths And this led to David Hilbert having smoke coming out of his ears as well Now there are some ways around this problem Though we can use other areas of maths and more exotic areas of maths to try and fill in these holes But there are always things out there that we just can't prove So the question became is there a way to determine whether a statement is provable? Is there a way that can always determine that this statement is provable or not? Now to solve this Another mathematician who I've mentioned already came along But we're going to meet him now when he was a much younger mathematician, which is Alan Turing again Now while he was at university as a master student 22 years old He knew of this problem and so to solve it he conceived of a hypothetical machine And this machine could do any job that a man could do any calculation any mathematical proof that a man could do And he called the machine that he did he designed he called that the computing machine The man whose job it would replace he called that the computer And that is the beginning of computer science today So computers were designed to solve this rather abstract mathematical problem Now the idea was that you could give this computing machine a problem and it would run And if there is an answer it will stop and give you the answer Or if it's unprovable it will just run forever So the question is Is there a way to determine whether the machine will run forever? Will it stop or run forever? Now Alan Turing showed that it there isn't a method that can always determine if something is unprovable Or not so there isn't some magic solution that can tell me if something is unprovable and to solve that he used A paradox like the liars paradox. I'm going to actually try and explain how the paradox works. Let's let's try this out So Imagine you've got me. It's like we all have these computing machines We have our phones So imagine having an app and you know, you thought this happened to you Apps crash right they freeze your phone. They crash So imagine we know a way that can determine whether your app is going to crash All right, so if there's a method that can tell me whether the machine is going to crash We can turn that into an app as well, right? I'm going to design an app. It's called freeze Freeze is an app that tests other apps So what you do maybe you have a drop-down menu You can use this to test another app and it will tell me if it's going to freeze my phone All right, it will say this is okay or this is a bad app and it's going to crash your phone Will this freeze work for every app? Or no, it won't work for every app. I can design an app where it fails to work I'm going to design an app now called paradox And paradox is designed this way Paradox is to it's designed to run freeze and test itself Now if freeze returns okay Paradox will deliberately freeze your phone right it works out the last digit of pi right something like that If freeze returns not okay, then paradox does terminates does shuts down quietly terminates Will paradox freeze my phone? Well We don't know right if it freezes your phone Then it will shut down quietly if it doesn't freeze your phone. It will run forever So it's designed this way. This is something that the computer can't resolve Which means it shows that you can't always determine whether something is provable or not now This idea is a fantastic idea But it shows that in science fiction like star trek and it happens in other shows when they're trying to defeat a computer by the use of a paradox That means they're going back to the original definition Of a computer they're going back to that original paper by allen shoring when he defined what a computer is And he showed that it can't resolve a paradox like that goes back to the original and this Must be standard star fleet training in star trek because they use the same idea in the next generation To defeat the borg by using a sort of mc escher style visual paradox But that's going to be A talk for another time I'm not going to go into the next generation But just before I finish I do want to come back and do this again I'm going to talk you know next time I'll talk about the maths in the next generation I've been trying to decide what to call it. So I think I'm going to call it After this graph which is a graph I came up with Which is actually if you look at this graph here It's actually google hits here on the left Versus number of a's and that is a number of a's that people use on the internet when spelling the word karn Which is something something I call the graph of karn I on that no, I think that's a good place for me to stop that I say thank you very much Thank you So what we're going to do what we're going to do now we're going to have a little bit of a break We're going to have a bit of a breather But we do like to do give you guys some maths to try So I've set you some mathematical challenges in front of you actually So I've shown you there some mathematical Star Trek related games Because captain Kirk very famously in star trek does not believe in the no-win scenario And this is my favorite picture of captain Kirk there. He's not going to lose this game So he does not believe in the no-win scenario. Is he right to not believe in the no-win scenario? So this is what we're going to do. We're going to have 20 minutes or something like that, right? We've got games for you to play. There are two player games So you might need to introduce yourself to the person next to you. So let's do that first Introduce yourself to the person next to you. We're going to try these out So there's about five games there for you to try these games Each of these games have a winning strategy for one of the players There is a winning strategy which means for one player You will always win if you get the strategy For the other player you're always going to lose if you're playing against the winning strategy So I'm going to ask you if you can work out what the winning strategies are There's five of them to try but just to start off with Let's do the first game Together so can I get a volunteer to help me out with the first game? You'll be perfect. Come out. Come out. Have a little round of applause. My volunteer is coming out here. Yeah Come out. Come join me Right, what is your name? I didn't mean I'm Nathaniel. Nice to meet you right now This is what we're going to treat so the first game there Is something called the voyage home. So we got the starship enterprise up here. We have this grid system here Now the starship enterprise he can move in this game Any number of squares to the left he can move any number of squares down. He can't move right. He can't move up He can't move diagonally Now I'm going to let you start him on Any square that you want? I tell you I'll I'm going to exclude that one. I might be give it away Any square you want on the first row? Where do you want to start the starship enterprise? Start them right there. You're going to start this one. Yeah, okay. Let's do that So you're going to start there now just to move the starship enterprise I'm going to have to raise shields. This might look like a text box There you go, right. So we raise the shields So you're going to start there now. Do you want to be player one or player two? Which one goes first? Do you want to go first or second second? You want to go second? All right Then I will go first and I'm going to move the enterprise down one square What do you want to do? Can I move them left one square? You can you can move them left one squares. You're going to this square here. Yeah, absolutely You can you're going to move left one square I'm going to move Down one square. What are you going to do? I think I'm going to move left Four squares. You're going one two three four. Okay. I can do that for you. Let's go left four squares Now I'm going to Go here I'll move them left one square. You're moving left one square Which means I'm here which means I'm reaching the bottom left square, which is where planet earth is No, I win. I'm in the bottom left square. So back to your seats Oh So Ah So I believe you had a winning strategy there But you have messed up the rules. So there is a winning strategy You might see it already if you don't see it play a food game see if you can If you work it out, there is another rule here. We include diagonal moves Let's see if you can work out what the winning strategy is And then we'll try some of these other games. Like I said, we'll have I don't 15 minutes Perhaps I'll walk around have a chat with you see how you're getting on and then at the end We're going to do the answers. We're going to see what your winning strategies are We're going to see if you can beat me And maybe if we have time we'll do some questions. We'll wrap it up. Okay. So 15 minutes have a have a break Have a chat. Let's see what you solved I wonder if anyone's got some winning strategies So I hope you played a few games Let's start with the first one. Did anyone have a winning strategy for this first game? Okay, so I've got a couple of hands up. There's going to be a guy with a microphone He's going to run towards you. So I've got a kid over there at the back there with his hand up I want to see what your winning strategy might be So the winning strategy is that um You start by choosing the top right pink square. Yes And then whatever your opponent does you just go to the middle diagonal Great. Perfect. You've got it perfectly lovely. Do you go here on this diagonal here? This is so the winning square is on this diagonal So if we start here or even if we end up we want to get back to this main diagonal So you get back to the main diagonal Then your opponent is forced to move you off the main diagonal whatever they do They're forcing you off the main diagonal you then go back to the main diagonal They force you away You then go back to it and so because you're trying to always get back to the main diagonal You're going to end up on the winning square. Well done over there. Nice one If you want a challenge then try it with this extra rule here We're allowing diagonal moves as well. Did anyone try the shoot the red shirts? Game did it? Well, did anyone have a strategy for that? We've got a hand At the gone. I'm going to go for the back and I'm I'll try and come back to the front if I can Do we have a winning strategy for this shoot the red shirts? Do you know what it might be? Um, I think it's if you go you want to go first unless it's a multiple of three people total Ah, so you think so what's your strategy to win? So to win you make the first move But if there are a total the total number of people is a multiple of three then you want to make the second move Oh, you want to make the second and why do you think that? I just I just mapped out if there was one person you definitely want to go first if there's two people I think there is a strategy and that might work So I think there is a strategy that can work for any number I don't know if anyone had a different strategy. So I've got a hand down here at the front. I'll make my microphone guy work Come bringing down to the front here. Do you have a different strategy? I found that the strategy was just make it so that the enemy can't do two on the adjacent Because then you can make it you can if you force them to take one at a time Then you can develop like a clearer strategy So you're trying to are you trying to have like just one single guy in each like little section My goal is to try and make it harder for them to strategize But it wasn't my strategy and I'm what I'm going to do So I'm going to tell you what my strategy is and then you can take this hand try it out My strategy is to take out the middle guy So if I take one of these x's here And this should work for any number If I take out the middle guy and if it's If it's an even number you might have to take out the two middle guys You're trying to split this line into two equal parts and then from that point on you play symmetrically So if your partner or the player two then takes well the two from here Whatever move they make you do the same move in the other half And by playing it symmetrically that way you end up with the last red shirt This see did anyone have any strategies for This one here the pod ship with the crosses that you have to join together The sprouts that you have to join together Do I have a winning strategy for that? I might tell you that one if you don't For that example that I said start with three crosses Player one will always win Player one will always win if you do a different number of crosses Like four cross if you use an even number of crosses Player two wins you have an odd number of crosses player one wins The thing to think about is to think about how many moves it takes In fact, it's the same number of moves for each game. So look at how many moves these games take. It's always the same I might skip fizzbeard. I might like to skip over that one So that's people might know it is nim Uh, there is a method for that. Let's try this last one here the last triple Did anyone have a strategy for this last triple game? Let's get the tribbles up here I seem to be missing a triple one of my tribbles has gone We're gonna have to pretend it's there one two three four five two of them have gone there. There you go Right, they've turned up. Did anyone have a strategy for this? Do you want to do it? Do you want to redeem yourself? Come let's do it That's it come my volunteer back up again. We'll try another one. Let's see you can beat me So you're gonna play against me All right, let's see we can do it. Do you want to go first or second? I'll go First you're going first. What do you want to do? So just to explain the rules We have pink tribbles. We have gray tribbles if you can spot the difference There are pink tribbles and gray tribbles You can either take away as many gray tribbles as you want You can take away as many pink ones as you want or if it's take an equal number of pink and gray tribbles away Winner is the last person who takes the last triple. Okay, you're playing first How many tribbles do you want to take away two pinks? You want to take away two pinks so number one Number two. So you've left me with seven gray and two pinks I'm going to take away Uh as many grays as I want so I'm going to take away six grays I gotta go over here strategy one two six Now there are two pink and one gray triple. What do you think you win? So I'm just gonna have I won? Have I won already? Oh, no Over there when I was playing with her, right? Well, don't back to your seat again The twist The twist for this game, I'm not going to tell you how to do it But the twist for this you're going to have to work it out But the twist is this is mathematically the same game as the first one we played This is actually mathematically equal to The voyage home game So see if you can work out why these games are equal to each other equivalent to each other It's the one it's the version where I included the diagonals as well That game including the diagonal moves is equivalent to this last triple game So that is something for you to work out. I'm going to leave it at that again I'm going to say thank you again. We might have time for a couple of questions Four questions. I've been told so I'm going to say thank you again. Um, let's do it. Let's do it Are there any questions for me? Uh, I've got one over here to my right Now you you said that the uh, that who wins depends on who on how whether the number of Of odds is an even number. Yes, it does Wouldn't it just doesn't each move just take away a single Cross and and it isn't isn't the number of Total spots there that starts out is always even regardless of how many you're on the right lines though You're on the right lines for proving it. Yeah. Uh, so you've got whatever Three let's say and then you join them together and then you create two new sprouts For each time you join them together. Do you see that? So if you consider the game ends eventually after whatever m moves You can actually piece together how long the game lasts Uh, I might have to give you a clue then. Uh, this is called a planar graph So this is like a network of dots and lines and your need Um, what is the name of the formula? I need your mathematicians surely, you know Say, yeah, what is the name of the formula? Oh, I think it goes from my head So it's called a polyhedral formula and the name goes from my head because I'm an idiot But look up this formula. There is a formula for graphs And it will tell you how long that game will last I'm giving you all sorts of clues I'm a fool for getting the name of the formula Is there another question that I should say or have I spun you into silence? We've got one here and one here. Thanks. Um, I was looking on your website earlier And I saw that you sold a cup that had a puzzle on it and I couldn't I couldn't solve it So it's with the the three houses that each need each need to get. Yes. Is it solvable? So, uh, is it solvable that would be a giveaway I'll tell you that So this one just to repeat that I work with something called maths gear and we sell some mathematical toys and things We have a mug which has a puzzle on it and you have to join the houses together in such a way It's slightly related to this pod ship question. We've just done it uses the same formula That I just can't remember the name of I'm not going to tell you if it's solvable that would give it away That'd be a terrible thing to do and I take one more question if you've got one more if we have one more I've got one here. I've got the green shirt Why does nim balancing work is a solution to the nim problem? So why does nim balancing work? So yes, so you know something, don't you? Yeah So this is these games we've tried are called impartial games Uh, each of these games. This is the beginning of something called combinatorial Game theory, which is the same mathematics that you use to study chess and go and games like that These are simpler games. They have winning strategies It's equal. So each player has The same moves available to them on each turn And they are all mathematically equivalent in some way to something called nim But I'm again, I'm gonna have to leave this for you guys to look up which I invite you to do I am going to leave it there. I'm going to say thank you again. You can always say hello to me at the end. Thanks again All right, let's thanks James grime one more time