IMPROVEMENTS ON CHOMP. Xinyu Sun Department of Mathematics, Temple University, Philadelphia, PA 19122, USA.

Similar documents
COMPUTER-ASSISTED AND COMPUTER-GENERATED RESEARCH IN COMBINATORIAL GAMES AND PATTERN-AVOIDANCE

Poset-Game Periodicity

ON THE THREE-ROWED CHOMP. Andries E. Brouwer Department of Mathematics, Technical University Eindhoven, P.O. Box 513, 5600MB Eindhoven, Netherlands

PLAYING END-NIM WITH A MULLER TWIST

OPTION-CLOSED GAMES RICHARD J. NOWAKOWSKI AND PAUL OTTAWAY

Impartial Games. Lemma: In any finite impartial game G, either Player 1 has a winning strategy, or Player 2 has.

#G4 INTEGERS 15 (2015) IMPARTIAL CHOCOLATE BAR GAMES

Theoretical Computer Science

Toppling Conjectures

We say that a polynomial is in the standard form if it is written in the order of decreasing exponents of x. Operations on polynomials:

SUMBERS SUMS OF UPS AND DOWNS. Kuo-Yuan Kao National Penghu Institute of Technology, Taiwan. Abstract

Introduction to Combinatorial Game Theory

CMPSCI 250: Introduction to Computation. Lecture 11: Proof Techniques David Mix Barrington 5 March 2013

Single Pile (Move Size) Dynamic Blocking Nim

arxiv: v2 [math.co] 9 Aug 2011

arxiv: v1 [math.co] 21 Sep 2015

Misère canonical forms of partizan games

Another bridge between Nim and Wythoff

Geometrical extensions of Wythoff s game

Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers

The Reduced Canonical Form of a Game

arxiv: v2 [math.co] 23 Mar 2012

1 Proof by Contradiction

Slow k-nim. Vladimir Gurvich a

One Pile Nim with Arbitrary Move Function

CHOMP ON NUMERICAL SEMIGROUPS

Wen An Liu College of Mathematics and Information Science, Henan Normal University, Xinxiang, P.R. China

IMPARTIAL CHOCOLATE BAR GAMES WITH A PASS. Ryohei Miyadera Kwansei Gakuin, Hyogo, Japan Maakito Inoue.

Martin Gardner and Wythoff s Game

Baltic Way 2003 Riga, November 2, 2003

SUMSETS MOD p ØYSTEIN J. RØDSETH

Aperiodic Subtraction Games

Lecture 7 Feb 4, 14. Sections 1.7 and 1.8 Some problems from Sec 1.8

#G03 INTEGERS 10 (2010), MIN, A COMBINATORIAL GAME HAVING A CONNECTION WITH PRIME NUMBERS

32 Divisibility Theory in Integral Domains

MATH10040: Chapter 0 Mathematics, Logic and Reasoning

THE RALEIGH GAME. Received: 1/6/06, Accepted: 6/25/06. Abstract

Math 016 Lessons Wimayra LUY

D. G. Horrocks 1 Department of Mathematics and Computer Science, University of Prince Edward Island, Charlottetown, PE C1A 4P3, Canada

Sprague-Grundy Values of the R-Wythoff Game

Theorem 1. Every P -position of the game can be written in the form (T n ; m 1 ; : : : ; m k?1 ), where the (k? 1)-tuples (m 1 ; : : : ; m k?1 ) range

Writing proofs for MATH 51H Section 2: Set theory, proofs of existential statements, proofs of uniqueness statements, proof by cases

Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers Solutions

Conjectures and proof. Book page 24-30

DYNAMIC ONE-PILE NIM Arthur Holshouser 3600 Bullard St., Charlotte, NC, USA, 28208

Variants of the Game of Nim that have Inequalities as Conditions

Reading and Writing. Mathematical Proofs. Slides by Arthur van Goetham

Algebraic Structure in a Family of Nim-like Arrays

Announcements. Read Section 2.1 (Sets), 2.2 (Set Operations) and 5.1 (Mathematical Induction) Existence Proofs. Non-constructive

Lecture 2: Connecting the Three Models

Direct Proof MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Direct Proof Fall / 24

= More succinctly we can write the preceding statements as

(x 1 +x 2 )(x 1 x 2 )+(x 2 +x 3 )(x 2 x 3 )+(x 3 +x 1 )(x 3 x 1 ).

The Composite Two-Step

AN UPDATE ON DOMINEERING ON RECTANGULAR BOARDS

Algebraic Structure in a Family of Nim-like Arrays

