arxiv: v4 [math.co] 1 Aug 2016

Similar documents
Vertex Deletion games with Parity rules

arxiv: v1 [math.co] 7 Oct 2010

arxiv: v2 [math.co] 11 May 2016

Finding a winning strategy in variations of Kayles

EDGE MAXIMAL GRAPHS CONTAINING NO SPECIFIC WHEELS. Jordan Journal of Mathematics and Statistics (JJMS) 8(2), 2015, pp I.

Winning Positions in Simplicial Nim

arxiv: v1 [cs.ds] 20 May 2016

Math 170- Graph Theory Notes

A Nim game played on graphs II

On the Relationships between Zero Forcing Numbers and Certain Graph Coverings

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE

An Eternal Domination Problem in Grids

Bounds on the signed domination number of a graph.

Trail Making Game. Hyun Sung Jun Jaehoon Kim Sang-il Oum Department of Mathematical Sciences KAIST, Daejeon, , Republic of Korea.

EDGE-COLOURED GRAPHS AND SWITCHING WITH S m, A m AND D m

CHAPTER 2. Graphs. 1. Introduction to Graphs and Graph Isomorphism

Basic Combinatorics. Math 40210, Section 01 Fall Homework 4 Solutions

Chomp the Graph. Research. treet. road. Sam Magura, Vitchyr Pong, Elliot Cartee, Kevin Valakuzhy. Scientific

Finding a -regular Supergraph of Minimum Order

Chomp on Graphs and Subsets

Graph Theory Mini-course

A Reduction of Conway s Thrackle Conjecture

Disjoint directed cycles

Edge Colorings of Complete Multipartite Graphs Forbidding Rainbow Cycles

Some relations among term rank, clique number and list chromatic number of a graph

A graph is finite if its vertex set and edge set are finite. We call a graph with just one vertex trivial and all other graphs nontrivial.

PACKING DIGRAPHS WITH DIRECTED CLOSED TRAILS

THE GROUP OF SYMMETRIES OF THE TOWER OF HANOI GRAPH

Discrete Applied Mathematics. A revision and extension of results on 4-regular, 4-connected, claw-free graphs

GRAPH THEORY: AN INTRODUCTION

An Introduction to Chromatic Polynomials

γ(ɛ) (a, b) (a, d) (d, a) (a, b) (c, d) (d, d) (e, e) (e, a) (e, e) (a) Draw a picture of G.

Matching and Factor-Critical Property in 3-Dominating-Critical Graphs

Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1

Blocking Combinatorial Games

Definition For vertices u, v V (G), the distance from u to v, denoted d(u, v), in G is the length of a shortest u, v-path. 1

Extremal Graph Theory: Turán s Theorem

Spanning tree congestion critical graphs

A THREE AND FIVE COLOR THEOREM

Lecture 5: Graphs. Rajat Mittal. IIT Kanpur

Treewidth and graph minors

Assignment 4 Solutions of graph problems

ON A WEAKER VERSION OF SUM LABELING OF GRAPHS

Adjacent: Two distinct vertices u, v are adjacent if there is an edge with ends u, v. In this case we let uv denote such an edge.

A New Game Chromatic Number

GAME CHROMATIC NUMBER OF CARTESIAN PRODUCT GRAPHS. 1. Introduction

Math 776 Graph Theory Lecture Note 1 Basic concepts

The Edge Fixing Edge-To-Vertex Monophonic Number Of A Graph

Basics of Graph Theory

COLORING EDGES AND VERTICES OF GRAPHS WITHOUT SHORT OR LONG CYCLES

On the packing chromatic number of some lattices

Star Decompositions of the Complete Split Graph

AXIOMS FOR THE INTEGERS

Decreasing the Diameter of Bounded Degree Graphs

Theorem 3.1 (Berge) A matching M in G is maximum if and only if there is no M- augmenting path.

Parameterized graph separation problems

Independence Number and Cut-Vertices

FOUR EDGE-INDEPENDENT SPANNING TREES 1

Abstract Combinatorial Games

CLAW-FREE 3-CONNECTED P 11 -FREE GRAPHS ARE HAMILTONIAN

The Structure of Bull-Free Perfect Graphs

Coloring edges and vertices of graphs without short or long cycles

Chapter 4. square sum graphs. 4.1 Introduction

Minimum Number of Palettes in Edge Colorings

Module 7. Independent sets, coverings. and matchings. Contents

EXPLORATIONS ON THE DIMENSION OF A GRAPH

The Restrained Edge Geodetic Number of a Graph

Some Upper Bounds for Signed Star Domination Number of Graphs. S. Akbari, A. Norouzi-Fard, A. Rezaei, R. Rotabi, S. Sabour.

THE RAINBOW DOMINATION SUBDIVISION NUMBERS OF GRAPHS. N. Dehgardi, S. M. Sheikholeslami and L. Volkmann. 1. Introduction

Bipartite Roots of Graphs

Discrete mathematics , Fall Instructor: prof. János Pach

