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

Similar documents
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

The Matrix-Tree Theorem and Its Applications to Complete and Complete Bipartite Graphs

Chapter 2. Splitting Operation and n-connected Matroids. 2.1 Introduction

Lecture 5: Graphs. Rajat Mittal. IIT Kanpur

Math 170- Graph Theory Notes

Graph Theory S 1 I 2 I 1 S 2 I 1 I 2

Perfect Matchings in Claw-free Cubic Graphs

1 Elementary number theory

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.

Star Decompositions of the Complete Split Graph

Chapter 4. square sum graphs. 4.1 Introduction

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

An Eternal Domination Problem in Grids

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

Topic 10 Part 2 [474 marks]

Math 776 Graph Theory Lecture Note 1 Basic concepts

Line Graphs and Circulants

CSE 20 DISCRETE MATH WINTER

Proposition 1. The edges of an even graph can be split (partitioned) into cycles, no two of which have an edge in common.

Vertex Deletion games with Parity rules

Winning Positions in Simplicial Nim

ASSIGNMENT 4 SOLUTIONS

Grundy chromatic number of the complement of bipartite graphs

Coloring graphs without fan vertex-minors and graphs without cycle pivot-minors

Discrete Mathematics Course Review 3

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

Key Graph Theory Theorems

Graph theory. Po-Shen Loh. June We begin by collecting some basic facts which can be proved via bare-hands techniques.

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

Math 443/543 Graph Theory Notes 2: Transportation problems

1 Elementary number theory

STUDENT NUMBER: MATH Final Exam. Lakehead University. April 13, Dr. Adam Van Tuyl

Ma/CS 6b Class 13: Counting Spanning Trees

AXIOMS FOR THE INTEGERS

Graph Theory. 1 Introduction to Graphs. Martin Stynes Department of Mathematics, UCC January 26, 2011

SPERNER S LEMMA MOOR XU

Matching Algorithms. Proof. If a bipartite graph has a perfect matching, then it is easy to see that the right hand side is a necessary condition.

On median graphs and median grid graphs

The Game Chromatic Number of Some Classes of Graphs

Collapsible biclaw-free graphs

A TIGHT BOUND ON THE LENGTH OF ODD CYCLES IN THE INCOMPATIBILITY GRAPH OF A NON-C1P MATRIX

Matchings. Examples. K n,m, K n, Petersen graph, Q k ; graphs without perfect matching. A maximal matching cannot be enlarged by adding another edge.

A generalization of zero divisor graphs associated to commutative rings

IMO Training 2008: Graph Theory

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE

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

Graph Adjacency Matrix Automata Joshua Abbott, Phyllis Z. Chinn, Tyler Evans, Allen J. Stewart Humboldt State University, Arcata, California

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

COUNTING THE NUMBER OF WINNING BINARY STRINGS IN THE 1-DIMENSIONAL SAME GAME. Department of Mathematics Oberlin College Oberlin OH 44074

Incidence coloring game and arboricity of graphs

On the Relationships between Zero Forcing Numbers and Certain Graph Coverings

r=1 The Binomial Theorem. 4 MA095/98G Revision

Planar Drawing of Bipartite Graph by Eliminating Minimum Number of Edges

14 More Graphs: Euler Tours and Hamilton Cycles

Two Characterizations of Hypercubes

Math 485, Graph Theory: Homework #3

arxiv: v1 [math.co] 4 Apr 2011

Lecture 4: 3SAT and Latin Squares. 1 Partial Latin Squares Completable in Polynomial Time

Fundamental Properties of Graphs

Figure 2.1: A bipartite graph.

Minimum Cycle Bases of Halin Graphs

PLANAR GRAPH BIPARTIZATION IN LINEAR TIME

Rainbow game domination subdivision number of a graph

Eulerian subgraphs containing given edges

A combinatorial proof of a formula for Betti numbers of a stacked polytope

λ -Harmonious Graph Colouring

Parameterized graph separation problems