Notes on arithmetic. 1. Representation in base B

This article appeared in a journal published by Elsevier. The attached copy is furnished to the author for internal non-commercial research and

MATHEMATICAL INDUCTION

Section Summary. Proof by Cases Existence Proofs

COMBINATORIAL GAMES AND SURREAL NUMBERS

A Characterization of (3+1)-Free Posets

Recommended Reading. A Brief History of Infinity The Mystery of the Aleph Everything and More

FACTORIZATION AND THE PRIMES

A four parametric generalization of the Wythoff NIM and its recursive solution

Fundamentals of Mathematics I

The domination game played on unions of graphs

PUTNAM TRAINING MATHEMATICAL INDUCTION. Exercises

THE LOGIC OF QUANTIFIED STATEMENTS. Predicates and Quantified Statements I. Predicates and Quantified Statements I CHAPTER 3 SECTION 3.

SF2972 Game Theory Written Exam with Solutions June 10, 2011

arxiv: v1 [math.co] 27 Aug 2015

arxiv: v1 [math.co] 18 May 2018

A Generalized Uncertainty Principle and Sparse Representation in Pairs of Bases

Multiplication of Polynomials

Organization Team Team ID#

Champion Spiders in the Game of Graph Nim

At the start of the term, we saw the following formula for computing the sum of the first n integers:

On Aperiodic Subtraction Games with Bounded Nim Sequence

Discrete Math in Computer Science Solutions to Practice Problems for Midterm 2

7.5 Taking-and-Breaking Games

Chapter 2. Mathematical Reasoning. 2.1 Mathematical Models

NEW GAMES RELATED TO OLD AND NEW SEQUENCES

Binary dicots, a core of dicot games

PARTIAL NIM. Chu-Wee Lim Department of Mathematics, University of California Berkeley, Berkeley, CA , USA.

1 Predicates and Quantifiers

MAHARAJA NIM: WYTHOFF S QUEEN MEETS THE KNIGHT

ACCUPLACER MATH 0310

Math 3 Variable Manipulation Part 3 Polynomials A

Notes for Math 290 using Introduction to Mathematical Proofs by Charles E. Roberts, Jr.

Games Played by Boole and Galois

How many units can a commutative ring have?

Probing the Edge Template in Hex

DIMACS Technical Report March Game Seki 1

ORDINAL OPERATIONS ON SURREAL NUMBERS

A Family of Nim-Like Arrays: The Locator Theorem

Number Theory and Graph Theory. Prime numbers and congruences.

A Curious Connection Between Fermat Numbers and Finite Groups

Chapter 2.5 Random Variables and Probability The Modern View (cont.)

Who Wins Domineering on Rectangular Boards?

TEMPERATURE THEORY AND THE THERMOSTATIC STRATEGY

Transcription:

IMPROVEMENTS ON CHOMP Xinyu Sun Department of Mathematics, Temple University, Philadelphia, PA 191, USA xysun@math.temple.edu Received: 10/16/01, Revised: 4/9/0, Accepted: 5/17/0, Published: 5/0/0 Abstract The article extends the maple program in [TC] by calculating P-positions with arbitrary number of rows versus three rows. It also presents a formula similar to the one in [WW] by allowing the second column to have three pieces. 1. Introduction Chomp [CH] is a two-player game that starts out with an M by N chocolate bar, in which the square on the top-left corner is poisonous. A player must name a remaining square, and eat it together with all the squares below and/or to the right of it. Whoever eats the poisonous one (top-left) loses. The game can also be interpreted as two players alternately naming a divisor of a given number N, which may not be multiples of previously named numbers. Whoever names 1 loses. An example, given in [WW], shows if N =16 7, we have a chocolate bar like the following: 1 4 8 16 3 6 1 4 48 9 18 36 7 144 7 54 108 16 43 Thus, naming number 4 is to eat all the squares that are multiples of 4, i.e. the squares below and/or to the right of it. With infinite two-dimensional Chomp, the result is obvious, the first player eats the square at, then mimics his opponent s move by eating the same number of squares on the X-axis as his opponent eats on the Y -axis, and vice versa. David Gale offers a prize of $100.00 for the first complete analysis of 3D-Chomp, i.e. where N has three distinct prime divisors, raised to arbitrary high powers [GC]. As easy and lucrative as it seems, nobody has a complete analysis of FINITE D-Chomp yet!