MC 302 GRAPH THEORY 10/1/13 Solutions to HW #2 50 points + 6 XC points

The strong chromatic number of a graph

Vertex-Colouring Edge-Weightings

Mean, Odd Sequential and Triangular Sum Graphs

Neighbor Sum Distinguishing Index

A Vizing-like theorem for union vertex-distinguishing edge coloring

Peter Keevash Dhruv Mubayi

Discrete Mathematics

The crossing number of K 1,4,n

Math 152: Applicable Mathematics and Computing

Vertex 3-colorability of claw-free graphs

Cofinite Induced Subgraph Nim

Chromatic Transversal Domatic Number of Graphs

Problem Set 2 Solutions

arxiv: v1 [math.ho] 7 Nov 2017

K 4,4 e Has No Finite Planar Cover

On vertex types of graphs

Chordal deletion is fixed-parameter tractable

Pebbling on Directed Graphs

Outer-2-independent domination in graphs

An Improved Upper Bound for the Sum-free Subset Constant

Faster parameterized algorithms for Minimum Fill-In

Symmetric Product Graphs

Maximal Monochromatic Geodesics in an Antipodal Coloring of Hypercube

Universal Cycles for Permutations

Modules. 6 Hamilton Graphs (4-8 lectures) Introduction Necessary conditions and sufficient conditions Exercises...

Nim-Regularity of Graphs

CPS 102: Discrete Mathematics. Quiz 3 Date: Wednesday November 30, Instructor: Bruce Maggs NAME: Prob # Score. Total 60

Subdivisions of Graphs: A Generalization of Paths and Cycles

Transcription:

COMBINATORIAL ANALYSIS OF A SUBTRACTION GAME ON GRAPHS arxiv:1507.05673v4 [math.co] 1 Aug 2016 RICHARD ADAMS, JANAE DIXON, JENNIFER ELDER, JAMIE PEABODY, OSCAR VEGA, AND KAREN WILLIS Abstract. We define a two-player combinatorial game in which players take alternate turns; each turn consists on deleting a vertex of a graph, together with all the edges containing such vertex. If any vertex became isolated by a player s move then it would also be deleted. A player wins the game when the other player has no moves available. We study this game under various viewpoints: by finding specific strategies for certain families of graphs, through using properties of a graph s automorphism group, by writing a program to look at Sprague-Grundy numbers, and by studying the game when played on random graphs. When analyzing Grim played on paths, using the Sprague-Grundy function, we find a connection to a standing open question about Octal games. In this article we define a two-person game played on the vertices of a graph, and then study it to find strategies for either player to win. The analysis of the game ends up depending heavily on the family of graphs considered at the time. This is why, in this article, we will consider a wide variety of tools from game theory, combinatorics and group theory, plus some programming, to attack this problem. In the following section we will cover some basic notation and definitions that will be useful throughout the paper, as well as the actual game play. 1. Introduction A graph G = (V,E) is a set V of vertices and a set E of edges connecting pairs of vertices. In this work we consider only graphs that are finite, simple and undirected. As customary, the degree of a vertex v, denoted deg(v), is the number of edges that are incident with v. We say that a vertex v is isolated if deg(v) = 0. A graph is said to be connected if, given any two vertices u,v V(G), there is a path in G from u to v. Two graphs are said to be disjoint when their vertex sets are disjoint; we will use the notation G H for the graph formed by two disjoint graphs, G and H. The join of two graphs G and H, denoted G + H, is the graph with vertex-set V(G + H) = V(G) V(H) and edge-set E(G+H) = E(G) E(H) {vw; v V(G), w V(H)}. Finally, we will denote paths, cycles and wheels by P n, C n, and W n respectively, where n is the number of vertices in the graph, and G will denote the graph with V(G) = V(G) and edges connecting only vertices that were not connected in G. More information about graphs may be found in [3]. 2000 Mathematics Subject Classification. Primary 05C57, 91A43, 91A46. Secondary 68R10. Key words and phrases. Games on Graphs, Sprague-Grundy. Partially supported by the National Science Foundation grant DMS-1247679. 1

