• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

somewhat like tic-tac-toe

radosr

Baruch MFE Faculty
Joined
7/18/07
Messages
660
Points
73
Alice and Bob play a game on an infinite grid of unit squares. Alice starts and chooses a square and marks it with an X. Bob then chooses a square and marks it with an O. They continue playing until one of them has marked a row or a column of five consecutive squares with their symbol; this player is the winner. (Until Alice or Bob gets five in a row, the game is not won.) Can Alice, who goes first, always win?
 
What a question...The answer is no. I have played this game a lot when studding at a high school. One correction in rules: Diagonal fulfillment is also possible. If it does not matter, anyway, you can not always win regardless you start first or not.
 
you're right, the answer is no... in fact, Bob can always block her from winning.

this is one of those problems where you have to find the appropriate tiling. the one that works here is, divide the grid into 2x2 squares, then tile each 2x2 square with two dominoes, alternating horizontal and vertical tilings in a checkerboard pattern. then any group of 5 consecutive unit squares contains a complete domino, so all Bob has to do to block Alice is play an O in the same domino that Alice just played in: any 5 in a row that contain an X will also contain an O.
 
It can be possible in case of limited scenarios like 3x3 cells. Then it can be depended who starts. But in unlimited scenarios where you have to go on until you fill the column/row/diagonal with 5 X/O it is impossible to state one standard way which guarantees you winning if you start first.
 
It can be possible in case of limited scenarios like 3x3 cells. Then it can be depended who starts. But in unlimited scenarios where you have to go on until you fill the column/row/diagonal with 5 X/O it is impossible to state one standard way which guarantees you winning if you start first.
Even in a 3x3 case (i.e. TicTacToe) the player who goes first is not guaranteed a win. Just guaranteed not to lose.
 
Even in a 3x3 case (i.e. TicTacToe) the player who goes first is not guaranteed a win. Just guaranteed not to lose.

Yes that's what I meant. In 3x3 rational game you either win or match ends even.
 
Is it possible for us to come up with a strategy for Bob to block Alice if five X along the the diagonal line is considered a win?

you're right, the answer is no... in fact, Bob can always block her from winning.

this is one of those problems where you have to find the appropriate tiling. the one that works here is, divide the grid into 2x2 squares, then tile each 2x2 square with two dominoes, alternating horizontal and vertical tilings in a checkerboard pattern. then any group of 5 consecutive unit squares contains a complete domino, so all Bob has to do to block Alice is play an O in the same domino that Alice just played in: any 5 in a row that contain an X will also contain an O.
 
Even in a 3x3 case (i.e. TicTacToe) the player who goes first is not guaranteed a win. Just guaranteed not to lose.

If you are still on the original topic of a game played on an infinite grid, then you are wrong if you mean getting 3 in a row/column. Then as Tsotne mentioned one player has a winning strategy:

Alice (1st player, or X) has an easy winning strategy: On her second move she places an X adjacent to the first so that either the row or column formed contains no O. For example,

... XX ....
... O

How about the game where 4 consective marks are needed to win?
 
Back
Top