1 00:00:00,012 --> 00:00:02,307 Okay. Welcome back. 2 00:00:02,307 --> 00:00:07,251 Still week six, wow. One more week to go. 3 00:00:07,251 --> 00:00:15,237 So, here we're in impartial games, reversible moves and we'll have a few 4 00:00:15,237 --> 00:00:20,150 examples and MEX. But I think that it's going to be two 5 00:00:20,150 --> 00:00:23,012 pieces. So, let's take a look at this. 6 00:00:23,012 --> 00:00:28,914 So, let's talk about impartial games. Impartial game is where like Nim, both 7 00:00:28,914 --> 00:00:32,491 left and right have the same possible moves. 8 00:00:32,492 --> 00:00:38,521 Not like five which gives five moves to the left and no moves to right. 9 00:00:38,522 --> 00:00:43,215 Or minus five, which gives five moves to right but none to left. 10 00:00:43,215 --> 00:00:48,997 Five and minus five are partisan games. They're games where it depends on whether 11 00:00:48,997 --> 00:00:52,425 you're left or right. Whereas, Nim is impartial. 12 00:00:52,425 --> 00:00:58,260 In general, a game is called impartial if every left move is also a right move, and 13 00:00:58,260 --> 00:01:03,562 every right move is a left move. And every move in every position is also 14 00:01:03,562 --> 00:01:07,336 an impartial game. So, let's look at an example. 15 00:01:07,336 --> 00:01:10,537 Okay. Now, when we write down the impartial 16 00:01:10,537 --> 00:01:16,171 games, we don't have to say what the left moves are and the right moves are. 17 00:01:16,171 --> 00:01:19,361 All we have to do is say what the moves are. 18 00:01:19,361 --> 00:01:25,531 This is because every left move is a right move and every right move is a left move. 19 00:01:25,531 --> 00:01:32,920 So, let's look at the game where the moves are to Nim heap for size zero, size one, 20 00:01:32,920 --> 00:01:36,661 size two, size five or size seven. Okay. 21 00:01:36,661 --> 00:01:44,420 So, my claim is, is the same as this. So, so think of this as a Nim heap for 22 00:01:44,420 --> 00:01:53,197 size three, that you can add two coins to or you can add let's see three, three, 23 00:01:53,197 --> 00:01:58,352 four coins to. So, so start with start with a Nim heap 24 00:01:58,352 --> 00:02:04,292 for size three, and either you remove one or more coins or you add two coins or you 25 00:02:04,292 --> 00:02:07,006 add four coins. That's this game G. 26 00:02:07,006 --> 00:02:12,596 Now if you add two coins, I'll just take them away and put them in my pocket. 27 00:02:12,596 --> 00:02:18,536 And if you add four coins, I'll just take the, take, take the four coins and put 28 00:02:18,536 --> 00:02:22,453 them in my pocket. So the, the move to star five, to five 29 00:02:22,453 --> 00:02:27,997 coins, which you get by adding two coins and the move to star seven, which you get 30 00:02:27,997 --> 00:02:33,714 by adding four coins, is irreversible. The other player just takes them away and 31 00:02:33,714 --> 00:02:37,488 pockets them. And if they're like something really 32 00:02:37,489 --> 00:02:42,532 exotic like a, like a rare year of the Morgan Dollars or something, it might be 33 00:02:42,532 --> 00:02:45,546 worth something, it might be worth something. 34 00:02:45,546 --> 00:02:49,953 In, say, grade 65 or so, that would be worth a lot of money. 35 00:02:49,953 --> 00:02:54,417 So , so, if you add coins, the other player can just take them away and you're 36 00:02:54,417 --> 00:02:58,224 back to where you started. What this says is, this game here is the 37 00:02:58,224 --> 00:03:01,949 same as this game here. But this game here is the same as just the 38 00:03:01,949 --> 00:03:05,447 Nim heap of size 3. Which you can then move from Nim heap of 39 00:03:05,447 --> 00:03:08,087 size 3 or through a Nim heap of size 2, 1, or 0. 40 00:03:08,087 --> 00:03:14,602 And we note here that 3 is the, what's recalled the minimal excluded number out 41 00:03:14,602 --> 00:03:18,799 of 1, 2 and 3. That is, you look at 1, 2 and 3 and look 42 00:03:18,799 --> 00:03:22,403 at the first natural number that's missing. 43 00:03:22,403 --> 00:03:29,532 And in general, what happens, so let's take a look at some examples, of, of Mex. 44 00:03:29,532 --> 00:03:33,836 And we'll leave that for you to compute for next time. 45 00:03:33,836 --> 00:03:38,256 And then we'll have some, go back to examples of games. 46 00:03:38,256 --> 00:03:42,474 So the minimal excluded of 1, 3, 2, 1, 17. Let's see. 47 00:03:42,474 --> 00:03:45,558 One is there, two is there. I'm sorry. 48 00:03:45,558 --> 00:03:49,276 0 is there, 1 is there, 2 is there, 3 is there, 4 isn't. 49 00:03:49,276 --> 00:03:52,790 So it's 4. The minimal excluded of this is, well, 0 50 00:03:52,790 --> 00:03:54,546 is not there. So, it's 0. 51 00:03:54,546 --> 00:03:59,192 And the minimal excluded of this is 5, if I did this correctly. 52 00:03:59,192 --> 00:04:03,114 And so here's the minimal excluded for you to get. 53 00:04:03,114 --> 00:04:09,388 Now, it occurs to me that I didn't do the problem from last time. 54 00:04:09,389 --> 00:04:14,089 And so let me just leave up some numbers here. 55 00:04:14,089 --> 00:04:18,464 If we take a Nim heap of size 11, 3, and 10. 56 00:04:18,464 --> 00:04:22,177 11, 13, and 10. Write them out in binary. 57 00:04:22,177 --> 00:04:27,324 There's one here, go up to the one here. Circle that. 58 00:04:27,325 --> 00:04:33,053 101, take 101 Nim sum 100. We get what do we get? 59 00:04:33,053 --> 00:04:35,171 We get 001. So, the winning move is here. 60 00:04:35,171 --> 00:04:36,073 Just keep the 11 the same. Take the 13. 61 00:04:36,074 --> 00:04:37,337 And change it to a 1 and take the 10 and this is the same. 62 00:04:37,337 --> 00:04:52,637 So that's, that's the solution, I believe to the to the problem at the end of the 63 00:04:52,637 --> 00:04:58,323 last module. And there we have it, end of another 64 00:04:58,323 --> 00:04:59,090 module.