Zero-Sum Flow Numbers of Triangular Grids

REGULAR GRAPHS OF GIVEN GIRTH. Contents

The strong chromatic number of a graph

GRAPH DECOMPOSITION BASED ON DEGREE CONSTRAINTS. March 3, 2016

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

Vertex Colorings without Rainbow or Monochromatic Subgraphs. 1 Introduction

1 Undirected Vertex Geography UVG

Graphs with Two Disjoint Total Dominating Sets

Introduction III. Graphs. Motivations I. Introduction IV

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

Hypercube orientations with only two in-degrees

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

Mathematics and Statistics, Part A: Graph Theory Problem Sheet 1, lectures 1-4

NOTE ON MINIMALLY k-connected GRAPHS

ON SWELL COLORED COMPLETE GRAPHS

Bipartite Roots of Graphs

Math Introduction to Advanced Mathematics

Dirac-type characterizations of graphs without long chordless cycles

EVEN-CYCLE DECOMPOSITIONS OF GRAPHS WITH NO ODD-K 4 -MINOR

Let G = (V, E) be a graph. If u, v V, then u is adjacent to v if {u, v} E. We also use the notation u v to denote that u is adjacent to v.

Thread graphs, linear rank-width and their algorithmic applications

CME 305: Discrete Mathematics and Algorithms Instructor: Reza Zadeh HW#3 Due at the beginning of class Thursday 02/26/15

Edge Colorings of Complete Multipartite Graphs Forbidding Rainbow Cycles

Progress Towards the Total Domination Game 3 4 -Conjecture

6. Lecture notes on matroid intersection

2017 SOLUTIONS (PRELIMINARY VERSION)

Network flows and Menger s theorem

1 Some Solution of Homework

An Introduction to Graph Theory

[Ramalingam, 4(12): December 2017] ISSN DOI /zenodo Impact Factor

Revolutionaries and Spies

The incidence game chromatic number

HMMT February 2018 February 10, 2018

Transcription:

Trail Making Game Hyun Sung Jun Jaehoon Kim Sang-il Oum Department of Mathematical Sciences KAIST, Daejeon, 305-701, Republic of Korea. May 7, 2009 Abstract Trail Making is a game played on a graph with a given initial vertex in which two players alternately choose an edge to lengthen a trail starting at the initial vertex. A player loses if he or she can not choose an edge to lengthen the trail. We provide the necessary and sufficient condition for a player to have a winning strategy on bipartite graphs. Furthermore, we prove that on the m n grid with one of the corner vertices as an initial vertex, the first player has a winning strategy if and only if m+1 and n+1 are relative prime. 1 Introduction We introduce Trail Making, a game played on a finite graph with a given initial vertex in which two players, say Alice and Bob, alternately choose an edge incident with the last vertex of the trail in order to lengthen the trail. A player loses if he or she can not choose an edge to extend the trail. We assume that Alice is the first player to choose an edge. Since a trail is a walk without repeated edges, players can not choose previously chosen edges. Trailing Making is a variant of Slither, invented by Silverman and discussed in two articles by Gardner in Scientific American [2, 3]. Slither is almost identical to Trail Making except that players choose an edge to lengthen a path instead of a trail. Originally Slither was a game on the grid but Anderson [1] extended it to general graphs and provided a general winning strategy based on perfect matchings of a graph. Trail Making may be regarded as a game-theoretic variation of searching Eulerian trails. It is easy to see that Bob can not lose Trail Making if the graph is bipartite and has an Eulerian trail starting at the initial vertex. jun0605@kaist.ac.kr mutual85@hotmail.com sangil@kaist.edu Supported by the SRC Program of Korea Science and Engineering Foundation (KOSEF) grant funded by the Korea government (MEST) (No. R11-2007-035-01002-0). 1

