Monday, August 23, 2010

Mathematics behind Tick-Tack-Toe


I am pretty sure almost everyone would have played this game. It either ends up in a draw or the person who is a stupid loses. The winner need not be intelligent,but, the loser has played the game very badly indeed. What is the logic behind winning ?

1. You make the first move
2. The person on the other side is dumb. (Yeah !!!)

This is a game where one can never lose. Since, this is a game where one can never lose, it is not a game at all.

When will the person win you ask ?

When the 'O' is in the centre and the 'X' is in any position other than diagonals. If the second move of X is in any position other than the diagonals, he is bound to lose.










You can never lose .... You can call a draw when the second move is on diagonals....


I had played this game endlessly when we were in school trying to prove the opponent that I was smarter than him. A few times I used to win and a few times the person on the other side used to win. Now, i realized that we weren't trying to prove who is smarter, but , we were trying to prove who was dumb. 

The Logic :

There are initially 9 places you are allowed to choose. 8 lines totally available to both the players to complete.




Step 1 :
The player1 (Green) who goes first chooses the center point, because he has the possibility of completing at least one of the 8 lines. Any other point he chooses he would be giving himself a lower probability of winning.

Step 2:
The second player(Red) has the remaining 8 points at his disposal. The move that he makes decides the fate of the game. If he chooses any point other than the diagonal he will lose. By choosing the point on the diagonal what the player2 is doing is undoing 3 of the winning lines.

Smarter move
dumb move

choosing any other point not on the diagonal would eliminate not 3 but only 2.






Step 3: Assuming player2 has made a smart move., now the player 1 has only 4 lines left to be completed. His next move will most obviously be directed towards making two straights so that he can finish off the game. But, unfortunately those moves can easily be blocked by the opponent.



 : Target Win :







Step 4: Easily these moves can blocked leaving the player1 with no option but a draw. But, the dumb move always presents the player1 with an opportunity to win for sure. 



The figures show the steps that will be followed by the player1 to actually win the game. Now after the last step, player2 is left with one move but to block 2 of the winning lines of player1. This would never come into the picture if the player1 had chosen the diagonal point as the first move. The game of tick-tack-toe is NOT A FAIR GAME. Every game, any move of any two players, for the first two moves can be such that the game results in a draw and not a win. 



Now, are other games too similar to the ticktacktoe.Can the result of the game be determined even before the game is played. Are all games such that, it's not the smartness of a person is measured but, the dumbness of the opponent. If the opponent is aware of the symmetry of the game, he could never lose. 

One version of complete stupidity is given here :


I really can't believe people think of this game as A REAL MATHEMATICAL PUZZLE. It is something of no practical importance and is a waste of time spending more time that the time required to read this blog entry. 
:-D .. Hahaha 


4 comments:

  1. There is a whole lot of math here...

    imagine, what if we had a n x n board game with k people playing the game?

    learning to play this game is as good as learning to drive a car. Take a look at ozgur's paper on tic tac toe

    ReplyDelete
  2. hey .... couldn't find the paper ... Where to find it ??

    ReplyDelete
  3. Hi,
    what if the box was not bounded? meaning what if there were infinite set of squares?

    ReplyDelete
  4. Your post is based on starting with centre. How about starting at one of the diagonal points? It is possible to play that way too and presents interesting opportunities

    ReplyDelete