In order to define our game we re-phrase well-known notions in combinatorial game theory for a game played on graphs. For further reading about game theory, we direct the reader to [1]. Definition 1. A two-player game is said to be impartial if the outcome of the game depends only on what player goes first. A two-player game is said to be combinatorial if both players have perfect information, there is no chance involved, the game ends after a finite number of moves, the game is impartial, and there is no draw. A two-player game is said to be normal if the last player to make a legal move is the winner. Definition 2. Let G and H be graphs on which a combinatorial game can be played. 1. If H is obtained from G after a game move, then we will call H a follower of G in the game. 2. If, given a graph H, there is a strategy to win for the next player making a move then we will say that H is an N position (the N is for next). If, given a graph H, the next player making a move does not have a strategy to win then H is a P position (the P is for previous). Remark 1. Not having a strategy to win means the other player has a strategy to win. This follows from the Sprague-Grundy Theorem, see [11] and [17]. So, if G is the starting graph and Player 1 will move first, then G being an N position means Player 1 has a strategy to win the game, but if G is a P position then Player 2 has a strategy to win the game. Next we define our game, which we call Grim. Definition 3. Given a graph H, we define a legal move of Grim on H by a player selecting and consequently deleting a vertex. When this vertex is deleted all edges adjacent to this vertex are also deleted, together with any other vertices (if any) that have become isolated because of the move. The game starts with Player 1 moving first on a pre-arranged, starting position, graph G (naturally, if G had any isolated vertices these would be deleted before the first player can move). After that, the two players alternate turns, making legal moves on the follower resulted from the previous player s move. They play until all vertices have been deleted. We refer to the winner of the game, or winner of the graph, as the player who makes the last legal move. Remark 2. Grim is a normal combinatorial two-player game. Given the nature of the game, we will also say it is a vertex deletion game. Note that changing the starting graph may change the way Grim is played completely. So, in this article we are not just studying a specific game, but a family of them. This property is commonplace in the study of games played on graphs, of which there is a wide variety, see e.g. Node Kayles in [2] and [10], Connect-it [12], Take Turn [16], and [7], [13] and [15]. Our interest in the subject of games played on graphs is due to the papers by Fukuyama (see [8] and [9]), where he studies Nim on graphs. Our study of Grim is split as follows: In Section 2 we look at weighted graphs and prove that an extension of Grim to these graphs is unnecessary, as the strategies that could be used to play Grim in weighted graphs are the same as those used to 2

play Grim on certain unweighted graphs. In Section 3 we find winning strategies for when Grim is played on complete and complete multipartite graphs. In Section 4 we look at how certain symmetries in a graph could be exploited to guarantee a victory when Grim is played on such a graph. In Section 5 we study paths, cycles, and other related graphs by using Sprague-Grundy functions; in this way we discover an interesting connection between Grim played on paths and an open problem about Octal games. Finally, in Section 6 we consider random graphs in order to learn whether Player 1 has an overall better chance of winning at Grim. 2. Weighted Graphs It is not unusual to wonder whether a game played on graphs could be extended to be played on graphs with weighted vertices, maybe by thinking about the vertices of the graph as heaps of chips/tokens that can be removed one at a time by players. Of course, this way of playing Grim is similar to the way Nim is played, and thus it has been considered in the past (e.g. [5]). In this section we prove that the natural variation of Grim on weighted graphs is nothing but regular Grim on a different family of graphs. When playing Grim on a weighted graph, we only allow a vertex with weight t to be deleted after it has been selected t times, or if it has been completely isolated. Thus, we can create many different games from the same graph by giving each vertex a new random weight. As we studied these graphs, we discovered that we could replace a vertex with weight t with t regular vertices that do not share any edges. In order to prove such a claim the concept of a blowup of a vertex becomes necessary. Definition 4. Let G be a graph with weighted vertices. Let v V(G) having weight one and t N. A t-blowup of v is an independent set I v = {v 1,v 2,...,v t } of vertices of weight 1 that takes the place of v. More precisely, wherever there was an edgejoining v to w V(G) there is anedge joining v j with w, for all j = 1,...,t. The graph obtained by the t-blowup of v will be denoted G(tv). Similarly, for v,w V(G) and s,t N we denote a double blowup G(tv)(sw) as G(tv,sw). For multiple blowups we extend in the natural way the notation set of double blowups. Note that G(1v) = G, for all v V(G). Lemma 1. Let t N. Let G be a graph with weighted vertices, and let v V(G) have weight t. We denote by G(v) the t-blowup of the graph obtained by reducing the weight of v to one. Then, the outcome of playing Grim on G or on G(v) is the same. Proof. Let I = {v 1,...,v t } be the independent set used to obtain G(v). There are two possible ways to delete v while playing on G, thus we look at the following two cases: Case 1: Try to isolate v in G. Using the same moves needed to remove all of v s neighbors in G we can isolate every vertex in I (in G(v)). Case 2: Removing v in G by repeatedly using it in the game. In order to remove v from G, it has to be selected t times. To fully remove I from G(v), each of the t vertices in I must be selected and removed. Thus removing I from G(v) requires an equivalent process as that needed to remove v from G. 3

