DeepAI
Log In Sign Up

Partition games are pure breaking games

03/07/2018
by   Antoine Dailly, et al.
0

Taking-and-breaking games are combinatorial games played on heaps of tokens, where both players are allowed to remove tokens from a heap and/or split a heap into smaller heaps. Subtraction games, octal and hexadecimal games are well-known families of such games. We here consider the set of pure breaking games, that correspond to the family of taking-and-breaking games where splitting heaps only is allowed. The rules of such games are simply given by a list L of positive integers corresponding to the number of sub-heaps that a heap must be split into. Following the case of octal and hexadecimal games, we provide a computational testing condition to prove that the Grundy sequence of a given pure breaking game is arithmetic periodic. In addition, the behavior of the Grundy sequence is explicitly given for several particular values of L (e.g. when 1 is not in L or when L contains only odd values). However, despite the simplicity of its ruleset, the behavior of the Grundy function of the game having L = 1, 2 is open.

READ FULL TEXT VIEW PDF

page 1

page 2

page 3

page 4

01/05/2021

Partizan Subtraction Games

Partizan subtraction games are combinatorial games where two players, sa...
07/01/2020

Some i-Mark games

Let S be a set of positive integers, and let D be a set of integers larg...
07/31/2018

Computing the Strategy to Commit to in Polymatrix Games (Extended Version)

Leadership games provide a powerful paradigm to model many real-world se...
04/18/2018

Faster Evaluation of Subtraction Games

Subtraction games are played with one or more heaps of tokens, with play...
09/20/2022

NFTs: The Game is Afoot

On the blockchain, NFT games have risen in popularity, spawning new type...
06/04/2019

Snackjack: A toy model of blackjack

Snackjack is a highly simplified version of blackjack that was proposed ...
01/28/2022

How to avoid uncompetitive games? The importance of tie-breaking rules

In a round-robin tournament, if the final position of a team is already ...

1 Introduction and context

Integer partition theory, related to Ferrer diagrams and Young tableaus, is a classical subject in number theory and combinatorics, dating back to giants such as Lagrange, Goldbach and Euler; it concerns the number of ways you can write a given positive integer as a sum of specified parts. In most generality, to each positive integer , there belongs a number , which counts the unrestricted number of ways this can be done. For example , so . We may index this partition number by saying exactly how many parts is required, and write for the number of partitions of in exactly parts. Thus, in our example, and . We could also define

and so on. The number of partitions can be beautifully expressed via generating functions, where recurrence formulas, congruence relations, and several asymptotic estimates are known, proved more recently by famous number theorists such as Ramanujan, Hardy, Rademacher and Erdös in the early 1900s. About the same time, a theory of combinatorial games was emerging, via contributions by Bouton, Sprague and Grundy and others, seemingly unrelated to the full blossom of number theory.

An integer partition game can be defined by 2 players alternating turns and by specifying the legal partitions, say into exactly 2 or 3 parts, until the current player cannot find a legal partition of parts, and loses. Thus, from position 4, then are the legal move options—if you play to you win, and otherwise not. It turns out that the idea for how to win such games is coded in a ‘game function’, discovered independently by the mathematicians Sprague and Grundy, which, buy the way, has no apparent relation to the partitioning function. For example, the partition functions are nondecreasing, but if a Sprague-Grundy function is nondecreasing the game is usually rather trivial, such as the game of Nim

on one heap. Let us begin by giving the relevant game theory background to our results, that most of the partition games, a.k.a.

pure breaking games, are either periodic or arithmetic periodic.

1.1 Taking-and-breaking games: definitions and notations

Taking-and-breaking games [WW] are 2-player impartial combinatorial games with alternating play. A game position is represented by a set of heaps of tokens. A move consists in choosing a single heap, removing some tokens from it, and possibly splitting the remaining heap into several heaps. If splitting is not allowed, we have (pure) subtraction games. In this case, the rules are given by a set of positive integers which specifies the number of tokens that can be removed from the heap. When the heap may be split, the rulesets are often given by a code that specifies how many tokens can be removed and the number of heaps that one heap can be split into. For example, the family of games for which a heap can be split into at most two heaps is called octal games. This name is due to an explicit way to express any ruleset with an octal code with an integer, for . More precisely, each value with can be encoded in binary with three digits . The ruleset allows to remove tokens from a heap and split it into non-empty heaps if and only if . The value equals or according to whether it is allowed (value ) or not (value ) to split a heap without removing any token. The family of hexadecimal games is a natural extension of octal games, in which a heap can be split into at most three heaps. Variants of octal games where the ruleset also allows to split a heap without removing any token have also been considered in the literature, starting from Grundy’s Game in 1939 [grundygame].

