Tic-Tac-Toe on GraphsIntroduction Tic-Tac-Toe is a two player pencil and paper game traditionally...

49
Tic-Tac-Toe on Graphs Robert A. Beeler, Ph.D. East Tennessee State University August 15, 2015 Robert A. Beeler, Ph.D. (East Tennessee State University ) Tic-Tac-Toe on Graphs August 15, 2015 1 / 49

Transcript of Tic-Tac-Toe on GraphsIntroduction Tic-Tac-Toe is a two player pencil and paper game traditionally...

  • Tic-Tac-Toe on Graphs

    Robert A. Beeler, Ph.D.

    East Tennessee State University

    August 15, 2015

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 1 / 49

  • Introduction

    Tic-Tac-Toe is a two player pencil and paper game traditionallyplayed on a three by three grid since at least 1884. Players alternateturns placing marks on the grid.

    The first player to have three of their respective marks in ahorizontal, vertical, or diagonal row wins the game.

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 2 / 49

  • Introduction

    In the traditional game, perfect play from both players will result in adraw each time.

    In addition to the simplicity of the game, this makes Tic-Tac-Toeideal for teaching children the basics of strategic play.

    However, generalizations of the game are much more complicatedand often unsolved. See Beck [1] for more information on variationsof Tic-Tac-Toe.

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 3 / 49

  • Generalizing to Graphs

    As with the traditional game, the players take turns placing theirrespective marks on the vertices of a graph G .

    The first player to place their marks on vertices x , y , and z such thatxy ∈ E (G ) and yz ∈ E (G ) wins.

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 4 / 49

  • Some Useful Notes

    A strategy is one of the options available to a player where theoutcome depends not only on the player’s actions, but the actions ofothers.

    A strategy is winning if the player following it must necessarily win,regardless of the actions of their opponents.

    A drawing strategy is one in which the player following it will force adraw, no matter the actions of their opponents.

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 5 / 49

  • Some Useful Notes

    The Fundamental Theorem of Combinatorial Game Theory (see forexample Siegel [3] and Wells [4]) states that in games such asTic-Tac-Toe either one player has a winning strategy or both playershave a drawing strategy.

    Per Williams [6], we can assume that both players will play perfectlyand will play for the best possible outcome that they can achievesafely.

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 6 / 49

  • Our Main Result

    In this talk, we will give simple necessary and sufficient conditions forPlayer One to have a winning strategy on a graph G .

    These conditions will be a forbidden subgraph characterization alongthe lines of Beineke’s Theorem or Kuratowski’s Theorem (see West[5] for other examples).

    We will show that both players have a drawing strategy on allremaining graphs. Explicit strategies will be provided for all graphs.

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 7 / 49

  • A Few Words About Forks

    A fork is a configuration in which one player will win on the nextturn, regardless of the actions of the second player

    X OX X

    O

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 8 / 49

  • Forks in Tic-Tac-Toe on Graphs

    As in the traditional game, executing and defending against forks iscentral to the strategy of Tic-Tac-Toe on graphs. There are fourforks that are possible:

    X

    X XX

    X

    X

    X

    X

    X

    K1,3-fork P4-fork C4-fork P5-fork

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 9 / 49

  • Graphs with ∆(G ) ≥ 4

    Result 1 If G has the star K1,4 as a subgraph, then Player One has awinning strategy on G .

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 10 / 49

  • Graphs with ∆(G ) ≥ 4

    Result 1 If G has the star K1,4 as a subgraph, then Player One has awinning strategy on G .

    X

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 11 / 49

  • Graphs with ∆(G ) ≥ 4

    Result 1 If G has the star K1,4 as a subgraph, then Player One has awinning strategy on G .

    O X

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 12 / 49

  • Graphs with ∆(G ) ≥ 4

    Result 1 If G has the star K1,4 as a subgraph, then Player One has awinning strategy on G .

    X

    O X

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 13 / 49

  • Graphs with ∆(G ) ≤ 2

    Result 2 If the maximum degree of G is at most 2, then both playershave a drawing strategy on G .

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 14 / 49

  • Graphs with ∆(G ) ≤ 2

    Result 2 If the maximum degree of G is at most 2, then both playershave a drawing strategy on G .

    X

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 15 / 49

  • Graphs with ∆(G ) ≤ 2

    Result 2 If the maximum degree of G is at most 2, then both playershave a drawing strategy on G .

    X O

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 16 / 49

  • Graphs with ∆(G ) ≤ 2

    Result 2 If the maximum degree of G is at most 2, then both playershave a drawing strategy on G .

    X O

    X

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 17 / 49

  • Graphs with ∆(G ) ≤ 2

    Result 2 If the maximum degree of G is at most 2, then both playershave a drawing strategy on G .

    X O

    XO

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 18 / 49

  • Two Graphs with ∆(G ) = 3

    Result 3 Suppose that G has H1 or H2 (given below) as a subgraph.It follows that Player One has a winning strategy on G .

    H1 H2

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 19 / 49

  • Two Graphs with ∆(G ) = 3

    Result 3 Suppose that G has H1 or H2 (given below) as a subgraph.It follows that Player One has a winning strategy on G .

    X X

    H1 H2

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 20 / 49

  • Two Graphs with ∆(G ) = 3

    Result 3 Suppose that G has H1 or H2 (given below) as a subgraph.It follows that Player One has a winning strategy on G .

    O X O X

    H1 H2

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 21 / 49

  • Two Graphs with ∆(G ) = 3

    Result 3 Suppose that G has H1 or H2 (given below) as a subgraph.It follows that Player One has a winning strategy on G .

    O X X O X X

    H1 H2

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 22 / 49

  • Other Graphs with Maximum Degree 3?

    At this point, we need only consider graphs G such that themaximum degree is three and the graph has neither H1 nor H2 as asubgraph. The possibilities for such a graph are:

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 23 / 49

  • The “Easy Case”

    Result 4 Both players have a drawing strategy on the first graph onthe previous slide.

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 24 / 49

  • The “Easy Case”

    Result 4 Both players have a drawing strategy on the first graph onthe previous slide.

    X

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 25 / 49

  • The “Easy Case”

    Result 4 Both players have a drawing strategy on the first graph onthe previous slide.

    X O

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 26 / 49

  • The “Harder Case”

    As usual, let Pn denote the graph on the vertices v0,v1,...,vn−1.

    Let P(n, 1) denote the graph obtained from Pn by appending twopendants to v0.

    Likewise, let P(n, 2) denote the graph obtained from P(n, 1) byappending two pendants to vn−1.

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 27 / 49

  • The Case with P(n, 1)

    Result 5 Both players have a drawing strategy on P(n, 1).

    This is similar to the result for ∆(G ) = 2, except that when given anoption, Player Two takes the neighbor closest to the vertex of degree3.

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 28 / 49

  • The Case with P(n, 1)

    Result 5 Both players have a drawing strategy on P(n, 1).

    This is similar to the result for ∆(G ) = 2, except that when given anoption, Player Two takes the neighbor closest to the vertex of degree3.

    X

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 29 / 49

  • The Case with P(n, 1)

    Result 5 Both players have a drawing strategy on P(n, 1).

    This is similar to the result for ∆(G ) = 2, except that when given anoption, Player Two takes the neighbor closest to the vertex of degree3.

    O X

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 30 / 49

  • The Case with P(2k + 1, 2)

    Result 6 Player One has a winning strategy on P(2k + 1, 2).

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 31 / 49

  • The Case with P(2k + 1, 2)

    Result 6 Player One has a winning strategy on P(2k + 1, 2).

    X

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 32 / 49

  • The Case with P(2k + 1, 2)

    Result 6 Player One has a winning strategy on P(2k + 1, 2).

    X O

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 33 / 49

  • The Case with P(2k + 1, 2)

    Result 6 Player One has a winning strategy on P(2k + 1, 2).

    X X O

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 34 / 49

  • The Case with P(2k + 1, 2)

    Result 6 Player One has a winning strategy on P(2k + 1, 2).

    O X

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 35 / 49

  • The Case with P(2k + 1, 2)

    Result 6 Player One has a winning strategy on P(2k + 1, 2).

    O X X

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 36 / 49

  • The Case with P(2k + 1, 2)

    Result 6 Player One has a winning strategy on P(2k + 1, 2).

    O X O X

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 37 / 49

  • The Case with P(2k + 1, 2)

    Result 6 Player One has a winning strategy on P(2k + 1, 2).

    O X O X X

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 38 / 49

  • The Case with P(2k , 2)

    Result 7 Both players have a drawing strategy on P(2k, 2).

    By the above argument, we can assume that Player Two takes bothvertices of degree three and that Player One takes their neighbors ofdegree two.

    O X X O

    Since the path between the X’s is of even length, eventually we reacha situation like in the figure above.

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 39 / 49

  • Our Main Result (Part 2)

    Theorem

    Player One has a winning strategy on G if and only if G has K1,4, H1,H2, or P(2k + 1, 2) as a subgraph. Otherwise both players have adrawing strategy on G .

    K1,4 H1 H2

    P(5, 2)

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 40 / 49

  • Two Variations

    We also consider two variations.

    In the restricted variation, only vertices that form a K3 constitute awinning set.

    In the induced variation, only vertices that form an induced P3constitute a winning set.

    In both cases we can provide a forbidden subgraph characterization.

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 41 / 49

  • Restricted Tic-Tac-Toe on Graphs

    Theorem

    Player One has a winning strategy on G in restricted Tic-Tac-Toe ifand only if G has R1, R2, R3, R4, or T (2k + 1, 2) (arising fromP(2k + 1, 2)) as a subgraph. Otherwise both players have a drawingstrategy on G .

    R1 R2 R3 R4

    T (5, 2)

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 42 / 49

  • Induced Tic-Tac-Toe on Graphs

    Theorem

    Player One has a winning strategy on a graph G in inducedTic-Tac-Toe on graphs if and only if G contains one of the followingas an induced subgraph: K1,4, H1, H2, I1, I2, I3, I4, I5, I6, or anyelement of I(2k + 1, 2) (arising from P(2k + 1, 2)). Otherwise, bothplayers have a drawing strategy on G .

    I1 I2 I3 I4 I5 I6

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 43 / 49

  • Open Problems - The Pie Rule

    The pie rule (also known as the swap rule or Nash’s rule from Hex) isa common method for mitigating the advantage of going first [2]. Ifthe pie rule is implemented, then after the first move is made, PlayerTwo has one of two options:

    (i) Player Two lets the move stand. Play then proceeds as normal.

    (ii) Player Two “takes” that move. Player One then plays as if theywere the second player.

    What is the set of graphs in which each player has a winning strategywhen the pie rule is implemented?

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 44 / 49

  • Open Problem - Double Move Version

    As another way to neutralize Player One’s advantage, we might alsoconsider a variation in which double moves are allowed. There areseveral possibilities for variations in which double moves are allowed:

    (i) On each turn, both players place two marks instead of one.

    (ii) On Player One’s first turn, they place a single mark. On PlayerTwo’s first turn, they place two marks. Play then proceeds asnormal.

    (iii) On Player One’s first turn, they place a single mark. On eachsubsequent turn, both players place two marks.

    (iv) Player Two places two marks for every mark placed by PlayerOne.

    For each of the above possibilities, determine necessary and sufficientconditions for each player to have a winning strategy on a graph G .

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 45 / 49

  • Open Problem - Full Play Convention

    Suppose that we allow play to continue after one player has captureda P3 (this is known as full play convention in [1, 3]).

    (i) What is the set of graphs in which Player One cannot preventPlayer Two from capturing a P3?

    (ii) What is the set of graphs in which Player One can preventPlayer Two from capturing a P3 only at the expense of capturingtheir own?

    (iii) What is the set of graphs in which Player One can both capturea P3 and prevent Player Two from capturing a P3?

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 46 / 49

  • Open Problem - Misère Version

    In a misère version of Tic-Tac-Toe, the first player to complete a (notnecessarily induced) P3 loses. What are the necessary and sufficientconditions for each player to have a winning strategy on the misèreversion of Tic-Tac-Toe on graphs?

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 47 / 49

  • Open Problem - Other Subgraphs

    What if we were to consider other subgraphs (induced or otherwise)as our winning sets? In particular, if we were to generalizeConnect-Four to graphs, then we would likely assume that bothplayers were trying to capture a P4. Likewise, we could generalize thisfurther by assigning each player a family of graphs (which need notbe the same for both players). The first player to capture any graphin their respective family wins.

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 48 / 49

  • References

    József Beck.

    Combinatorial games, volume 114 of Encyclopedia of Mathematics and its Applications.Cambridge University Press, Cambridge, 2008.Tic-tac-toe theory.

    Cameron Browne.

    Hex strategy: making the right connections.A K Peters, Ltd., Natick, MA, 2000.

    Aaron N. Siegel.

    Combinatorial game theory, volume 146 of Graduate Studies in Mathematics.American Mathematical Society, Providence, RI, 2013.

    David Wells.

    Games and mathematics.Cambridge University Press, Cambridge, 2012.Subtle connections.

    Douglas B. West.

    Introduction to graph theory.Prentice Hall Inc., Upper Saddle River, NJ, 1996.

    J. D. Williams.

    The compleat strategyst.Dover Publications, Inc., New York, second edition, 1986.Being a primer on the theory of games of strategy.

    Robert A. Beeler, Ph.D. (East Tennessee State University )Tic-Tac-Toe on Graphs August 15, 2015 49 / 49