Therefore, game play with v or with I will involve the same strategies. Finally, replacing v with I will not affect the other vertices in the graph, and thus it will not affect playing with them. An easy induction argument proves the main theorem of this section. Theorem 1. Let G be a weighted graph with V(G) = {v 1,...,v n } and with t i being the weight of vertex v i, for all i = 1,...,n. We denote by G(v 1,v 2,...,v n ) be the (t 1,t 2,...,t n )-blowup of the graph obtained by reducing (if possible) the weight of each vertex of G to one. Then, the outcome of playing Grim on G or on G(v 1,...,v n ) is the same. We conclude that Grim on weighted graphs does not need to be studied separately, and so from now on the gamediscussed is alwaysgrim playedon unweighted graphs. Before we move on, we would like to let the the reader know that we will often use the word graph to mean the game played on that graph (as in Player 1 wins graph G ). Most proofs in the following sections somehow describe the specific strategy to be used to win. 3. Complete and complete multipartite graphs In this section we obtain specific strategies to win at Grim for complete graphs and complete multipartite graphs. We start with a theorem about complete graphs. Lemma 2. Let n N. Then, K n is an N position if and only if n is even. Proof. The case n = 1 is immediate, as no game is ever played. For n > 1, all moves are equivalent in a complete graph, and a move will always yield a complete graph, so the game always lasts n 1 moves. Grim played on complete bipartite graphs will be analyzed next. Theorem 2. Let m,n N. Then, the following hold. 1. K 1,n is an N position. 2. Assume m,n > 1. Then, K m,n is an N position if and only if m+n is odd. Proof. The first claim is immediate. For the second claim we start by settling a base case. For K 2,2, whatever move Player 1 makes, the follower is always K 1,2. By part 1, Player 2 wins this graph. Now we proceed by induction on k = m+n. Part 1 and the base case considered above tell us that we have the result for k = 3,4. So, assume the result holds for m+n = k 4. Consider K a,b where a+b = k +1. Case 1: If k + 1 is odd, then k + 1 5. WLOG assume that a > 2 and let Player 1 move by creating the follower K a 1,b. Since both a 1,b > 1 we use the induction hypothesis to determine that Player 1 wins K a,b. Case 2: If k +1 is even, then k +1 6. If WLOG a = 2 then Player 1 would not want to move to create the follower K 1,b, as this would be won by Player 2. However, if they moved to create the follower K 2,b 1 then they would lose anyway, by induction, as 2,b 1 > 1. Now, if a,b > 2 then whatever move Player 1 makes they would lose by induction, as a 1,b 1 2. 4

In the rest of this section we extend Theorem 2 to most multipartite graphs. At this point we would like to remark that the only way to delete a vertex in a complete multipartite graph and, by doing so, isolate other vertices would be when we were making a move on K 1,n, which is a graph already studied in Theorem 2. This unique situation indicates that we should take a closer look at graphs that may have K 1,n as a follower; K 1,1,n is the only one of those graphs that has not been already studied in Theorem 2. Looking at the behavior of K 1,n we obtained our next result. Lemma 3. Let m,n N, and G = K 1,m,n. Then, 1. If m = 1, then G is an N position if and only if n is even. 2. If m = 2 and n 2, then G is an N position. 3. If m, n 2, then G is an N position if and only if m+n is even. Proof. We start by noticing that the case m = n = 1 is immediate. We will prove the case m = 1, n > 1 by induction on n. Our base cases are K 1,1,1 and K 1,1,2. We know that the first graph is a P position, and clearly, Player 1 wins K 1,1,2 by leaving the follower K 1,1,1 after their first move. For n > 2, Player 1 should start by leaving K 1,1,n 1 as a follower (otherwise Player 2 would win the game immediately). Player 2 could leave K 1,n 1 or K 1,1,n 2 as a follower. In the first case, Player1 wins G, and in the second case induction forces the result we wanted. Let us assume that m = 2 and n 2. If n is even then Player 1 leaves K 2,n as a follower, which by Theorem 2 is won by Player 1. If n is odd then Player 1 leaves K 1,1,n as a follower, and thus they win G by using the strategy discussed above. Finally, assume m, n 3. Since none of the players would like to leave K 1,2,k as a follower then the winners of these graphs will alternate depending on n being even or odd. Thus we look at the base case K 1,3,3, which is an N position by Theorem 2, to get the desired result. The complete tripartite graphs missing from Lemma 3, and most of the other complete multipartite graphs are considered in the following theorem. Theorem 3. Let G = K n1,n 2,,n t, where t > 2 and n i 2, for all i = 1,...,t. Then, G is a P position if and only if V(G) is even. Proof. Let G = K n1,n 2,,n t, where t > 2 and n i 2, for all i = 1,...,t. We define S = {n i ; n i 1 (mod 2)}. Suppose that V(G) is even and n i 2, for all i = 1,...,t. Note that S is either 0 or even. Case 1: S = 0, i.e. each partition of G contains an even number of vertices. The strategy for Player 2 is as follows: the game starts with Player 1 deleting any vertex from the graph. Since the partition where this vertex was will have at least one more vertex in it, Player 2 deletes a vertex in it. In this way, Player 2 always has an available move in the same partition that Player 1 has chosen to play on. Hence, Player 2 is always the last person to delete a vertex from every partition of G, and thus they will always have the last move in the game, as they will be the only person able to play in the state K 1,ni, when that time comes. Case 2: S = 2k, for some non-zero k N. Now the strategy for Player 2 is two-fold: if Player 1 moves in an even partition of G then Player 2 follows the strategy in Case 1, but if Player 1 deletes a vertex in an odd partition then Player 2 deletes a vertex in one of the other odd partitions (there would be an odd number 5

of them available). Note that after one move by each player, the follower obtained would either be a graph that Case 1 considers, or G would have S = 2(k 1), and thus an induction argument would finish the proof. Note that the base case(s) of this induction could be track down to knowing who wins K odd, odd or K even, even, which are both P positions by Theorem 2. Now suppose that V(G) is odd and n i 2, for all i = 1,...,t. Since there must be some n i S, the strategy for Player 1 is to delete any vertex in a partition with an odd number of vertices. In this way, they would leave a follower with an even number of vertices that also has every partition containing more than 1 vertex. For this follower, Player 1 will move second and thus will win the graph. We now look at a specific family of multipartite graphs allowing singletons as partitions. Lemma 4. Let G = K 1,n2,...,n t, where 3 < t, 1 k t, and n i 2, for all i = 2,...,t. Then, G is a P position if and only if V(G) is even and n i > 2, for all i. Proof. If V(G) is odd then Player 1 leaves K n2,...,n t as a follower, which is a P position (by Theorem 3), and thus Player 1 wins G. Now, if V(G) is even then Player1would not want to leave K n2,...,n t as a follower, as in this case, by Theorem 3, Player 2 would win G. Hence, Player 1 would leave WLOG K 1,n2 1,n 3,...,n t as a follower. If n 2 > 2 then by the previous case we would get that Player 2 wins G. If we allow r 1 > 0 of the n i to be equal to 2 then, after re-arrangement if needed, we get G = K 1,2,...2,nr+1,...,n t, where n r+1,...,n t > 2. Note that r < t because V(G) is even. In this case, Player 1 leaves K 1,2,...2,nr+1 1,...,n t as a follower, and thus Player 1 wins G using the strategy discussed for the case V(G) odd. There are several complete multipartite graphs that we have not studied, and we will not study in this paper; these, after a re-arrangement if needed, have the form K 1,,1,nk+1,...,n t, where 3 < t, 1 k t, and n i 2, for all i = k +1,...,t. Some of them may be studied very easily, for example K 1,...,1 is a P position if and only if t is odd. The conditions needed to understand others are much more complex. For instance, if k > 1 and k > α k,t = (n k+1 + +n t ) (t k), then K 1,,1,nk+1,...,n t is a P position if and only if k and α k,t have different parity. On the other hand, in order to understand the case k α k,t we need to look at these two parameters and also to how much bigger than k α k,t is. Also, unlike most of the graphs studied in this section, K 1,n and K 1,2,n are always won by Player 1 independent on the parity of n. This situation is not that uncommon in the graphswe havenot studied here, for instance the family of graphs of the form K 1,1,3,n, for n 3, are also won by Player 1 by leaving the follower K 1,3,n for n even and K 1,1,2,n for n odd. There are several other families, similar to K 1,1,3,n, that may be proven to be won by Player 1 only. All this suggests that a complete theory of dealing how Grim would play on multipartite graphs allowing singletons as partitions is very complex, and thus we plan to study it separately in a future article. Other standard families of graphs can be studied in a similar fashion to what has been done in this section with complete and complete multipartite graphs. However, as it was seen in this section, and we will see again in Section 5, the analysis of Grim gains complexity quickly. Hence, in the following sections we will study Grim on graphs by using a less direct set of techniques. 6

