 Welcome to this session. So in this session we come back to the game take away introduced in the previous session. In the previous session we played this game and one of the player has won. But the question that reminds here is that is there an optimal way of playing? So what is an optimal way? Let us say if player 1 can follow a strategy such that whatever player 2 does if player 1 is going to win then of course that is player 1's optimal strategy. So similarly if player 2 can find a strategy if he plays that whatever player 1 plays player 2 is going to win the game then that will be optimal strategy for player. Now in this game who is going to win? So let us check. So we will come back to the take away game. So as I said there are 21 we have used the sticks and the moves is basically taking 1, 2, or 3 sticks then who wins? Who wins is the question or who has winning strategy? So this is the problem that we would like to see it. So to give a motivation to the proof let us think there are only one stick obviously player 1 wins. If there are 2 sticks player again 1 wins because he can remove both the sticks similarly if 3 sticks are there again player 1 wins 4 sticks. Now situation changes. Whatever player 1 does he may pick 1, 2, or 3 there is always one stick at least maximum of 3 sticks remaining on the table therefore in this case player 2 will win. What about 5 sticks? If there are 5 sticks so player 1 would like to pick 2 sticks in the first this thing and then player ok let us be careful. So if there are 5 sticks now let us look at player 1 let us use the blue for player 1. So player 1 can take 1 stick or 2 sticks or 3 sticks. Now if he picks 3 sticks there are only 2 remaining and then player 1 can immediately take this. So if naturally the player 1 certainly would not like to pick 3 sticks. So he will let us say if he picks 2 sticks then once again there are only 3 sticks remaining therefore player 2 will remove immediately. So that is also not good. So player 1 will only pick this one only one stick then it goes to a position where there are 4 sticks that goes to this one and we know that there when there are only 4 sticks we know that the player 2 wins. Now let us look at the following thing when I say player 2 wins is it the person who is it is not about the person it is the person who makes the second move. First person to make a move is the player 1 the first person second person to make move is the second player. So if you look at that one for the player 1 with 5 sticks he will always pick 1 stick and then there are 4 sticks then the player 2 will pick 1, 2 or 3 and then player 1 again pick. So in this case it becomes a player 1. Now you can check this thing with 6, 7 also the same thing happens but with 8 sticks player 2 again wins. So now this should give us a clue. So what is the theorem what can we say it in if there are n sticks then if there are n sticks the winner is decided by the following is n a multiple of 4 or not. Now if n is a multiple of 4 then going back to this thing we can see that the player 2 is winning and if n is not a multiple the player 1 is winning. So that is essentially the theorem. So let us write down the theorem. Suppose we start with n sticks then the first player has a winning strategy n is not a multiple of 4. If n is a multiple of 4 then player 2 win. When I say wins means player 2 has a winning strategy. How do we prove this? The proof of this actually requires a very important proof technique in mathematics called principle of induction. So what this principle of induction says is that let us say let me write down the state what exactly this induction principle is. Suppose let S be a subset of natural numbers and with the following thing properties 1 belongs to S, second is k belongs to S implies k plus 1 also belongs to S. Then the principle of induction says that S is nothing but set of natural numbers. So in fact this is a very, very powerful proof technique. In fact several beautiful results can be proved using this simple idea. So we will use this technique for proving our result. So let us see how we go for. So as I said we will start with if n is equals to 1, 2, 3 we know that player 1 has a winning strategy. Let me abbreviate saying that winning strategy, player 1 has a winning strategy. If n is equals to 4 we know that player 2 has a winning strategy. We have seen this already. Now let us assume the theorem is true for all k less than n. By the principle of induction we need to show that theorem is true n. How do we prove this? So the proof is very simple. So because n is a number positive number so we can always say that when I divide by n there is a reminder and quotient so we can use this division arithmetic and say that n is nothing but 4a plus b where b is anything between 0 and 3. So let us see there is a possibility. If b is not equals to 0 let us consider if b is not equals to 0 means what let us go back to this one if b is not equals to 0 means this will be n is equals to 4a plus some reminder that means n is not a multiple of 4, n is not a multiple of 4. Let us look at the this example that we have seen here, look at it. Here if something is involved if let us look at this 5 case if there are 5 sticks what will happen? The player 1 has removed only one stick so that 4 sticks are still there. So that is exactly the idea here. So what he will do is that player 1 will remove number of sticks. So when he removes b number of sticks what will happen let us look at it. So let me write it. So basically 0, 1, 2, 3 and 4 let me put here 5, 6, 7, 8 let me put here 9, 10, 11, 12 of course let us say. Now what I am saying that suppose let us say the player 1 if n is 9 he is removing only one stick and he comes here. Now player 2 can remove either one stick or 2 sticks or 3 sticks and then player will always remove one stick and come to this one. So in each when he removes b what happens is that the position I mean the number of sticks becomes a multiple of 4 that is the idea here. Now player 2 will remove some sticks some number of sticks that means it again he will bring down this that means player 1 is basically trying to bring to a multiple of 4 whereas player 2, player 2 smooth necessarily makes it non-multiple let me write it a 4. So each time player 1 will make a move so that the number of sticks will be a multiple of 4 then the player 2 smooths disturb this and he brings to a non-multiple of 4 and with this process if you really look at it all it goes down every time whoever makes a move the number of sticks go down and eventually in fact this itself will give an idea but then we need to use this principle of induction what is really happening is that look at this one player 1 has brought to a multiple of 4 that is let us say 4A in this case. Now remember 4A is less than n and by the induction hypothesis we know that if K is less than n as I said here if K less than n the result is true it depends on the multiple. So if I use that idea 4A is a multiple of this thing the player whoever is making the first move with the number of sticks at 4A that guy is loser so at 4A the second player is going to make the move so therefore he will be a loser and this leads to player 1's win. So this is a very very simple idea it depends on the principle of mathematical induction and we are able to prove this simple result in fact this completes the proof. So let us really look at the proof how we did it the entire thing depended on this fact that we are looking at the game we are removing either 1 or 2 or 3 sticks and this is the whole idea. Now because this actually forced us to consider the multiple of 4 so let us that is exactly here 1, 2, 3 sticks player 1 is winning if there are 4 sticks player 2 is winning and then 5, 6, 7 again player 1 and that is the theorem. So the entire idea depended on 1, 2, 3 this thing. Now let us also ask the following question instead of 1, 2, 3 let us take I think something else. So now let us take that the moves can be anything from 1 to 4 sticks. Now if you we go back to the idea of the proof we can immediately say that if n is a multiple of 5 then player 2 will win otherwise player 1 will win. So this is a interesting thing about this one. So now actually this game this proof introduces some important ideas related to this game. So let us look at this once again. So it again will once again go back to this definition of a combinatorial game. So from this example we can easily see that combinatorial games have perfect information. This is a important fact. So what this perfect information means is that both the players know what is happening in the game. So there are no incompleteness of the information. So the perfect information is a very, very important thing. And the another thing would like to say is that there are no chance elements. What I mean is that there are no moves which take certain randomness. Every move is fixed. So all the moves if you really look at it everything is fixed. There are no randomness involved. Let us look at another thing. As I said here this is where typically there are no draws. So just to recap no draws available. So we will initially we will look at the games having these properties and then how do we really define. So now here is where the take away game helps us to go further. How it is there? So let us see. As I said the take away game is determined by the number of sticks. So this is nothing but the position. We can call this as a position. Position of the game is nothing but the number of sticks in the take away game. So then so let us look at it. So initially if I start with 21 then basically player 1 can from 21 it can go to 20 or it can go to 19 or it can go to 18. From 20 it can go to 19 it can go to 18 or it can go to 17. Now from 19 it can go to 18 or it can go to 17 or it can go to 16. Now look at it, so the both the positions here let us say whether player 1 is there on in the 17 or player 2 it makes no difference for them. From 17 they can only go to 16 or 15 or 14 whether it is a player 1 or player 2 it makes no difference and from 17 they can go to any of these 3 positions. So in that sense the players are not there is no distinction between the moves for them. Contrary to this one look at chess positions the in the chess game the white the places that white can occupy the blacks need not blacks may not be able to do it. So this game is very different from this take away game ok. So what is this, these games are known as impartial games and this chess and this thing are called partisan games. We will come back to this partisan games later but initially we start with impartial games. So let me tell you once again what is an impartial game. In impartial game is a commutorial game where the moves there is position there is no difference between the players whoever occupies that particular position the moves available to them are same one and the same ok. So one more thing let us look at it 4 if the position is at 4 this let us say is a sub we are still arguing with the take away game only if the number of sticks available is 4 and then let us say player x is making a move ok the position of that number of sticks available is 4 who is going to win is the player x let us say x could be 1 or 2 I am not saying who it is ok. So who is going to win will x win obviously x cannot win x cannot win let me write player x cannot win if the position is 4 what does that mean ok the other player is going to win player x is the one who makes the move now player x has to make the move at 4 that means he can make he can remove 1 2 or 3 but then immediately the next player the other player is going to win. So here what brought to 4 which player the previous players move has brought this to 4. So therefore 4 is a winning position for the previous player and 4 is a losing position for the player to make a move. So this is a this position is known as P that means the previous player wins from this position now look at this another position which is 5 if it is at 5 who is going to win player let us say if you start with play with 5 the player the whoever is making a move he is going to the winner 5 somehow it came to 5 and from 5 player whoever is playing there he will remove 1 and then it goes to 4 and this thing that means this is a player to make the move is going to be winner ok the player to make a move is the winner ok. So this position is called n basically the next player to make a move and the P is basically previous player to make a move the next player to make a move and previous player to move. Now with this we can easily start introducing more terminology in this thing let us say 1 is basically a is it P or so where the next player to make a move is winning here this is here n n is the answer is again n like that we can do what about 21 ok I have written 25 here 25 is not a multiple of 4 if you recall the theorem because 25 is not a multiple of 4 it is the first player whoever is going to make the move is winner this is a n position. So in this P and n positions are very important in combinatorial games. So we will discuss about this P and n positions further in the next session.