The purpose of the current work is to extend such rulesets to allow a heap to be split into a selected number of heaps.

We first recall standard definitions in combinatorial game theory and use the notations introduced in [Siegel] for taking-and-breaking games. In particular, a heap of size will be denoted . When the ruleset is clear, we associate the game played on the heap of size with the positive integer . A game with heaps of respective sizes is considered as a disjunctive sum of heaps and will be denoted by a -tuple . An option of a game is a game that can be reached in one move.

The Grundy value of a game , denoted by , is a nonnegative integer given by

where is the smallest nonnegative integer that does not belong to the set . In the rest of the paper, an option of over non-empty heaps will be denoted . The Grundy value of a game allows to determine the winner. Indeed, a game satisfies if and only if it is a second player win.

From the Sprague-Grundy theory, one can compute the Grundy value of a -heap game from the Grundy value of each -heap game. More precisely, we have

where is called the Nim-sum operator and corresponds to the XOR applied to integers written in binary. The Nim-sum of the same terms will be denoted . By definition of the XOR operator, it equals or according to the parity of .

1.2 Regularities in taking-and-breaking games

Given a taking-and-breaking game, its -sequence is the sequence . Finding regularities in -sequences is a natural objective as it may lead to polynomial-time algorithms that compute the -values of the game. In particular, periodic behaviors are often observed. A game is said to be ultimately periodic with period and preperiod if there exist and such that for all . Periodic games are those for which there is no preperiod.

For example, it is well known (see [Siegel], Theorem 2.4) that all finite subtraction games are periodic. For octal games, the behavior of the -sequences is not fully understood. It has been conjectured by Guy that every octal game is ultimately periodic. Many games were proved to satisfy this conjecture, such as , or . In some cases, the values of the period and the preperiod are huge (e.g. has a period of and a preperiod of ). On his webpage [octal], Flammenkamp maintains a list of octal games with known and unknown periodicities.

As explained in [Hexa], some hexadecimal games also satisfy these properties of normal periodicity (e.g. , ). In addition, another types of behavior have been exhibited for hexadecimal games, namely arithmetic periodicity. A taking-and-breaking game is said to be arithmetic periodic with period , saltus , and preperiod if there exist three integers , and such that its -sequence satisfies for all . This kind of behavior never occurs in octal games [austin] but makes sense in the context of hexadecimal games where the Grundy values may not be bounded. For example, the games or are proved to be arithmetic periodic with period and saltus in [Hexa]. Note that normal and arithmetic periodicities are not the only kinds of regularities that have been detected in hexadecimal games. In [LIP], the game is said to be sapp-regular, which means that the -sequence is an interlacing of two periodic subsequences with an arithmetic periodic one. This behavior also occurs in variants of octal games where pass moves are allowed [pass]. In [Hexa], the game satisfies , except . In [ruler], Grossman and Nowakowski introduce the notion of ruler regularity that arises in the games with an odd number of 0s in the hexadecimal code. Roughly speaking, it corresponds to a kind of arithmetic periodic sequence where new terms are regularly introduced that double the length of the apparent period.

For a better understanding of taking-and-breaking games, the question of how to detect a possible regularity using just a small number of computations is paramount. For example, the Subtraction Periodicity Theorem, found in the Chapter 4 of [Siegel], ensures that for a given subtraction game on the set , it suffices to find a repetition of consecutive Grundy values, to establish ultimate periodicity. Concerning octal games, there is a similar result that has been extensively used to prove the ultimate periodicity of some -sequences.

Theorem 1.

[Octal periodicity test] Let be an octal game of finite length . If there exist and such that

then is ultimately periodic with period and preperiod .