4. Automorphisms Certain symmetries in a graph can be exploited to obtain strategies for winning at Grim. In this section we prove a couple of results of this type, and then we apply them to a few families of graphs. Definition 5. A function σ is said to be an automorphism of a graph G if σ permutes the vertices of G while preserving incidence. The group (under composition) of all the automorphisms of G is denoted Aut(G). Theorem 4. Let G be a graph, and assume that Aut(G) has an element σ of order 2 such that v σ(v) and vσ(v) / E(G), for all v V(G). Then, G is a P position. Proof. Let σ Aut(G) be such that v σ(v) and vσ(v) / E(G), for all v V(G). We will prove that if Player 1 moves by selecting a vertex v, then Player 2 can always move by selecting σ(v). We will proceed by contradiction. Suppose that at a certain stage of the game, and for the first time, Player 1 moves by selecting a vertex v leaving a follower that does not contain σ(v). If σ(v) was already deleted when Player 1 made their move, then either σ(v) was deleted by Player 2, which would contradict that v had not been deleted at this point, or σ(v) was deleted by becoming isolated, which would force (as σ Aut(G)) v to be isolated. In either case, the situation is impossible. So, the only option would be that σ(v) gets isolated at the time of deleting v. But v and σ(v) are not adjacent, so deleting v cannot isolate σ(v). Corollary 1. Let G be a graph with no isolated vertices, and assume that Aut(G) has an element σ of order 2 such that v 0 = σ(v 0 ), for exactly one v 0 V(G), and vσ(v) / E(G), for all v V(G). Then, G is an N position. Proof. Player1startsthegamebydeletingv 0, leavingafollowerthatisap position by Theorem 4. Hence, G is an N position. The following corollary summarizes a few applications of Theorem 4 and Corollary 1. Corollary 2. Let n N. (1) If n is odd, and n 3, then P n is an N position. (2) If n is even, and n 4, then C n is a P position. (3) If n is odd, and n 5, then W n is an N position. (4) G G is a P position, for all non-empty graphs G. Proof. (1) Use Corollary 1 with σ the reflection across the middle vertex of P n. (2) Modeling C n with a regular n-gon. Use Theorem 4 with σ defined by reflecting every vertex across the center of the polygon. (3) Use the same function in the proof of (2), but now apply Corollary 1, as the center of the wheel is fixed. (4) Use Theorem 4 with σ the identification between the two copies of G. Theorem 4 and Corollary 1 can also be used in the study of Cartesian products of graphs. Definition 6. Let G and H be two disjoint graphs. The Cartesian product of G and H, denoted GH, is defined by V(GH) = V(G) V(H) and edges given by: 1. (x,y) is adjacent to (w,z) if x = w and y and z are adjacent in H, or 7