INTEGERS: ELECTRONIC JOURNAL OF COMBINATORIAL NUMBER THEORY (00), #G01. What Do We Know Some trivial results can be easily seen. For example, any rectangular position is an N - position; any P-position with two rows must look like (α, α 1) (α >1), i.e. positions with α squares in the first row, and α 1 squares the second. An N -position does not necessarily have a unique winning move either. For example, (3,, 1) has three winning moves, (3, 1, 1), (,, 1), and (3, ). Ken Thompson found that 4 5 and 5 both are the winning moves for 8 10 [WW]. Some of the P-positions are given in [WW]. The author calculated some threerowed and four-rowed P-positions with the help of computers. Doron Zeilberger gives a computer program that finds patterns for three-rowed Chomp with the third row fixed in [TC]. The most complete result for special cases of Chomp with more than three rows was given in [WW]: for a Chomp position with x rows, and a squares in the first row, b squares in the second, and one square for the rest of the rows, to be a P-position it must have the following form: a+b if a + beven min{ a b, 3(a b) } if a + b odd 3. Results In this section we adopt the notation used in both [WW] and [TC], namely we use [a, b, c] to represent a three-rowed Chomp position with a + b + c squares in the first row, a + b in the second, a in the third. So, we are writing Chomp positions upside down. As we know, the formula for two-rowed P-positions are trivial, i.e. [a, 1] (a >0). And, it looks simple for three-rowed, with the third row fixed, since it always appears to be [a, b+x, c], where a, b, c are fixed integers and x is a symbolic variable for all non-negative integers. The simplest example might be [, x, ], which characterizes [, 0, ], [, 1, ], [,, ], [, 3, ]... as P-positions. The author created a Maple program to calculate Chomp P-positions of arbitrary number of rows and columns (to the limit of computers, of course). To our pleasure, things do get more complicated with more rows. Instead of having symbolic variables whose coefficients are 1 as in three-rowed Chomp, we can have coefficients larger than 1. For example, if the value of the bottom two rows of a four-rowed Chomp position is [, ], it is a P-position only when it is one of the following: [,, 1, 3], [,,, 3], [,, 3+x, 4], [,, 4 + x, ]. So in this case, instead of having one pattern for positions with a large number of squares, we have patterns that compliment each other, and yield the final formula.

INTEGERS: ELECTRONIC JOURNAL OF COMBINATORIAL NUMBER THEORY (00), #G01 3 To minimize the computational complexity, we fix the bottom k rows of positions with k rows, and try to find the appropriate formula. As shown in [TC], we use formal power series to calculate P-positions. Every Chomp position can be represented as a monomial in the formal power series 1/(1 x 1 )...(1 x k ). For example, [, 0, ] will be x 1x x 4 3 (remember we are reading the Chomp positions upside down). Now we can define weight on Chomp positions. For a position [x 1,..., x k ], we define x k has weight 1, x k 1 has weight, and so on. It is easily seen that the weight is the exact number of squares the position has. Since we are fixing all the rows except two, we are going to have a formal power series generating function that requires only two variables. So we have a generating function, 1 (1 x 1 )(1 x ) 1 [y 1,y,...,y k,w 1,w ] P [y 1,y,...,y k,w 1,w ] N x w 1 1 x w where [y 1, y,..., y k ] are the fixed bottom rows, P is the set of all known P-positions, N is the set of all N -positions derived from P. Once we find a new P-position, we update the generating function by inserting the new position into P and updating N correspondingly. The next P-position will be the monomial with a positive coefficient and the least weight. Of course, during the calculation, positions might be deducted from the formal series multiple times, e.g. [1, 1, 1] ((3,, 1) if we use the original notation), but all this does is to change the coefficient from 1 to a negative number instead of 0, which does not have any effect on our result. Since we do not know the coefficient β of the patterns α + βx with x as the symbolic variable for all the non-negative integers, we have to make educated guesses for the values in the Maple program. Whenever the program finds a pre-defined number of positions with the same number of rows, the values of the second rows form an arithmetic series whilst the other rows are identical, it tries to validate the formula. For example, positions like [,, 3, 4], [,, 5, 4], [,, 7, 4] and [,, 9, 4] suggest the formula [,, 3 + x, 4]. The newly generated formula will be checked against the existing P-positions by verifying that the formula will not create any known N -positions. Of course the formulas can still be erroneous and the program is capable of correcting itself by eliminating the formula when that happens. The formulas are validated when no more P-positions can be generated. The life cycle of a conjecture is completed once a formula is validated or corrected. The computer program was written in Maple, and can be downloaded at http://www.math.temple.edu/ xysun along with some pre-calculated results. Type in Help() for help. People can also play Chomp against a computer. Type in Play- Chomp(POS) where POS is the initial position. The user and computer will take turns to name the piece they want to erase from the position. The program uses precalculated results. If the computer cannot find a winning move, or if the position is beyond the range of the results, the program will randomly eliminate a piece from the position so the game will go on.