Such kind of testing properties have also been considered for hexadecimal games. In [austin], Austin yields a first set of conditions to guarantee the arithmetic periodicity of hexadecimal games with a saltus equal to a power of . A complementary result was later given by Howse and Nowakowski [Hexa] for hexadecimal games having an arbitrary saltus. In both cases, several types of computations must be done. In particular, the arithmetic periodicity must be checked on a range of values much larger than in Theorem 1 (at least seven times the expected period).

1.3 Pure breaking Games

In view of the above results, there is a large gap between the understanding of octal and hexadecimal games. It turns out that allowing a heap to be split into three parts may significantly change the possible behaviors of the -sequences. In the current paper, we explore how the -sequences behave when increasing the number of possible splits of a heap. As one expects that the complexity of this generalization also increases accordingly, we have chosen to focus on breaking games only, i.e., games where it is not allowed to remove tokens from a heap. Grundy’s game [grundygame, octal] and Couples-are-Forever [couples] are two well-known examples of such games. In the first one, a move consists in choosing a heap and splitting it into two heaps of different sizes. The latter one allows to split any heap of size at least three into two heaps. For both games, no regularity in the -sequence has been observed yet. In the current study, we will consider pure breaking games, i.e., games for which there is no additional constraint to the number of splits. The rulesets of such games will thus be given by a set of integers corresponding to the number of heaps that one heap can be split into.

Definition 2.

Let be a set of positive integers, called the cut numbers. We define the pure breaking game PB() as the heap game such that has the following options

In other words, in PB(), a move consists in choosing a heap and splitting it into non-empty heaps with . Such a move will be called a k-cut. For example, for the game PB() with , the heap has the following set of options:

Without loss of generality, we will assume that each set is ordered such that . In this paper, we will consider instances of PB() for different sets and examine their -sequence. A first result ensures that an equivalent of the octal game conjecture is not available for pure breaking games. Indeed, the following lemma establishes that if an even cut number belongs to , the Grundy values are not bounded.

Lemma 3.

Let PB() be a pure breaking game, where contains at least one even integer. Let be the smallest even integer in .

For every pair such that , we have .

Proof.

We reason by contradiction. Let and be two different integers such that and . We have and for some . We assume without loss of generality that .

From a heap of counters, one can play to the option obtained by an -cut. Since is even, , and thus , which contradicts our hypothesis. ∎

This result means that pure breaking games are somehow closer to hexadecimal games than octal games. One can then wonder whether the complexity of the -sequence increases with . It does not seem to be the case, as we will show that in almost all cases, the -sequence is either periodic or arithmetic periodic. In Section 2, we consider several families of pure breaking games (e.g. those where , or those with only odd values in ) and prove their periodicity or arithmetic periodicity. For the remaining families, many games seem to have an arithmetic periodic behavior. To deal with them, we provide in Section 3 a set of testing conditions that are sufficient to show that a game is arithmetic periodic, and apply them to particular instances. Finally, in Section 4 we list the remaining sets for which the regularity of the -sequence of PB() remains open.

2 Solving particular families of pure breaking games

In this section, we study specific families of pure breaking games. All the following results will be proved by contradiction. In each case, we will suppose that there exists an integer for which the Grundy value is different from what was expected. By decomposing into specific options, we will exhibit a contradiction. All the families will be proved to have arithmetic periodic sequences. We are going to use the following notation: , which describes the arithmetic periodic sequence of period and saltus for which the first values are . If a subsequence is repeated times, we will write . Thus, for example, the notation denotes the arithmetic periodic sequence of period 6, saltus 3, and with first six values 0,1,2,0,1,2. We also use the notation (with ) to describe the set of all the integers from to .

First, we study the games in which is not an allowed cut number. In this case, optimal play is reduced to using only , and the Grundy sequence is arithmetic periodic with period and saltus 1.

Proposition 4.

Let be a set of cut numbers such that . Then, PB() has a Grundy sequence of .

Proof.

We prove this result by contradiction. If is a positive integer, then there exists a unique couple of nonnegative integers such that : and . We want to prove that for every positive integer , .
Assume that is the smallest positive integer such that .

Let . Suppose . Then there exists an -cut of such that . By minimality of , . Moreover, since is an option of , we have:

In particular, as we have . However, since we have .

This implies that .

This is a contradiction since which implies .