We now define a property of a set which will provide a sufficient condition to have a winning strategy. We allow graphs to have parallel edges or loops but all graphs in this paper are finite. A set of pairwise non-adjacent vertices having no loops is called independent. A trap of a graph G is an independent set S of vertices such that, for every vertex v in G, there are even number of edges joining v and S. Proposition 1. Bob has a winning strategy for Trail Making played on a graph G with an initial vertex v 0 if G has a trap containing v 0. Proof. Let T be a trap containing v 0. The strategy for Bob is to choose an edge incident with T. Since T is independent and every vertex out of T is incident with an even number of edges incident with T, Bob can always make his move. Therefore Bob can never lose with this strategy. Since G has finitely many edges, Bob wins. The converse of Proposition 1 does not hold in general. For example, let us consider the graph obtained by attaching, to an odd cycle C 2n+1, a new vertex v 0 adjacent to one of the vertices of the odd cycle. Then it is straightforward to verify that Bob always wins but no trap contains v 0. Nevertheless, in Section 2, we prove that the converse of Proposition 1 holds on bipartite graphs. In Section 3, we prove that when G is the m n grid (having mn vertices) and an initial vertex is one of the four corner vertices, Bob has a winning strategy if and only if m + 1 and n + 1 are not relative prime. 2 Strategy on bipartite graphs Let G be a bipartite graph with a bipartition A B = V (G). The bipartite adjacency matrix M = (m ab ) a A,b B of G is an A B matrix whose rows and columns are indexed by A and B, respectively, so that m ab is the number of edges joining a and b in G. We assume that M is a matrix over the binary field GF (2). Thus m ab = 1 if and only if there are odd number of edges joining a A and b B, and m ab = 0 otherwise. For an A B matrix M and subsets X, Y of A, B, respectively, we write M[X, Y ] to denote the submatrix of M by removing all rows not indexed by X and all columns not indexed by Y. Theorem 2. Let G be a bipartite graph and v 0 be a vertex of G. Then Bob has a winning strategy for Trail Making on G with an initial vertex v 0 if and only if G has a trap containing v 0. Proof. By Proposition 1, it is enough to prove that if G has no trap containing v 0, then Alice has a winning strategy. Let (A, B) be a bipartition of G. Let M be the bipartite adjacency matrix of G. We may assume that v 0 A and the first row of M is indexed by v 0. Since no trap containing v 0 exists, the row vector M[{v 0 }, B] is not spanned by the row vectors in M[A {v 0 }, B]. Thus rank(m) = rank(m[a {v 0 }, B]) + 1. We claim that there is a vector x = (x b ) b B such that Mx = (1, 0,..., 0) T. For proving this claim, we may assume that rank(m[a {v 0 }, B]) = A 1 by removing dependent rows in M[A {v 0 }, B] from M. We may also assume that B = A 2