2. (x,y) is adjacent to (w,z) if y = z and x and w are adjacent in G. where x,w V(G) and y,z V(H). Corollary 3. Let n > 1, G 1,,G n be graphs, and G = G 1 G n. (1) If G 1,,G n satisfy the hypothesis in Theorem 4, then, G is a P position. (2) If G 1,,G n satisfy the hypothesis in Corollary 1, then G is an N position. Proof. (1) Let σ i Aut(G i ) be the automorphism satisfying the hypothesis in Theorem 4. It is easy to see that σ defined by σ(v 1,...,v n ) = (σ 1 (v 1 ),...,σ n (v n )) is an automorphism of G also satisfying the hypothesis in Theorem 4. The result follows. The proof for (2) uses the very same ideas, so we omit it. An attempt to find strategies that allow us to determine who would win GH, for arbitrary graphs G and H, was made but it failed because we realized that keeping track of all the possible avenues the game could take was an impossible task. A natural approach to how to keep track of what happens in a game is discussed in the following section. 5. The Sprague-Grundy Function One of the most useful tools in the study of combinatorial games is the Sprague- Grundy function. We proceed to define it, in the context of Grim, and then we focus our efforts on finding its values for paths. Definition 7. Let N 0 = N {0} and G be a graph. We define F(G) to be the set of all followers of G (in the game Grim). The Sprague-Grundy function of G is a function SG : V N 0, defined recursively as follows SG(G) = min{n N 0 ; n SG(H), for all H F(G)}. If we define the minimal excludant, or mex, of a set of non-negative integers as the smallest non-negative integer not in the set, then we may write SG(G) = mex{sg(h); H F(G)}. Remark 3. SG(G) = 0 if and only if G is a P position. The process to calculate the Sprague-Grundy values by hand is laborious, so we wrote a program in Visual FoxPro to compute the Sprague-Grundy value of Grim on paths. We focused on paths because in Corollary 2 we learned that odd paths are N positions, but when wanting to look at even paths no pattern seemed to exist. Using our program, we were able to compute all the values of SG(P n ) 1 for up to n = 10 7. Using these results we know that if n 10 7, then SG(P n ) = 0 only when n {4,12,20,30,46,72,98,124,150,176,314,408}, which is something L acko and L acki (unpublished work, see [14]) had also determined (although they consider P 1 a P position while we do not consider P 1 a graph where we would play Grim, as all isolated vertices in a graph are deleted before a game starts). Moreover, they also claim that SG(P n ) 0 for all values in the range 1 A library of these values may be obtained at www.gamecalledgrim.com. 8

10 7 n 10 8. The obvious question, at this point, is whether or not there are any other even paths with SG(P n ) = 0. It turns out that the answer to this question is related to a different open problem in game theory. Definition 8. An octal game is a normal impartial game played on heaps of chips. A move consists of taking a number of chips from a single heap, eliminating them, and then redistributing the remaining chips in the heap (if any left) into 0 (all chips in the heap were eliminated), 1 (leave the remaining chips intact), or 2 heaps; this number is fixed in advance for the game and depends only on how many chips were eliminated in the move. Given that there are several variables to determine at the beginning of the game, the rules of the game are encoded into a string of digits as follows: If in a move we remove k chips from a heap and we are allowed to break the remaining ones into a heaps then we say that χ k (a) = 1. In the case that we were not allowed to break the remaining ones into a heaps we say that χ k (a) = 0. The code of the game is d = 0.d 1 d 2..., where d k = χ k (0)2 0 +χ k (1)2 1 +χ k (2)2 2. It follows that, since 6 = 2 1 + 2 2, the game Octal.6 is a game in which every move consists of one chip being removed from a heap and what remains of that heap must be left in exactly 1 or 2 non-empty heaps. Several octal games have Sprague-Grundy sequences that after a while become periodic (see [6], for example); it is not know whether Octal.6 has a period. This is relevant to us because the terms in the sequences of Sprague-Grundy numbers for Grim on paths and Octal.6 are the same (see Theorem 5 below). Thus our question about values of n for which SG(P n ) = 0 becomes a problem about when Octal.6 is won by Player 2, which is an open problem (e.g. see [4]). In order to create some intuition on the reader about our next result, we notice that we can identify removing a chip from a heap in Octal.6 to deleting a vertex in a path (under Grim rules). More explicitly, depending on what vertex we delete, we always leave one or two paths left; these two paths would be the equivalent of the two heaps left after removing a chip in Octal.6. Theorem 5. The Sprague-Grundy sequence of values of Grim played on paths is equivalent to the Sprague-Grundy sequence of values of Octal.6. Proof. Let n N, O n be Octal.6 played on a heap of size n, and P n be Grim played on a path on n vertices. We will prove that SG(P n ) = SG(O n ). We will do this by induction on n. For n = 1 we get that both games are trivial, and thus SG(P 1 ) = SG(O 1 ) = 0. We now assume that SG(P i ) = SG(O i ), for all i n. First we notice that the followers of P n+1 and O n+1 are: F(P n+1 ) = {P n,p n 1 P 1,P n 2 P 2,...} F(O n+1 ) = {O n,o n 1 O 1,O n 2 O 2,...}. Using Nim Sum (see [1]), denoted + N below, to evaluate the Sprague-Grundy number of the followers of P n+1 and O n+1, we get: SG(P n+1 ) = mex{sg(p n ),SG(P n 1 )+ N SG(P 1 ),SG(P n 2 )+ N SG(P 2 ),...} SG(O n+1 ) = mex{sg(o n ),SG(O n 1 )+ N SG(O 1 ),SG(O n 2 )+ N SG(O 2 ),...}. 9