INTEGERS: ELECTRONIC JOURNAL OF COMBINATORIAL NUMBER THEORY (00), #G01 4 With the help of the program, we have the following: Theorem 1: For a Chomp position with x rows, a squares in the first row, b squares in the second, two squares in the third, and one square for the rest of the rows, to be a P-position, it must satisfy the following formula: 1 if a =1 if a = b +1 a+b if a + b odd and a b +1 3a +1 if a = b min{ a b, 3(a b) } if a + b even and a b Definition: We call the height h of a Chomp position [a 1,...,a n ]tobethenumberx such that either [1, 0,...,0,a 1 1,...,a n ](x >n), or [ n x+1 k=1 a k,a n x+,...,a n ](x n) }{{} x is a P-position, and we write h([a 1,...,a n ]) = x. We are trying to either chomp the position to have only x rows left, or add x n onesquared rows to the position so that the result is a P-position, e.g. h([1, 0,...,0])=1, h([, 0,...,0]) = n + 1, and h([a }{{} 1,...,a n 1,a n 1 + 1]) =. The following lemma assures n us the existence and the uniqueness of the height for any Chomp position. Let us first denote F ([a 1,...,a n ]) to be the set of followers of [a 1,...,a n ], i.e. all the positions that can be derived from the position by one chomp, and mex({b 1,...,b m }), the M inimal EXclusion, to be the least nonnegative integer that is not in the set {b 1,...,b m }. Lemma 1: For any Chomp position [a 1,...,a n ], h([a 1,...,a n ]) uniquely exists, and h([a 1,...,a n ]) = x, if there exists an x n such that [ n x+1 k=1 a k,a n x+,...,a n ]isapposition; otherwise h([a 1,...,a n ]) = mex{h([a 1,...,a n]) [a 1,...,a n] F([a 1,...,a n ])}. Proof: The case for x n is trivial by the definition of h. If such an x does not exist, and y = mex{h([a 1,...,a n]) [a 1,...,a n] F([a 1,...,a n ])}, then y>nand the followers of [1, 0,...,0,a 1 1,...,a n ]) are all N -positions by the definition of mex, therefore the }{{} y position itself is a P-position. For the uniqueness part, we only have to notice that for any two positive integers x 1 <x, the position generated by the methods above using x 1 is the follower of the one generated using x, thus at most one of them is a P-position. Now we can rewrite the theorem as

INTEGERS: ELECTRONIC JOURNAL OF COMBINATORIAL NUMBER THEORY (00), #G01 5 Theorem 1 : h([,b,a b]) = 1 if a =1 if a = b +1 a+b if a + b odd and a b +1 3a +1 if a = b min{ a b, 3(a b) } if a + b even and a b Proof of Theorem 1: Notice that the result is strikingly similar to the one given in [WW] except when a = b and a = b + 1, and the two results compliment each other perfectly. We denote the number of squares of the first, second, and third rows as α, β and γ respectively, and those of the first and second columns x and y. In our case, we only consider the positions with y = 3 and γ =: X X X X X X X X X X X X X α X X X X X β X X γ X X X x y The first two scenarios for 1, are trivial and we will avoid those cases in the discussion below. By Lemma 1, we have to consider the height of all the followers of [,b,a b]. From the position, we can chomp to the first row up to b +1 (b<α<a, β=b, and γ = ) (1) the first and the second row (α = β, β b, and γ = ) () the second row only (α = a, β < b, and γ = ) (3) the second and third row (α = a, β =1and γ = 1) (4) the third row only (α = a, β = b and γ = 1) (5) By proper induction on a and b, we can deduct the following equations: min { 3(α b), } α b if b<α<a, α+beven (6) α+b if b<α<a, α+b odd (7) 3β +1 if 1 <β b (8) min { 3(a β), } a β if β < b, a + βeven (9)