by removing dependent columns of M because we can take x b = 0 if we remove b out of B. Then M is a nonsingular square matrix and therefore we obtain x = M 1 (1, 0,..., 0) T. This proves the claim. In other words, there exists a subset S of B such that there are an odd number of edges joining v 0 and S and for every vertex v in A except v 0, there are an even number of edges joining v and S. Let w be a vertex in S adjacent to v 0. Alice s first move is to take the edge e = v 0 w. We are now playing Trail Making on G \ e with the initial vertex w and S is a trap containing w and Bob is the first player to choose an edge in G \ e. Therefore by Proposition 1, Alice has a winning strategy. Theorem 2 provides the following corollary. Corollary 3. Let G be a bipartite graph with the bipartition A B = V (G). Let M be the bipartite adjacency matrix of G and let v 0 A. Then Bob has a winning strategy for Trail Making on G with an initial vertex v 0 if and only if rank(m) = rank(m[a {v 0 }, B]). 3 Strategy on grids For positive integers n and m, let G n,m be the n m grid, that is a graph on the vertex set {0, 1, 2,..., n 1} {0, 1, 2,..., m 1} such that two vertices (a, b) and (a, b ) are adjacent if and only if a a + b b = 1. As Slither was originally considered for grids, we solve Trail Making on grids. Theorem 4. Alice has a winning strategy in Trail Making on G n,m with an initial vertex (0, 0) if and only if n + 1 and m + 1 are relative prime. Let us now discuss the proof. For the inductive purpose, we may assume that Trail Making on G n,m with an initial vertex (0, 0) is a two-person game played on Z 2 with an initial vertex (0, 0) such that a player loses if he or she has no choice of unused edges to lengthen the trail, or he or she chooses an edge to move the end of the trail onto one of the following four lines: y = 1, x = 1, y = m, x = n. Lemma 5. Suppose that m n and while playing Trail Making, the end of the trail reaches the line y = m n for the first time. If it is the turn of a player X to lengthen the trail, then the other player Y has a winning strategy. Proof. We may assume that n 2. Let T be the trail from (0, 0) to (a, m n) such that all intermediate vertices are not on the line y = m n. We may assume that 0 a < n. Let e be the edge joining (a, m n) and (a, m n 1). Then either the last edge of T is e or m = n and T has no edges at all. Let S be a set of points (x, y) Z 2 satisfying the following (see Figure 1): a + m n x + y m + n 2 a, m n a y x m n + a x + y a + m n (mod 2). We observe that S is independent and every vertex (x, y) has an even number of neighbors in S if 0 x < n and 0 y < m except (x, y) = (a, m n 1). 3

(n a 1, m 1) (0, a + m n) (n 1, m a 1) Line y = m n e (a, m n) (0, 0) Figure 1: Construction of a trap in Lemma 5 when m = 13 and n = 7. Then S is a trap containing (a, m n) in G n,m \ E(T ) because no vertices of T except (a, m n) are neighbors of S in G n,m \ e. We may now regard the remaining game as Trail Making starting on G n,m \ E(T ) at the initial vertex (a, m n). Therefore the second player, Y, has a winning strategy by Proposition 1. Proof of Theorem 4. We proceed by induction on max(m, n). If m = n, then by Lemma 5, Bob has a winning strategy and gcd(m + 1, n + 1) = m + 1 1. Now we may assume that m > n. By Lemma 5, a player who moves the end of the trail to the line y = m n 1 for the first time will lose because the other player then can choose move the end of the trail to the line y = m n. Therefore both players should avoid moving the end of the trail onto the line y = m n 1 in order to win Trail Game on G n,m. Thus a player having a winning strategy on G n,m n 1 if and only if he or she has a winning strategy on G n,m. By induction, Alice has a winning strategy on G n,m n 1 if and only if gcd(n + 1, m n) = 1. Since gcd(n + 1, m + 1) = gcd(n + 1, m n), we conclude that Alice has a winning strategy on G n,m if and only if gcd(n + 1, m + 1) = 1. 4 Discussion In this paper we completely characterized who has a winning strategy for Trail Making on bipartite graphs and, we proved that the player having the winning strategy on the n m grid is determined by the greatest common divisor of m + 1 and n + 1. But we do not know whether or not there is a polynomial-time algorithm 4

to decide which player has a winning strategy on a non-bipartite graph. As we discussed in Section 1, the existence of a trap is not a necessary condition for Bob to have a winning strategy. Nevertheless, we remark that finding a trap in general is NP-hard, proved by Halldórsson et al. [4]. Acknowledgment. We would like to thank Tommy R. Jensen for the discussion, which provided the example in Section 1 on the converse of Proposition 1. References [1] W. N. Anderson, Jr. Maximum matching and the game of Slither. J. Combinatorial Theory Ser. B, 17:234 239, 1974. [2] M. Gardner. Mathematical games. Scientific American, 226:117 118, 1972. [3] M. Gardner. Mathematical games. Scientific American, 227:176 182, 1972. [4] M. M. Halldórsson, J. Kratochvíl, and J. A. Telle. Independent sets with domination constraints. Discrete Appl. Math., 99(1-3):39 54, 2000. 5