Using the inductive hypothesis and Nim Sum we get that SG(P n ) = SG(O n ) SG(P n 1 )+ N SG(P 1 ) = SG(O n 1 )+ N SG(O 1 ) Hence, SG(P n+1 ) = SG(O n+1 ).. If we knew all the values in the sequence {SG(P n )} n=1 we would also know several other Sprague-Grundy sequences. We present two results of this type, without a proof, in the following corollaries. Corollary 4. The Sprague-Grundy sequence for Grim on cycles is given by: { 1 if SG(P n 1 ) = 0 SG(C n ) = 0 otherwise In particular, C n is a P position when n is even. Finally, we get a result about wheels that depends on whatever knowledge we had about paths. Definition 9. A wheel graph on n vertices is defined by W n = C n 1 +K 1. K 1 is called the center of the wheel. Corollary 5. Let n 4, then W n is an N position if and only if P n 2 is an N position. Proof. W n has only two followers: C n 1, obtained from deleting the center of the wheel and W n 1, obtained by deleting a vertex different from the center of W n. If Player 1 wins P n, then they can win W n+2 by removing the center vertex and leaving C n+1 as a follower, this then forces Player 2 to leave P n as a follower, which is an N position. If Player 2 wins P n, then since W n+2 has only two followers and both of them are one deleted vertex away from P n, Player 2 can leave P n as a follower after their first move. 6. Grim on Random Graphs We are interested in understanding what happens when Grim is played on a random graph. Our main reason is that evidence in previous sections has shown that the game seems to favor Player 1 overall. In order to do this, we will use Erdős-Rényi random graphs. Definition 10. Let n N and 0 p 1. An Erdős-Rényi random graph G(n,p) is defined by having n vertices and, for any pair of vertices, the existence of an edge connecting them has probability p. In this section, we will work on identifying probabilities p for which Player 1 and Player 2 have equal chances of winning a random graph G(n,p). Remark 4. The probability of any given graph on n vertices and k edges to exist is given by p k (1 p) (n 2) k. So, if p = 0.5, then all possible graphs on n vertices have equal probability to exist; this value being (1/2) (n 2). 10

Definition 11. The winning probability of Player 1, denoted W 1 (p), is a function that describes the probability for Player 1 to win on a random graph, for a fixed n and a given edge probability p. It is of the form W 1 (p) = G X(G)P(G), where the sum runs through all graphs (including the empty graph, which is a P position), P(G) = p k (1 p) (n2) k for a graph on k edges, and { 1 if SG(G) 0 X(G) = 0 if SG(G) = 0 The winning probability of Player 2, denoted W 2 (p), may be defined similarly. As an illustration, let us consider Erdős-Rényi random graphs on n = 3 vertices with edges generated with probability p. We know that there are eight 3-vertex graphs. Out of these eight graphs, Player 1 would win all three graphs with one edge, all three graphs with 2 edges, and lose the one complete graph and the empty graph. Hence, the winning probabilities are: W 1 (p) = 3p(1 p) 2 +3p 2 (1 p) W 2 (p) = (1 p) 3 +p 3. Note that setting W 1 (p) = W 2 (p) yields the quadratic equation 6p 2 6p+1 = 0, which has solutions p = 3± 3 ; 6 they are approximately 0.21 and 0.79. Thus, Player1and Player2 have an equal chance of winning on a 3-vertex graph if the chance of each edge appearing is about 21% or 79%. Moreover, looking at the graph of W 1 (p) W 2 (p) we get that Player 2 has more than a 50% chance of winning as long as p < 3 3 3+ 3 or < p. 6 6 On the other hand, if we now consider Erdős-Rényi random graphs on n = 4 vertices. We get that the winning probability for Player 2 is W 2 (p) = 3p 2 (1 p) 4 +16p 3 (1 p) 3 +(1 p) 5, which is equal to 0.5 for p 0.16, and always below 0.5 after. Our examples suggest the following theorem. Theorem 6. Let n be odd. For an Erdős-Rényi random graph G(n,p), there exists 0 < p 0 < 1 such that W 2 (p) 0.5, for all p p 0. Proof. We will get a lower bound for W 2 (p) and use it to derive the existence of p 0. Note that, by Remark 4, we get W 2 (p) p (n 2). We set this bound equal to 0.5 and solve for p. We get the solution ( ) 1 1 n p 0 = 2 n, 4 which is in (0,1), for every n. 11

Since p 0 < p implies 0.5 = p 2) (n 0 < p (n 2), we get that W2 (p) 0.5, for all p p 0. Notice that as the number of vertices gets large, the bound for the value of p 0 given in the proof of Theorem 6 approaches 1 and thus, overall, Player 1 has increasingly better chances to win. It would be good to find an explicit expression for the least possible p 0, but this seems to be a really hard problem, as we do not know which graphs are P positions. 7. Acknowledgments The authors would like to thank the referee for his/her thorough review, and for his/her comments and suggestions; they have definitely improve the flow in the exposition, the presentation, and the overall quality of this article. 8. Conflict of Interests The authors declare that there is no conflict of interest regarding the publication of this article. References [1] Berlekamp, Elwyn R.; Conway, John H.; Guy, Richard K. Winning ways for your mathematical plays, Vol. 1 4, Second edition. A K Peters, Ltd., Natick, MA, 2001. [2] Bodlaender, Hans L.; Kratsch, Dieter. Kayles and nimbers. J. Algorithms 43 (2002), no. 1, 106 119. [3] Bondy, J. A.; Murty, U. S. R. Graph Theory with Applications, American Elsevier Publishing Co., Inc., New York, 1976. [4] Caines, Ian; Gates, Carrie; Guy, Richard K.; Nowakowski, Richard J. Periods in Taking and Splitting Games Amer. Math. Monthly 106 (1999), no. 4, 359 361. [5] Duchêne, Eric; Renault, Gabriel. Vertex Nim played on graphs. Theoret. Comput. Sci. 516 (2014), 20 27. [6] Flammenkamp, A. Sprague-Grundy values of some octal games: wwwhomes.uni-bielefeld.de/achim/octal.html. [7] Fraenkel, Aviezri S.; Scheinerman, Edward R. A deletion game on hypergraphs. ARIDAM III (New Brunswick, NJ, 1988). Discrete Appl. Math. 30 (1991), no. 2-3, 155 162. [8] Fukuyama, Masahiko. A Nim game played on graphs. Theoret. Comput. Sci. 304 (2003), no. 1 3, 387 399. [9] Fukuyama, Masahiko. A Nim game played on graphs. II. Theoret. Comput. Sci. 304 (2003), no. 1 3, 401 419. [10] Guignard, Adrien; Sopena, Éric. Compound Node-Kayles on paths. Theoret. Comput. Sci. 410 (2009), no. 21 23, 2033 2044. [11] Grundy, P. M. Mathematics and games. Eureka 2 (1939) 6 8. [12] Harary, Frank; Robinson, Robert W. Connect-it games. College Math. J. 15 (1984), no. 5, 411 419. [13] Krger, Oliver. Note on Odd/Odd vertex removal games on bipartite graphs. Integers 14 (2014), Paper No. G07, 4 pp. [14] L acko, Martha; L acki, Mateusz. Gra Grim i twierdzenie Sprague a-grundy ego. http://www.deltami.edu.pl/temat/matematyka/gry_zagadki_paradoksy/2014/05/31/gra_grim/ [15] Nowakowski, Richard J.; Ottaway, Paul. Vertex deletion games with parity rules. Integers 5 (2005), no. 2, A15, 16 pp. [16] Shelton, Kennan. The game of Take Turn. Integers 7 (2007), no. 2, A31, 18 pp. [17] Sprague, R. Über mathematische Kampfspiele. Tohoku Math. J. 41 (1936), 438 444. 12

Department of Mathematics. California State University, Fresno. Fresno, CA 93740. E-mail address: integragsr2001@mail.fresnostate.edu Department of Mathematics. California State University, Fresno. Fresno, CA 93740. E-mail address: janaekeys@mail.fresnostate.edu Department of Mathematics. California State University, Fresno. Fresno, CA 93740. E-mail address: arwenu@mail.fresnostate.edu Department of Mathematics. Kansas State University. Manhattan, KS 66506. E-mail address: jpeabody@math.ksu.edu Department of Mathematics. California State University, Fresno. Fresno, CA 93740. E-mail address: ovega@csufresno.edu Clovis Community College. Fresno, CA 93730. E-mail address: karen.willis@scccd.edu 13