INTEGERS: ELECTRONIC JOURNAL OF COMBINATORIAL NUMBER THEORY (00), #G01 6 a+β if β < b, a + β odd (10) a (11) a+b if a + beven (1) min { } a b, 3(a b) if a + b odd (13) where equation 1 yields equations 6 and 7, yields 8, 3 yields 9 and 10, 4 yields 11, 5 yields 1 and 13 It is easy to see that 3(α β) (α β) iffα β So from equation 6 we can have: 3(α b) either when α b and α + beven which yields: (α is always incremented by in the following arguments) 3,..., 3b incremented by 3 if b even and a b (14) and α = b +,...,b x= 3,..., 3(b 1) incremented by 3 if b odd and a b (15) and α = b +,...,b 1 x= 3,..., 3(a b ) incremented by 3 if a + b even and a b (16) and α = b +,...,a x= 3,..., 3(a b 1) incremented by 3 if a + b odd and a b (17) and α = b +3,...,a 1 which yields: α b or when α b and α + beven 3b a b 4,..., incremented by if a even, b even (18) and α =b,...,a x= 3b+3 a b 3,..., incremented by if a odd, b odd (19) and α =b+1,...,a x= 3b+3 a b 1,..., incremented by if a even, b odd (0) and α =b+1,...,a 1 x= 3b a b,..., incremented by if a odd, b even (1) and α =b,...,a 1 From equation 7: 3b+6 a+b,..., incremented by ifaevenandbeven ()

INTEGERS: ELECTRONIC JOURNAL OF COMBINATORIAL NUMBER THEORY (00), #G01 7 and α = b +3,...,a 1 x= 3b+5 a+b 3,..., incremented by if a odd and b odd (3) and α = b +3,...,a 1 x= 3b+5 a+b 5,..., incremented by if a even and b odd (4) and α = b +3,...,a x= 3b+6 a+b 4,..., incremented by if a odd and b even (5) and α = b +3,...,a Note that we are avoiding the case α = β +1. From equation 8 we have 4, 5, 7, 8,..., 3b + 1 (6) which are all the numbers from 4 to 3b + 1 that are NOT divisible by 3. From equation 9 the result is similar to that from equation 6. From equation 10 a +1,...,a+ b ifaevenandbeven (7) a +1,...,a+ b 1 if a odd and b odd (8) a +1,...,a+ b if a odd and b even (9) a +1,...,a+ b 3 if a even and b odd (30) Equations 11, 1 and 13 result in constant numbers that require no further discussion. Now we can deduct our result from the equations. Assuming a b, wehave: xalways covers 3,..., 3b+ from equations 14, 15 and 6. x covers 3b+4 a b,..., but not a b = a b if a even and b even from equations 18 and. Note that the values from the two equations are mutually exclusive, and had x covered a b, it would have appeared in equation 18, which does not. x covers 3b+3 a b 1,..., but not a b+1 = a b 19 and 3, by similar reasoning as shown above. if a odd and b odd from equations All the other equations are either dealing with a + b odd, or have result bigger that a b. So the height of the position, which is the least number NOT in the above numbers, is a b when a + b even.

INTEGERS: ELECTRONIC JOURNAL OF COMBINATORIAL NUMBER THEORY (00), #G01 8 If a even and b odd, x covers 3b+3 a b+1,..., from equations 0 and 4; a b+1,...,a 1 from 9 since a b; a from 11; a +1,...,a+ b 3 from 30. And the other equations are insignificant as discussed above. So the height of the position is a + b 1 = a+b. If a odd and b even, x covers 3b+4 a b,..., from equations 1 and 5; a b,...,a 1 from 9 since a b; a from 11; a +1,...,a+ b from 9. And the other equations are insignificant as discussed above. So the height of the position is a + b = a+b. Hence we have proved when a b, a+b a b if a + b odd if a + beven The rest of the proof, i.e. when a = b and b<a<b, is similar to the above, and is left to the interested readers. 4. Future Work It will be interesting to find out the formulas for the P-positions with the second columns having more than three squares or the formulas for other 3-rowed positions. Also, since we are looking for the P-positions, it will be worthwhile to find out the formula for the Sprague-Grundy function. Finally, can we eventually claim the $100.00 prize from David Gale? 5. Acknowledgement Many thanks to my advisor Dr. Doron Zeilberger. Without his help, this article would not be here. Also many thanks to the referee for his suggestions which made this article much clearer. References [CH] D. Gale, A Curious Nim-type game, Amer. Math. Monthly 81 (1974), 876-879 [GC] Richard J. Nowakowski, Games of No Chance, Cambridge University Press, 1998, 48 [TC] Doron Zeilberger, Three-Rowed CHOMP, Adv. Appl. Math. v. 6 (001), 168-179 [WW] E. R. Berlekamp, J.H. Conway, and R. K. Guy, Winning Ways for Your Mathematical Plays, Academic Press, London, 198. 598-599