Thus, there is no option of with Grundy value , hence .

Now we prove that the heap of size has options of Grundy values for . There are two cases:

  1. If is even, then for , let be an -cut. This always exists since . Moreover it is an option of : . Furthermore, we have . Since by minimality of , and is even which implies (, we have .

  2. Otherwise, for all , we define an option of , obtained by an -cut, such that . We have two subcases:

    1. If is odd, let

      This always exists since (if then there are only the first four heaps) and is even. Moreover, it is an option of :

      Furthermore, we have

      since by minimality of and .

    2. If is even, let

      This always exists since (if then there are only the first four heaps) and and are odd so is even. Moreover, it is an option of :

      Furthermore, we have

      since by minimality of and .

This proves that we have at least an option with Grundy value for all , and thus that , a contradiction.

Consequently, there is no counterexample to the sequence . ∎

Now, we consider the pure breaking games in which the players are allowed to split a heap into two heaps. We first show that if contains only odd cut numbers, then the Grundy sequence of PB() is periodic with period .

Proposition 5.

Let be a sequence of odd cut numbers. The game PB() has a Grundy sequence of .

Proof.

We prove this result by contradiction. Let be the smallest positive integer for which the Grundy value of a heap of size does not match with the sequence .

First assume that is even. We will prove that all the options of have Grundy value . Let be an option of . Note that exists since and . Since all the values of are odd, contains an even number of non empty heaps whose sum is even. Hence contains an even number of odd-sized heaps. Since all the heaps in are strictly smaller than , their Grundy values satisfy the sequence , which implies that contains an even number of heaps of Grundy value . Therefore, we have and thus . Hence our counterexample is necessarily odd.

We will show that has no option of Grundy value . It is straightforward if has no option. Otherwise, let be an option of . Since all the values of are odd, contains an even number of non empty heaps whose sum is odd. Hence contains an odd number of odd-sized heaps and an odd number of even-sized heaps. Since all the heaps in are strictly smaller than , their Grundy values satisfy the sequence , which implies that contains an odd number of heaps of Grundy value . Hence and thus .

Consequently, there is no counterexample to the sequence . ∎

Next, we study the pure breaking games in which the players can split a heap into two, three or four heaps. In this case, even if the players are allowed to split a heap into more than four heaps, then the Grundy sequence is arithmetic periodic with period 1 and saltus 1.

Proposition 6.

Let and be a sequence of cut numbers. The game PB() has a Grundy sequence of .

Proof.

We prove this result by contradiction. Let be the smallest positive integer such that . Note that since we have and .

Suppose first that . Then has an option such that:

However, , and since we have

a contradiction.

Thus, there is no option of with Grundy value , which implies .

We now prove that, from a heap of counters, we can play to an option of Grundy value for all , which will lead to a contradiction.

If , then let which is clearly an option of with Grundy value by minimality of . Otherwise, let . There are two cases:

  1. If is even, then there are two subcases:

    1. If is odd, , let

      obtained by a -cut. It is an option of and by minimality of , .

    2. If is even, , let:

      obtained by a -cut. It is an option of and by minimality of , .

  2. If is odd, then there are two subcases:

    1. If is odd, , let:

      obtained by a -cut. It is an option of and by minimality of , .

    2. If is even, , let:

      obtained by a -cut. It is an option of and by minimality of , .

Thus, for both cases, , a contradiction.

Consequently, there is no counterexample to the sequence . ∎

Finally, we study the pure breaking games where the players can split a heap into 2, 4 or heaps. In this case, the Grundy sequence is arithmetic periodic with period and saltus 2. Note that this result includes the Grundy sequence of PB().

Proposition 7.

Let and be a sequence of positive integers. Then, PB() has a Grundy sequence of .

Proof.

We want to prove that for all , . We are going to proceed by contradiction. Let , , be the smallest positive integer such that . Note that since we have and .

Assume first that . Then has an option with such that .

As is an option of with Grundy value and is minimal, we have, on one hand :

The second equality holds since is a power of two and for all , .
On the other hand we have:

Since is the quotient of by , we have that , and since , we have .
In particular . Here we have two cases:

  1. If , then we have , a contradiction.

  2. If , then we have:

    (the third equality holds by Lemma 10, the fourth one since is odd), a contradiction.

Thus, there are no options of with Grundy value , which implies .

We now prove that, from a heap of counters, we can play to an option of Grundy value for any in , which will lead to a contradiction. There are two cases:

  1. If is even, then and from a heap of size we can play to:

    1. for all , the options:

      obtained by a -cut. By minimality of , . By doing this, we obtain the even Grundy values in .

    2. if , for all , the options:

      obtained by a -cut. By minimality of , since . By doing this, we obtain the odd Grundy values in and the value is obtained by the option .

    3. if , for all , the options:

      obtained by a -cut. By minimality of , since is even. By doing this, we obtain the odd Grundy values in .

    Putting the three previous cases altogether, this implies , being a contradiction.

  2. If is odd, then , and from a heap of size we can play to:

    1. for all , the options:

      obtained by a -cut. By minimality of , . By doing this, we obtain the odd Grundy values in .

    2. for all , the options:

      obtained by a -cut. By minimality of , . By doing this, we obtain the even Grundy values in and the value is obtained by the option .

    Altogether, this implies , a contradiction.

Consequently, there is no counterexample to the sequence . ∎

Note that when , the previous result gives the same result than Proposition 6 when (and as such, ).

If the above results cover a large range of pure breaking games, there remain several families of games for which we were not able to have direct proofs. Yet, many of them seem to have an arithmetic periodic behavior. The next section is devoted to build a set of tests that would allow to prove (with a restricted number of computations) that a given game is arithmetic periodic. We then use this test to prove that some games have an arithmetic periodic sequence.

3 An arithmetic periodicity test for pure breaking games

The purpose of this section is to provide, for pure breaking games, a result similar to the octal and hexadecimal periodicity tests (see Theorem 1 for the first one, and see [Hexa] for the latter one). We give an explicit way to prove that a pure breaking game is arithmetic periodic by computing as few values as we can. Recall that for octal games, the number of computations to prove the periodicity is in the range of twice the period, whilst it takes at least 7 times the period to prove the arithmetic periodicity of hexadecimal games (together with a couple of additional tests). In section 3.1, we prove that computing at most the first values of the -sequence (where is the expected period, which should be determined by a blind computation) is enough to prove arithmetic periodicity. We will also show that in some cases (depending on ), the first values are even sufficient (section 3.2).

3.1 The -test

In this section, we describe the so-called -test that will be used to prove the arithmetic periodicity of a pure breaking game. First recall that if is a function defined over an interval , then restricted to is noted ; and the set of the images of is . We now define the -test as follows:

Definition 8 (Arithmetic-Periodic Test (-test)).

Let PB() be a pure breaking game and denote by its Grundy function. We say that PB() satisfies the -test if there exist a positive integer and a power of two such that:

  1. for , ,

  2. , and

  3. for all in and for all in , admits an option over non-empty heaps such that and .

The first two conditions are rather standard to prove the periodicity of taking-and-breaking games: similar conditions are required in the Subtraction Periodicity Theorem and in the Octal Games Periodicity Theorem. However, contrary to those, we need the saltus to be a power of two in order to prove the arithmeric periodicity. The third condition seems more unusual. We will see in the next subsection that for some values of , the third condition can be directly deduced from and and does not need to be checked. We now state the main result of this section:

Theorem 9.

Let be a set of positive integers, with and such that PB() verifies the test . Then for all , .

In other words, if a pure breaking game verifies the -test, then it is arithmetic periodic. Note that in the -test, the saltus of the sequence is always a power of 2.

In order to prove this result, we need some technical lemmas. The first one is a well-known result that claims that the Nim-sum and the sum of the same set of positive integers have the same parity and that the Nim-sum cannot be greater than the sum.

Lemma 10.

Let be positive integers. We have

and

Proof.

Let be positive integers. Without loss of generality, we can assume that for some , are all odd and are all even.
If is odd, then there is an even number of odd integers, and their Nim-sum and their sum are even. If is even, then there is an odd number of odd integers, their Nim-sum and their sum are then odd.

Now, let , and . There are, for , non-negative integers and such that and for all , . If then there is at least one such that , hence in the sum there is a term on . This being true for all , the sum is such that . ∎