 I'd like to bring up a very dear friend, Mark Saul. He's the executive director of something called the Julia Robinson Math Festival. And he's here tonight to introduce our speaker. Thank you, Mark. Thank you, Cindy. If you want to know about Julia Robinson Math Festival, ask me some other time. Right now, I'm here to talk about my friend Paul Zeitz. And I'll start with about 1980, because I know him not long, even a little longer. My friend in college, I was teaching high school. And my friend and colleague, Irwin Kaufman, mentioned to me in conversation that one of our New York City math team kids was now teaching high school. Well, I love this, because that's what I did. So I asked him which one, excitedly. Well, he wasn't sure. He knew only that the kid came from Brooklyn, went to Stuyvesant, and was brilliant. Well, there were more than one kid for that description. But within a week or two, we found out that it was Paul Zeitz. Paul, I knew him as a student, was one of the stars of the math competitions for high schools in New York City at the time. And New York City always won at the time. He was also a member of the very first USA team to the International Math Olympiad. Well, brilliant kids tend to become brilliant adults unless we do something to stop them. Paul escaped our clutches, and here he is. And by brilliant, I mean, not just smart, but accomplished. He's a real doer. Aside from his teaching, which for me is the most fundamental contribution, his contributed books, Art and Craft of Problem Solving, Articles on Problem Solving, helped to start the very successful Bay Area Math Circle. And most recently, he was a prime mover in founding the proof school in San Francisco. Any one of these contributions would have been a major contribution to the mathematical community in this country. Paul did all of them. And there are other things he's accomplished. He's a father of two children, lived both summer and winter in Yellowstone National Park for two years, married an identical triplet. We're getting into unique territory here. So I'm going to stop talking pretty soon. But I just want to let you know about two things about polsites that are germane to your being here tonight. The first is that you must not be afraid to tell him you don't understand something. He will struggle with you to get an explanation that is on your level. And sometimes he will do what very few academics do, and very even fewer mathematicians do. He will say, I don't know. Or I also don't understand. And he will get down in the dust with you and figure things out. So don't be afraid to ask questions. I did ask Paul whether it was OK to say that. OK. The second thing about polsites is about the most deadpan person I've ever known. He will say something very witty and not let on that he's just said it. Minutes later or days later, you will realize what he said. Maybe quote it to someone else and find yourself both cracking up. But you'll get no clue from Paul. It was because of Paul that I first realized why sitcoms on TV have a laugh track. So listen hard. Don't be afraid to ask questions and enjoy polsites. Hi. Can you hear me? So yeah, you can ask questions, but I will reserve the right to say I don't want to answer the question. But feel free to ask questions. And also remember a question is a question rather than a statement like saying, I figured it out. That's not a question. I don't understand it. That's a question. So I want to thank Mark for the very nice introduction. And I want to thank the Simons Foundation and Museum of Math for inviting me. It's a real honor to be a part of this. And everything in my talk today is stolen. And so I need to thank the people that I've stolen the ideas from. And the main person who I really owe the ideas to is Martin Gardner, who is the greatest expositor of mathematics, probably in any language. And if you haven't heard of Martin Gardner, who died about 10 years ago, 11 years ago, you should look him up. Pretty much everything that I'm going to talk about today, he talked about or wrote about and far more eloquently than I'll be able to share with you. I also owe things to intellectual property that I'm illegally appropriating, such as this picture here. How many of you, I'm just curious, how many of you recognize this image? How many of you don't recognize the image? Because you're so young, you don't know peanuts. The theme here is, in the Peanuts cartoon, Lucy would always hold up the football for Charlie Brown to kick, and then at the last minute she'd lifted and he'd fall down. And so I had the full image. But then I was reading about fair use, and it said that you shouldn't print the entire cartoon that's illegal. And so it's just half of the cartoon Charlie Brown is over here. But it's probably still on the edge of being illegal. But the theme of my talk is cheating. And it is appropriate. Today or yesterday the Supreme Court began hearing arguments about gerrymandering, which is essentially a mathematical method for cheating at politics. And so the phrase, this game is rigged, has a lot of different meanings. And my subtitle here is the first example of a simple mathematical rigged game. I'll bet you $5 that if you give me $10, I'll give you $20. So let's make sure we understand that it's a sucker bet. In other words, here's something that's important, something that my wife, the triplet, has always learned, never bet with me. Like if I say, I'll bet you $10, she says, no, no. I know I'm not going to bet you, because I never, I don't gamble. I think gambling is immoral, but I don't mind stealing from people. So how does this bet work? I'll bet you $5. That's the bet, that if you give me $10, I'll give you $20. So someone says, OK, I'll bet you. And they'll say, OK, so what is it that we're betting? We're betting that if you give me $10, that I'll give you $20. So now you give me $10, and then I refuse to give you $20. And I say, oh, I lost the bet. I owe you $5. Get it? Try it on your little brother, OK? But the kinds of activities that we'll learn about tonight are more interesting than this. At least I hope they're more interesting than this. So I'm going to show you four different things. And each of them involves a fairly simple mathematical principle. And items one and two are really sort of the same thing. This is kind of a recap of this, but in a more surprising way. But each of them involve fairly simple mathematical ideas, but they get into difficult math pretty quickly. You won't have any trouble understanding the basic ideas, but for some of it, there's some really hard homework. And I actually have some hard homework problems over here to give to a few hardcore people. OK, let's get started. The first one is a simple examination of dice that are not normal dice. These are weird dice. And so these are my numberings. These were discovered maybe 40, 50 years ago and first popularized by Martin Gardner. They're called Efron's dice. And if you look at these dice, they have six sides just like ordinary dice. In fact, I made them here. I'm not going to show them to you on the document camera because they're not that interesting. They're just dice with labels on them. But just trust me that I have dice. We're not actually going to do fun things with them. We're just going to look at the mathematics behind it because this is just a warm-up. But so the game that we're going to play is I'm going to let you pick one of the dice and I'll pick another. And then our game is we'll each toss our die and see who has the bigger number. So let's analyze the game. So let's look at A versus B. So A is the top row here and B is the column here. And B is a really boring die. It just is threes. And so who's going to win more frequently? A or B? This is A up here. A is 4-4s and 2-0s. And B is all threes. So when you're tossing an A, you're going to be tossing a 4 more often than you're going to be tossing a 0, right? And what this grid is, it's showing you all the 36 possible outcomes. So for example, there B-1, right? Because 3 beats 0. And there A wins because 4 beats 3. You get it? This should be boring. This should not be that fascinating, OK? And so if you've just eaten supper, you should be getting drowsy. But what you can notice here is that 2 thirds of the grid A wins. So the probability, if we play the A versus B game, is that A will beat B with probability 2 out of 3, OK? So it would be a terrible bet if you had an A and I had a B. And I said, hey, let's play this game. Let's play it every day for $10. Every day in and day out, you'd stand to lose a lot of money. It would be a sucker bet. So we now know that if you have A and I have B, you're not going to want to play that game with me. Well, let's look at the other pairings. So if you look at B versus C, who wins now? Look at all those B's beating the C. And then the C's are just less frequent than the B's. So B beats C with probability 2 thirds also, OK? Any questions about that? Again, it's just because 6 is bigger than 3. That's when C is going to win. But the C die has a 6 only on two faces. It has 2s on four of its faces. So most of the time when you toss a C, you're going to get a 2. And the B die is always going to have a 3. It'll beat it. So B beats C 2 thirds of the time. If we look at C versus D, now D is the half 1s and half 5s. And that's a little more complicated. But if you fill out the chart carefully, you see that there's lots of C's. That's a dead pan thing. I made a pun. Wasn't funny, though. And but once again, C beats D with probability 2 thirds, which is, again, fairly boring. A beats B, B beats C, and C beats D. Here's where it gets a little bit interesting. Let's go back to D versus A, however. Look at that carefully. So A is the column, and D is the row. And who is winning this particular battle? See, the 5s beat the 0s, the 1s beat the 0s, and the 5s beat the 4s. D beats A with probability 2 thirds. Now, again, you might think big deal. Well, here's the big deal. Let me get some volunteers to stand up with me. You, please. And you, and then the third volunteer is this pen. Hold the pen to your right. I'm taller than you. You're taller than him. You're taller than the pen. The pen's taller than me. Is that true? OK, you guys can sit down now. Thank you. Nevertheless, with probabilities of 2 thirds, A beats B, B beats C, C beats D, and D beats A. So these dice do what I claimed happened with the pen, that the pen was taller than me. What we have here is something called an intransitive situation, where one beats some, well, literally, A beats B, B beats C, C beats D, and D beats A. Why is that interesting for trying to cheat people? Yeah? Yes, you and yeah? Who ever picks first loses. Whoever picks first, I can respond with a winning die, right? So the way it works is I say, hey, let's play a fun game. I'll let you look at these dice and pick a die that you like and then we'll play the match die game. So no matter what you pick, I'll be able to pick a winner. If it was a transitive situation, it wouldn't work. Suppose I said, hey, pick a person and whoever's tallest wins. Well, that's an easy thing. You just pick the tallest person. But here, in this case, I was the tallest of the three people and I did that deliberately because I'm not that tall. It's just sort of fun being the tallest of three people. Nevertheless, this beats me. And so this is counterintuitive and very, very strange. It's something that doesn't seem like it should happen. It turns out to be ubiquitous in mathematics, but it allows you to come up with essentially a guaranteed way of cheating somebody. True story, Warren Buffett likes this game a lot and he showed these dice to Bill Gates and made the offer to Bill Gates. And Bill Gates spent a lot of time looking at the dice and then he said, you go first. So Bill Gates isn't stupid. It's a true story. Well, or according to the internet, it's a true story. OK, but now let's look at really the same variation of this but in a much more surprising way. And this is a game that was involving coin flips and it was actually invented by someone named Penny. So it's called, and he called it Penny Auntie. And so the way the game works is very simple. We look at all the possible heads and tails sequences you can get when you toss a coin. So if I toss a coin, I'll either get heads or tails, right? And if I toss it three times, I go one, then two, then three and record my tosses, I'm going to have a sequences of H's and T's. How many sequences are there? Shout it out loud. I'm hearing eights and nines. I'm hearing things involving three, right? How many choices for the first toss? Second, third, two times two times two is eight. And sure enough, here they are. There's eight of these possible choices. Now, which is more likely? They're all equal. They're all equal, right? In other words, if I just said, hey, I'm going to just go blup, blup, blup, and actually do it in a random way like that. And record them. The probability that I get HHH is one out of eight. The probability that I get THH is one out of eight, and so on, right? You agree? OK. So let's play a game. Now that you know they're equally likely, let's play the following game. So you pick one of those eight sequences, and they're all equally likely. You just pick one. And then I'll pick a sequence. And we're not going to do what we did before where we're tossing two dice simultaneously. Instead, what we're going to do is we're going to just keep tossing a coin until we see which sequence comes first. You get it? Let me illustrate it. And I'm going to use the document camera over here. But so let's start with a simple case. Suppose you pick HHH. Perfectly good sequence. They're all equally likely, right? So you pick HHH, and I say, OK, I'm going to give you my three choice sequence. It'll be H's and T's, a sequence of three of them, my magic one that I believe in. And I'm going to bet you that we're just going to toss a coin and see which comes up first, the HHH or mine. And I'll bet you $10. And so what I'm choosing is THH. So let's actually play it. So could I get a volunteer? OK, toss the coin. Come on up. And I'm going to record what you get on the document camera. OK, so stand over there so people can see you toss. All right? OK. What'd you get? Tails. OK. Heads. Tails. Keep going. Heads. Let's stop for a second to remind everybody what we're doing. It's HHH versus THH. Do another. Tails. OK, I'm going to stop you now. OK, the reason I want to stop you is not because I dislike your work. You're doing a good job. But because it should be obvious to you now who's going to win the bet. Will HHH win? They can't win, right? Why? Here, let me get that coin back. Don't steal it. Thank you. OK. All right. Why is HHH not going to win? Yeah? The two H's comes out of the THH company. The minute that two H's happened, right? But if you were the HHH person and you were like betting your house on this, when did your heart break? OK. So when did your heart break? The worst thing is that it's harder to get a creation at the same level. Well, but look, it's a little more subtle than that. Look what hurts you. T. As soon as this gentleman here tossed tail, you can never win. Because if three H's came in a row, what would happen first? THH. Any time there's a T, once we start with a T, there'll never be three H's before THH. THH will, and in fact, this tells you the probability that THH will win. What is it? Not one. When could you win HHH? Right, so you probably couldn't hear over there, but this gentleman said seven out of eight times, this one will win. Because the only way HHH wins is if you get it on the first three tosses. If you don't, if you don't get HHH on the first three tosses, then you'll never have an opportunity to get HHH because it will be preceded by a T somewhere. And so THH will happen first. So notice your intuition said no, they should all be equally likely, one out of eight, one out of eight. But when you're looking at them happening in a sequence of time, it's not that obvious. Here's a metaphor to understand it. That's a true story from when I went to grad school. I lived in Oakland. I went to UC Berkeley. And I like to go into San Francisco a lot because it was the closest thing to New York. I like going into the city. And I would walk to the Bay Area Rapid Transit Station near where I lived, which was an elevated station. And I could see the trains coming. There was just one line going in two directions. There was the train going into San Francisco and the train going east to Concord. And as I would walk to the station, I would see a Concord bound train arrive at the station. And I knew that I had exactly two minutes to run to the station to catch the San Francisco train because the way the schedule worked is the trains happen with equal frequency every 20 minutes. But the Concord bound train arrived at my station at like eight after the hour. And then the San Francisco one would come 10 after the hour. And so the probability of just randomly arriving at the station and waiting for the first train would overwhelmingly be the Concord train, not the San Francisco train. It would come first more often, even though it was no more frequent. It's not exactly the same idea, but it's a similar kind of dynamic there. So it turns out that you can do this. Let me now turn back to the computer. So again, we established that THH had enormously better odds of winning. Again, think of this as a great sucker bet. Think of all the people who you could do this to. Okay, no one in here, okay? But so this is actually described as literally a bet to do in a bar. So this is no good for you, you're too young. But if you could go to a bar and you could actually do this in a coffee shop. And again, remember gambling is immoral. But the way it works is if your opponent picks a sequence and these are just heads and tails, X, Y, Z, what you pick is you make sure your second two things are their first two. Because that way, if they had any hope of getting their entire sequence, it's gonna be part of something that you are getting something that comes before it, like THH versus HHH. And this one here, you design it to be the opposite of this one in here. Now you might say, what the heck is going on here? This makes no sense. Here's an example, if your opponent picks HTT, you pick, find the opposite of T, that's H. So I'll go H and then the first two. I ignore the third thing completely. So it's HHT. And you might wonder, why does that work? It's not completely obvious why it works. And in fact, John Conway, who's coming on Sunday, how many of you have not heard of John Conway until tonight? Worth seeing John Conway. He's a true genius. He's very eccentric, he's very entertaining, he's very weird, but he's really, really smart. And one of the things that he did, just sort of like, for him it was sort of just like a walk in the park. He came up with this amazing way of analyzing these games with arbitrarily long sequences and instantly figuring out the odds of winning with an algorithm that's completely weird. I'm not gonna explain it here, but Martin Gardner famously wrote about it and said, I have no idea why this works, but he wrote about it anyway. And then people wrote long, complicated mathematical papers explaining Conway's method. So it's not completely obvious that this beats this, but it beats it badly. And here's a chart. Here's a chart that shows you how badly these bets work. So, for example, this is saying that if you have the sequence H, H, T, it will beat the sequence H, T, T with probability two-thirds. In other words, if you picked H, T, T, so I say, hey, pick a sequence, any of the eight sequences. I don't care which one you pick, so you say, okay, I'm gonna do H, T, T. Because remember, one of you said it's easier to get a single and two pairs. So you figure that's an easy one. Look at this, doesn't it? It's so innocent, it looks very similar. It's a single and two pairs. It's not obvious that this trounces this, but if we are just tossing a coin, you'll find that two-thirds of the time, if you toss, you know, it might take 20 tosses, you will see the sequence H, H, T more often than you will see the sequence H, T, T. It happens with two-thirds probability. So if we played this game 30 times, you'd find that H, H, T would happen first in about 20 of those games. It's an enormous advantage. Not as bad as H, T, T beating T, T, T with a seven out of eight chance. But if you, again, now if you look at this chart here, you'll see, look, this beats that, this beats that, this beats that, this beats that. We have another intransitive diagram of four things. Homework problem. Not with this, this is too hard, but with dice. I showed you four intransitive dice. Find three. Can you come up with three intransitive dice? That's a homework problem. I'm gonna post my email address at the end of my slides, and so if you wanna correspond with me, I welcome you to do so, if you have homework questions. Homework's not due, you don't have to hand it in. Okay. So again, this is, and this is not the complete diagram. We could take all of the eight sequences and match them against all the others and figure out which would happen first. But again, the counterintuitive amazing thing is that it's possible to take an innocent looking sequence and find one that looks almost the same, but it will be seen much more frequently than this will be seen. Or not much more frequently, it will happen sooner than this will happen. Any questions about this? This is kinda complicated, yeah. So you were first talking about probability, and then you were talking about, based on probability, you'd think it turned out this way. What is the field of mathematics that explains what you just demonstrated? Well, I guess you would say it's the probability theory. But when I say probability theory, I'm really being fairly simple-minded about it, and you could do this without any theory whatsoever if you were a good coder. You could just code, write some code in Python or a computer language of your choice to simulate flipping a coin, and then you're looking at this string of H's and T's, and you just read along it from left to right, and you ask yourself, will I see an HHT, or will I see an HTT? In whichever one you see first, you declare that to be the winner, and you could run this simulation a thousand times, and what you'd find is about two thirds of those times HHT would win. So to figure this out, the theoretical probabilities does require, I guess what I would call, some basic probability theory. But anyone who's interested in getting the details of how you do these calculations, I'd be happy to share them with you after my talk, because it's not super hard, it's not super easy. It's sort of at the level where I don't want to explain it here. I just want to give you the result. But the result is a really surprising thing that we have these surprising relationships between sequences that are equally likely to happen, but the ones that appear first are not at all equally likely. That's what's really strange. Probabilities filled with these sorts of paradoxes and these issues of intransitivity are also very strange because they're counterintuitive. Again, remember, I'm not actually taller, I'm not actually shorter than this pen. I'm not, this pen is not taller than me, yet if height were intransitive, that would happen all the time. It happens in boxing, I forget the order, but if you look at Foreman, Ali, and Frazier, they form an intransitive trio. One of them beat the other who beat the other who beat the other who beat the other and so on. You can't say one is the better boxer because they're intransitive. And in fact, a group of mathematicians working with teachers recently wrote a paper that won an award at the national math meetings this summer on intransitive dice. It's a big research area and their main result was that it seems that the phenomenon of intransitivity is completely ubiquitous. You can't avoid it even if you try. So these things that are counterintuitive are actually the norm in our universe, which is why cheating is so easy to do. So speaking of, one more question, sure. So the probabilities you just showed is in the case where you continue rolling the dice indefinitely. That's right. If someone wins, is there some point, like if you stop the game after a sequence of six and then you start the game again, is there some point where it's no longer intransitive? Like for instance, if you stop the game arbitrarily, then you reset things, but when you reset them, it would be the same. I don't think that, but there's another issue that maybe you're alluding to which is there's a third thing lurking, which is there's how frequent the sequence is. Which sequence comes before which sequence on average? And then also on average, how long does it take to see the sequence happen? Those are all in a way independent of one another. For example, HHH, it might take a while on average to see. Suppose you don't care about fighting between HHH and someone else. You just wanna see HHH, so you flip and flip and flip and flip, and you say, I'm not gonna have a good day until I see HHH, until I see three H's in a row. On average, how many coin flips will that take? It could take forever, right? You could just be unlucky. HT, HT, HT, T, T, T, T, T, a trillion T's and then an H. On average, how long will it take? That's a question that can be answered theoretically. The numbers for these could be different. It doesn't affect the, it's not a way of predicting who wins in these things, and you still have intransitivities. Yeah, so I guess, like for instance, if you stop, if you say that the game is always gonna be that you roll three dice, or I'm sorry, you flip the coin three times, decide who's the winner if there's no winner. That's a different game. That's a boring game. That's one eighth, one eighth. That's a one eighth game. What if you decide the sequence is gonna be five or five? Right, yeah, if you make it a short amount, then again, that depends on this notion that I was just saying, the expected waiting time to see your sequence and then the sequence that has the suit, that has the lower expected time to appear will tend to be the winner if you have a constrained sequence. But if you're, no actually, I'm not even sure that's true. Only if it's a really short sequence. These are really hard questions. As Mark was saying, sometimes I have to say, I don't know, and so I'm gonna, I'm not gonna go off on a limb here. I think this is very complicated. Professionals get tripped up with probability all the time. I mean, you probably have heard about the Monty Hall Paradox. Whole nother story, I'm not gonna go into that, but look it up if you don't know about it. Question back there. Why is gambling immoral? Oh, I'm just making a joke. But that's a moral question, so I shouldn't joke about it. Say that again. Yes, because you wanna use this in a bar, right? It's a really good rule. Yeah, yeah, so here's the rule, and it's a really easy rule. You can learn this in a few minutes, and you can, right after this talk, you can go to the nearest bar and earn your mortgage. So if somebody, you just tell, say, hey buddy, pick a three, pick a sequence of three heads or tails, any order you want, and they'll say heads, tails, tails. So you look at the middle thing and flip it. So that turns into H. So you start with the middle thing flipped. That's what this is. This is the middle one flipped. And then the next two are the first two of your victim's sequence, okay? And this is guaranteed to give you winning odds of at least two thirds. It'll either be two thirds, three fourths, or seven eighths if you're really lucky, okay? So, well, let me show you a completely different game. So maybe afterwards, yeah. So I wanna move on to a different channel. And so again, this is something that I stole with permission from my friend Ravi Vakil, who is one of the people on the board of directors with me of proof school. And he stole it from somewhere as well, and I completely changed the venue. His original problem didn't involve cats and cat and a mouse. So here is, and you should have a cat and mouse game board. There should be enough for people to share, one for every two people, because I'm gonna want you to play. So you have a polite cat that starts at location C and a polite mouse at location M, and then they move, they take turns moving, the cat goes first, okay? And the cat can move to any neighboring point. So on your grid, it's numbered like one, two, three, just to indicate the three places the cat can go, okay? And so the cat, for example, the cat could go there, and then the mouse, it's the mouse's turn, maybe the mouse will go there, and so on. And you can move back when it's your turn, like the cat could go there, and then on its next turn it could move back. But you can only move from a node to a node that's connected by a line, okay? For those of you that are sophisticated, you're moving from vertex to vertex on a graph along the edges. And so here's an example of how the game is played. So the cat makes a move, the mouse makes a move, okay? The object of the game is for the cat to catch the mouse, that's the cat's object, and the mouse's object is to evade capture. If after 15 moves, the cat will have up to 15 of its moves, so 15 cat moves, if the cat cannot catch the mouse in 15 moves or less, the cat loses and the mouse wins, okay? Why don't you play the game, play it with your neighbor, and get a feel for how this game works? I think that's it, yeah. I ate a little bit of cat and mouse, and so I wanna ask you to do something that you might find a little uncomfortable, but there's peer pressure. I'm gonna ask your opinion about the game, and you're gonna look, you know, you're gonna say, well, I'm gonna see what she's doing. So close your eyes, please. If you could be so kind, and raise your hand if you think that the mouse will win. Okay, now put your hands down, and now raise your hand if you think the cat will win. Put your hands down. Raise your hands if you raised your hands twice. Okay, you can open your eyes now. So the overwhelming majority is no surprise to me because I've been around the block with cat and mouse. Most people are mouse-centric. They like the mouse's chances, right? And in fact, and I'm gonna paraphrase everybody, all the mouse fans, they go like this. They say, well, look, the cat makes the first move, and the mouse runs away. The cat follows, the mouse runs away, and it's a stalemate, right? I mean, they're just gonna go round and round and round a rectangle, and the cat will run out of its 15 moves and will lose. The mouse will evade capture, okay? So who's a mouse fan? Okay, so you, could you come up here? We're gonna go over to the document camera, and we're gonna play. All right, and so I'm the cat, and I'm gonna move first. So here I am, okay, I'm the cat, and so I'm gonna move, I'm just actually gonna circle this. This is my first move, cat move one. And where do you wanna move? Just show them with your finger, and I'll write it on the surface here. You're gonna move the mouse here, okay? So this is, we'll go mouse one, okay? Is that clear, everybody? Okay, and so now I'm gonna do the counter-intuitive thing. I'm not gonna chase the mouse. I'm gonna go over here, cat mouse two, okay? Where are you going? Up there? Mouse two. And then I'm gonna go over here, cat mouse three, and you're gonna go to number three, mouse three, okay? And so now I'm gonna move over to here. I'm gonna, so this is now cat mouse, cat move four, and you're gonna go there, mouse four, and I'm gonna go cat mouse five, mouse six, I mean mouse five, and then I'm gonna go cat move six, mouse six, cat move seven, good game, okay? Thank you, and where's my $10? Okay, so the question is what happened? Okay, and what happened? How many of you cat fans use the go off to the Northwest strategy, okay? Very good, and often it comes from just, maybe not necessarily doing a mathematical analysis, but just sort of being ornery, which is a good problem solving technique, which is just to think, I'm not gonna do the normal thing. I'll just do something weird because often doing something weird will have a payoff and going the furthest away turns out to work. Why does it work though? So if we look at the problem and think about the symmetry of the problem, it's practically a check sport. If we leave out this triangle for a second and notice that the entire game board is rectangles, it's quadrilaterals, and if we color it, we can color things with black and yellow in such a way that every node is connected only to the opposite kind of node. Again, if you're sophisticated, this is with the exception of this vertex here, it's a bipartite graph. So, and we're doing a two coloring of a proper coloring of a bipartite graph. You don't have to worry about what those words mean. It's this, it's checkerboard pattern. But the important point is when we start out the game, the cat is on a black vertex, on a black node, and the mouse is also on a black node. When the cat makes her first move, what color must she move to? Yellow, and then where does the mouse move? Okay, the cat moves to yellow and where was the mouse? Black, now the mouse moves to yellow and now it's the cat's turn. What color is the cat gonna move to? Black, where's the mouse? Could the cat catch the mouse on the next move? No, and it will never happen as long as that's the case because the mouse will just say, I'm just gonna now move to a black vertex and we're gonna have a stalemate, okay? So, instead what the cat does is the cat moves the very first move, it moves towards the triangle and the mouse says, well, I'm just gonna run away and then the cat says, I don't care, I'm gonna go all the way through the triangle and this is the winning move. Here's an analogy. Suppose you annoy your older brother and your older brother comes after you and wants to pound you, okay? And you're going around the table and there's no way he can catch you because you're each running around the table. At some point you slow down because it's just a formality. He moves, you move, he moves, you move. Then, supposing your older brother says, little sister, you know how much I love you, I will give you an extra turn or how about this? I just won't move it, I'll just not move for one turn. It's an equivalent thing, right? Would you do that? No, that's what the cat is doing because when the cat moves here, now look at the coloring. The cat messed up the color scheme because now on the next move, the mouse moves to black. Where does the cat move? Black, which is the correct color. Now the mouse moves to yellow, cat moves to yellow. Mouse moves to black, cat moves to black. Mouse moves to yellow, cat moves to yellow. Mouse moves to black, cat moves to black and you can see the game's over, okay? So if you have a question, wait for the mic to come so we can all hear your question. Oh yeah, I guess. But the rule of the game is the mouse has to move? Yeah, so everyone has to make a move. The mouse stays where it is. Yes, so each, if we wanna be really formal about the game, when it's your turn, you must make one move. If not, then the correct thing to do is to not move if need be. The whole idea here is if you have to always make a move, the only way the cat can win is by doing something that's basically equivalent to skipping a turn or taking an extra turn or giving up a turn because what they're doing is they're shifting the tempo. How many of you play chess seriously? So you know in chess the concept of gaining the opposition, I think, is what it's called in the end game. It's exactly this idea of sort of making sure you control the tempo in a chess game. It's the same idea, and this is a simple variant. And the purpose of this, this is a very, very simple game, is it's a good sucker bet because you show this to somebody, give them the game board, let them play for five minutes, and then say, okay, now let's play for money. And they'll say, well, I don't know why you're giving me money, but sure, I'll play you. So it's a very, very simple, simple principle. Question? Yeah. So if you know the game and you're the mouse, can you get back up to that triangle, or is it always possible? Really an idea, okay, so the question is, all right, now we know how this game works. The mouse is aware that the cat's gonna try to mess up the tempo by going in the triangle. Can the mouse do it too? It's a very good question. It turns out in this game board it won't work because the cat is too close to the triangle and can kind of control it, and so there's no way the mouse can get to the triangle without getting eaten. But if the mouse were able to find a triangle of its own, it could, the game could go on indefinitely. And so a good homework question is to design a more interesting game board like this. And because there are all sorts of different variants, and it's really, now that you understand how the game works, it's really quite fun. It's also not guaranteed that the cat will win with this method, even with this color scheme. It just, the cat now has a chance to win, but if the game board is complicated enough, even if it has the checkerboard pattern, like if you notice that you never have a node with more than four edges coming out of it, if you had things where you had eight coming out or 10 coming out, you'd have various escape routes, and it might be possible for the mouse to escape. So a microphone will come to you. I guess what I'm wondering is, with the same scheme, what happens when you go to other dimensions? Like if you went up a layer, I had two layers. I mean, does the principal carry into the other dimensions? This is dimension free. This is purely an abstract diagram of nodes and lines, and so it could be in the, you could make, you could do this on a three-dimensional game board, and that would be a fun thing to do. You just again have to be careful that it's not too complicated. Then the mouse would have escape routes, but you could easily build something like this out of wires and make it with LEDs, and it would still have the same principle as long as there's a place for the cat to seize the tempo. So, well, let me move on to the final activity. This is again something where I'm gonna want you to try something out on your own, and we'll have somebody come up here and volunteer to play me and lose. Not yet. We have to learn the game first. Okay, you'll be my victim. Okay, but first let's learn the game. And again, this is a game that I think was first popularized by Martin Gardner. I don't think anyone knows the actual history of this game, and its name is not puppies and kittens. It's just the name that I like to call it because it makes it seem really comforting. And so, what you wanna imagine is you have a pet shelter with a certain number of kittens and a certain number of puppies. In this case, it's gonna be seven and 10 just for the sake of argument. And here's how the game works. It's a two-player game. Players A and B alternate turns. Player A goes first. A legal move involves taking animals home from the pet shelter, and there are two guidelines for a legal move. Guideline one is have a heart. You must, on your move, you must take an animal home. You can't visit the pet shelter and go home empty-handed. You have to remove at least one puppy or at least one kitten. You have to take home at least one animal. That's guaranteed. The other guideline is to be fair. So it may be the case that you don't like dogs. Well, then you have to just take kittens. It may be the case that you don't like cats and you're gonna take dogs. It may be the case that every turn you're gonna decide which you like more. But if you bring home puppies and kittens, on your turn, it must be equal numbers. So you can never take away one puppy and two kittens. If you take 1,000 puppies and you're also gonna take kittens, you have to take how many kittens? You got it, okay? That's how the game works. And the goal of the game is to make the last legal move. The winner of the game is the player who makes the last legal move and that's the player who cleans out the pet shelter. That's how puppies and kittens is played. What could be simpler? It's a very, very simple game. What makes this a sucker bet, if this has nothing to do with probability, it's more like the cat and mouse thing, is that it's a simple, simple game that has a very non-obvious analysis. And so you can show this to someone and they'll think, oh, this is a fun thing to play and they don't realize that you have complete control over the game. So let's look at a sample game and then I'll play and then we'll have my already arranged volunteer come up to play. So here's a, yes, victim is the better word. So begins with a V. So again, imagine you're starting with seven kittens and 10 puppies. That's the starting position. Player A goes first and she takes away how many? Two what? Two kittens leaving five and 10, okay? Player B does what? Two of each, right? Player B was a B fair move. Player A decided to take just two puppies, right? And then player B decided to do the same thing. Mirror that move, just take two puppies and then player A does something clever, takes away two of each, okay? And why is player A clever? Why is player A now high-fiving people but not high-fiving B? What's good for player A? Think it through, okay? No matter what B does, A will still win. Explain. Because if B takes one puppy, A takes- If B takes one puppy, then it becomes one one. Then A takes one of each. Correct. And if B takes a kitten, then A takes two puppies. All the puppies, right? And if B takes two puppies, then A takes the last kitten. Exactly, so no matter what, no matter what B does, A is gonna win. So at this point, A has presented B with a position which guarantees that A wins. A presents the position, says, ha ha, I've won. Okay, you get it? Okay, so could I have my victim up here please? Thank you. My volunteer rather. Okay, okay, so what's your name? Fabriciana. Say it again? Fabriciana. Fabriciana, okay, so do you wanna go first or second? Second. Okay, and how many puppies do you want there to be? 20 puppies. Okay, and so we'll start with 20 puppies and make it fewer kittens. Some number in the teens, you pick it. 16, beautiful, okay? 20 pups, 16 kitties, and I get to go first, okay? So I'm player A, and I'm gonna make the numbers small because these are scaring me. I'm just gonna take 10 from each. Okay, now it's your turn, Fabriciana. Five from each? If you take five from each, there's gonna be five and one, and I'm gonna turn that five into a two on my very next move. So don't do that. Do something other than take away five from each. Take three from each, good. Okay, so then it's seven and three, okay? And I'm gonna take away anyone in the peanut gallery shouting advice? No, because you don't know this game. This game is super hard, okay? Any game called puppies and kittens is super hard. I'm gonna take away two puppies, okay? Five and three is what I'm leaving you. And what's your move now? The goal is to clear out the pet shelter, make the last move where you take the very last animal. It's tricky, isn't it? That's why you're my victim. No, you're a volunteer, you're right. I misspoke. You're a brave volunteer. That's what we'll call you, okay? One from each, excellent idea. And you have four and two. And now I'm going to say, oh, I remember that number two. That looked good for A back in the old game when it was a one and a two. So I'm just gonna take away three puppies going one and two. And again, I'm handing you a losing position. In other words, no matter what you do, you're gonna lose. No, because remember, legal moves have to be equal if you're gonna take both. So good game, $10. No, okay. No, you were, yes, yes, you get, right, that's the good thing about this game. Even if you lose, you get puppies and kittens, okay? All right, so you've seen two sample games. You have paper, right? Play a couple of games and just get a feel, just take five minutes and just get a feel for this game. It won't be enough time, because this is a really hard game, but then I'm gonna show you a way to analyze it. So I forgot to mention, folks, in your experimentation, don't just do seven and 10, because those numbers are enormous, okay? Start with some smaller games, like how does the game, what if you just start with one and one? That would be a really boring game. Start with some boring cases and then try to make them ever so slightly non-boring to get a feel for how the game is played. This is only a simulation of the way mathematical investigation should be done. The main point in mathematical investigation is besides it should be fun, it should be laid back. In other words, there shouldn't be a sense of time pressure. But I'm gonna share the punchline with you and you will understand, I hope this game well enough, that you can go up to Columbia or down to NYU and walk up to a random math or computer science professor and explain this game to them and challenge him or her to play this game and you'll be able to beat them almost certainly. Or you could go up to one of the chess hustlers in Washington Square Park and say, let me show you a real game. And beat them. Because you'd understand the game well enough to let them win a few games and they still wouldn't figure out the strategy. Before we do that, it's important to do a metaphorical exercise because we're for a problem solving technique that we're gonna use and so I wanna teach you the international math salute. How many of you don't know it? All right, so here's how it works. You don't have to stand. So because you can stay in your seats but it's normally done standing. But so the way it works is you bring your arms out in front of you, okay? And then I'm gonna model it facing forward so that you don't get right and left confused. Right goes on, your right arm goes on top of your left arm. Then the next thing you do is you weave your fingers together, okay? Right, you see what I was doing, right? You weave your fingers together, okay? Weave your fingers together, wiggle your pinkies. That's important. Wiggle your pointer fingers. Wiggle your pinkies one more time and then restore, okay? Something went wrong. You weren't following directions. Let's do it one more time, okay? Arms straight out, right over left, okay? Right over left, weave those fingers. Wiggle the pinkies, wiggle the pointers, restore. So it's hard, isn't it? Okay, here's why it's hard. It's hard because you've just been faced with a problem, a mathematical problem by definition is a question that you do not know how to answer and therefore it requires investigation. So something where you're doing this section 15.3 in the textbook where you just learned a method and you have 10 things where you're basically just proving obedience, those are exercises, problems require investigation. The problem is I was able to restore my fingers and you weren't. I am not a magician. I do not have superpowers. So work backwards. This is the problem-solving technique. Work backwards. How did I end? I ended like this. So where did I have to be before that? I had to be like that. You didn't do that. You thought you did. When I said weave your fingers, most of you just thought of that digitally. You just took the phrase weave fingers and what you did was you did the easy thing where you rotated your thumbs outward going in opposite directions and then joined because that's easier on the shoulders. What I did was I rotated both thumbs in the same orientation and I practically dislocate my shoulder when I do it. It's painful for me if you're younger, it's easier. That's the secret. Working backwards, that's what it had to have been. So working backwards is an incredibly powerful problem-solving technique that's often overlooked. Always work backwards, okay? And this is again a good, this is not a sucker bet but it's just a good practical joke you can do with somebody. So what we're gonna do is we're gonna work backwards and we're also gonna do make a big breakthrough idea. Puppies and kittens is really complicated because you have to keep track of two animals. What's the proper venue for investigating a two animal situation? Graph paper. We have a kitten axis and a puppy axis and so a game state consists of a point in puppy-kitten space. This is the point representing how many kittens? Seven kittens, 10 puppies. What does a legal move now mean? If you take away puppies, you go down. If you take away kittens, you move to the left and if you take away equal numbers of both animals, you're moving in a diagonal, a 45 degree diagonal. In other words, you are moving southwest or perfectly southwest. Those are legal moves and what's the goal? Get to zero, zero. Get to the origin of your coordinate plane. That's the game. It's a two dimensional game played on graph paper now. It has nothing to do with animals, sadly. I wrote an iPad app to play this game and it allows you to toggle between beautiful pictures of puppies and kittens that my daughter drew for me and then graph paper. Most people like the pictures of puppies and kittens but the graph paper is in many ways easier to follow. So if you look at the game that was played on the screen earlier, it looked like that. We started with seven and 10. Someone took away two puppies, then took two of each, then took three kittens and then you take a whole bunch of puppies away and you end up with this winning position at two one because no matter what player A does, if A goes here or if A goes there or if A goes there or if A goes there, on the very next move, player B can then move to go to the origin. So if you present this to your opponent, you have beaten them. If you present two one or one two, it's symmetrical. You've beaten them and in fact, if you present zero zero to them, that means you've just won the game, okay? So what we're gonna do is work backwards. Starting at zero zero, that's a one game and now we just ask ourselves, how could we have gotten there in one move? Well, any of these positions would work. Anything that's all kittens, like you were talking about the crazy cat lady. If we just had a pet shelter, that was just the cat shelter. It had 120 cats, your mood would be go all the way down there and you win. But you also could have all puppies or you could have the, what other game state? Equal numbers, you could have a million cats and a million puppies, in one move you could win the game. So these red zones here are all the places where in one move you could move to a green location. Well, what's the first places that haven't been colored, one two and two one? Because by definition, they weren't colored, which meant you couldn't get to green in one move, which meant in one move where must you go, red. These things, you have to go red in one move. No matter where you go, you're gonna hit a red point. Remember, all of these points are red, all of these points are red, all of these points are red. And so these, this point here is one where no matter what you do, you're gonna hit red. You have no choice but to hit red. Now I'm gonna work backwards from them. I'm gonna ask, what can get to them in one move? So what could get to this little innocent thing in one move? Go east, go north, go northeast. We continue like that and do the same thing for this one over here. And we now have lots and lots of red points and again, these are, I'm writing in with lines but they're really just points that I've colored red that you can think of. Every single one of these will go to a green in one move. And so anything that's not colored can't go to a green in one move. So this one here is not colored, which means it has to go to a red in one move. Those are your new magic points. And if you remember, if you were really observant, you might, do you remember when you lost that classic game that we played for Bresiana? My penultimate winning move was I hit you with a three five. Once I hit you with a three five, I knew that you couldn't win. That if, cause I hit you with a three five, which meant that no matter what you did, let's say you did that, then I'd hit you with a one two or a two one or if you did that, I just go straight to the origin. No matter, once I present someone with a green, no matter what they do, they move to a red. From a red, I can move to a green. From a green, they have to move red. From a red, I can go green. I keep going green until I hit the origin. So we can continue doing this process just by coloring and we can get more and more green points. It's, again, if we were doing this in a classroom, I wouldn't just show you the answer because at this point you're probably saying, I'm a little confused. I wanna do this on my own. I'm gonna do it for you. I apologize. And you get seven and four and four and seven. And then you do it a little bit more and you get six and 10. Now we can make a table of these. And what we get is for each of the differences, so going back in here, like here's a way to play, here's, if you just knew those green points here, here's a way to play puppies and kittens. This point here is 10 and six, the difference is four. So suppose the game begins with a difference of four and in fact the game that we played was a difference of four. It was 2016. I could have, if I was the first player and you let me be first, I could have moved instantly from 2016 to 10-6 and then the game's over because no matter what my opponent does, she will move to a red, then I'll move to a green. She has no choice but to move red. I can move to a green. I can always make sure that my move is a green and eventually it'll be this one. So we have a table where you can work out the strategy up to a difference of, I included this very last one of five where it's eight and 13 and now when I was first discovering this about 10 years ago, I noticed one and two and three and five and then I said, oh I get it because I'm sophisticated and what do you sophisticates say when you see one, two, three, five? Fibonacci, okay, then I saw four, seven, I said no, I'm stupid, it's not Fibonacci. Then I worked out to six, 10, not Fibonacci and then so I realized I don't know what's going on and then I got eight, 13, I said whoa, not only are those Fibonacci but the difference is Fibonacci, five, eight, 13 and so maybe Fibonacci is involved, okay? So you don't actually need graph paper to do this and I hate to say that because I love using graph paper, I love visual techniques but if you think about how the actual picture came about going back to the graph paper here, so starting with this point here, this is a 10 and a six. If I go this way and I go this way, I'm gonna eat up all the coordinates involving 10s or sixes, same thing here, 10s or sixes. So they'll never be, so all the red points or all the 10s and sixes other than these two points are gonna be colored red. Likewise, if I go this way, the diagonal, it'll be all the differences of four. They'll never be a difference of four or a six or a 10 ever again, ever. So the next number has to be a number that's not a six or a 10. What's the first number that's not a six or a 10 in this sequence? One, two, three, four, five, six, seven. It has to be eight and the new difference is five. No graph paper needed. Now what? What's the first number you don't see in this sequence? One, two, three, four, five, six, seven, eight, nine and so the difference is six. So 915 is now a magic point. And you could complete that, you could keep doing this table. If you just go up to about maybe eight or nine of them, you could then go down to NYU or up to Columbia or down to Washington Square Park and make money playing people who think they're smart this game. But wait, there's more. So I wanna conclude with something really amazing which is, so one, the point is some simple, just working backwards analysis allows us to analyze a game that's deceptively simple. It seems really simple, but no one can analyze it in real time. So if you play somebody who considers themselves to be really smart, you'll beat them just because you've had this analysis. But there's more to it because these numbers, remember Fibonacci? Fibonacci seems to be lurking in here. Therefore, the formula should involve Fibonacci numbers. And here's the formula. So I'm gonna share with you the formula. I'm not gonna explain it, but I happen to have some homework problems only for hardcore people, that a sequence of about a half dozen problems where if you solve them, you'll understand this formula. So you first need to know the floor function, which is just round down. So like floor of pi is three, okay? Floor of the square root of two is one, okay? And then you need to know your favorite number, fee. And fee, if you think about Fibonacci numbers, who's fee? Say it out loud. Say it louder. What's the Fibonacci weird number? The golden ratio, fee is the golden ratio, one plus the square root of five over two. If you take the number, one plus the square root of five over two, and you multiply it by n, then floor it, and then add n to it, that will be the oasis. For example, suppose you're playing in a tournament, puppies in kitten tournament, and it begins with a, and you notice that the opening move, the starting position is 200 puppies and 300 kittens. You go, oh no, that's a difference of 100. Well, just multiply fee by 100, what do you get? 161.8, take the floor, 161. So 161, 261 is the green point. You move right there, and then you have a one game. Of course, you need to know the other green points, but if you have your calculator, you can find them. The question is, what in the world does the square root of five have to do with this completely simple game involving just the simplest ideas of, you know, equal? The hardest math here is subtraction and making sure two numbers are equal. Why is the square root of five involved? So I'm gonna leave that to you because I don't wanna give you all the answers. Again, there's homework for those of you who want it. And again, as I promised, well here's the morals of the story, non-intransitivity, and these are stolen images so I don't want to dwell on them. And then the notion of symmetry, but not exact symmetry. But more important is my email address. So if you have any questions, just feel free to contact me. So is there time for any more questions or are we running over? I think we have time for a couple of questions. So the first game, every flip was two possibilities. With the dice? Yes. No, the pennies. Yeah, that's right, heads or tails, yeah. So with that game, there's two possibilities. Does it also work for rock scissors paper? Rock scissors paper is the, I guess, I should have mentioned that, it's the classic example of an intransitive game. And then of course there's rock, paper, scissors, lizard, spock is the other intransitive game. But it's, you don't have a probability thing there. So you can't really model it in that way. But a different question would be, can you come up with the same thing where instead of flipping a two-sided coin if you flipped a three-sided coin? And the answer is yes. And it's very complicated, but the mathematics has essentially been worked out. Hi, in the cat and mouse game, what did you mean by seizing the tempo? So seizing the tempo meant that the problem was the tempo was off for the cat. In that the cat, whenever the cat was moving, the cat was moving to the wrong color. If the mouse was at color, the black color, then the cat was moving to the yellow color. If the mouse was at the yellow color, then when it was the cat's move, the cat was moving to the black color. And so the cat was just off by one because what's happening is every move, the cat changes color. And so if the cat just switches the tempo, it's sort of like a metronome. It's sort of like the metronome's going cluck, cluck, cluck, and the cat just grabs the metronome and stops it for a second. And then the metronome is in sync. That's what I mean by seizing the tempo. Can you explain why NIM balancing works in a similar game to puppies and kittens? You mean the NIM game itself? Yeah. Yeah, so I deliberately didn't talk about NIM because I hate that game. I don't hate it, but I find it very hard to understand, to explain it to students. And if those of you who don't know NIM, the NIM game works just like puppies and kittens except you don't have an equality rule, but you have more than two animals. And when it's your turn, when it's your turn, you're allowed to take at least one animal from at least one pile. And the goal is to, is that right? Or just one at a time? At least one. At least one. And, but from only one pile. You can only take from one pile because otherwise you could just take them all at once. So you take as many animals as you want from one pile, but you might have like six piles. And so it's a, but you don't, there's no rule about taking two different types of animals. So on one level it's simpler, but with more piles it becomes a harder problem to analyze. But it's in the end the same game. If, what you do is you abstractly have a game state, which is, in my case it was graph paper. In the case of NIM, if it's three pile NIM, it's really like three dimensional space maybe. And you can color the points in the space, red or green, using the same basic rule. And so it turns out that on some level all of these games are kind of the same. The strategy is to find an easy way of determining what is an oasis, what is a green point, and what is a red point. And that's where the games get interesting. But so the NIM game isn't that much different from this as a game, but what makes this game interesting is that the strategy leads to the golden ratio. And that's what I think is wonderful about it. So let's give Paul a hand once again.