Sums of Combinatorial Games
Now that we know a little bit more
about combinatorial games such as subtraction games, we can start looking into
some more applications and games using nim-sum and the Sprague-Grundy Theorem. For
example, we can start to form new games by combining multiple games. You can
have many nim-pile subtraction games going on at once between two players.
Players will play the subtraction games as usual, but will continue playing
until all subtraction games have reached a terminal position, when there are no
more moves to be made in any of the games. This is called the disjunctive sum of combinatorial games.
These games will still be played in normal play, so the player to make the last
move out of all the games combined will be the winner. The different games
combined will not interact as each player must choose only one component to
play in per turn.
Here is
an example of sums of subtraction games:
Say we
have three piles.
One
pile would have 10 chips with subtraction set S={1,2}
The
second pile would have 12 chips with subtraction set S = {1, 2, 3}
The
last pile has 13 chips with subtraction set S = {1, 2, 3, 4}
There are still only two players, but the first player might
takes chips from the first pile while the second player could take chips from
the second pile. The players would continue playing like this until each
separate game within the disjunctive sum game were all at terminal positions.
In this case, there are three terminal positions at 0 chips for each separate
game. In order to analyze the sums of games further we need to learn a bit more
about the Sprague-Grundy values of disjunctive sums and how we go about finding
them.
The Sprague-Grundy Theorem
The Sprague-Grundy Theorem is also used to find the
Sprague-Grundy function for a disjunctive sum of graph games as long as the
Sprague-Grundy functions are known for the component games. The proof of this
theorem is explained by Ferguson on page 22 of the reading. First, the
disjunctive sum of games is denoted as the sum of all the graphs G1….Gn by G =
G1 + G2 + …. + Gn for n amount of games or graphs that are being combined.
The theorem that is used is Theorem 2 of Sprague-Grundy which
is pretty similar to Theorem 1 which Sam spoke briefly about the other day when
he was presenting on Sprague-Grundy values. Here is a summary of how theorem 2
goes:
Theorem: If g_i is the Sprague-Grundy
function of G_i, i=1,....n then G = G_1 + .... + G_2 has a Sprague-Grundy
function g(x_1, ... x_n)=g_1(x_1) ⊕ ... ⊕ g_n(x_n).
Proof:
Basically, the proof shows two things for
the function g(x_1,...x_n) when we let x=(x_1,...x_n) be an arbitrary point of X and we let b=g_1(x_1) ⊕ ... ⊕ g_n(x_n).
1)
For every non-negative integer a<b,
there is a follower of any of the points in X that has a g-value of a.
2)
No follower of (x_1, .... x_n) has a g-value of b
I’ll explain the proof more in class when
I present, but it’s important to know that the proof proves the above things. Ferguson
ends the explanation of the proof by saying that the theorem implies that every progressively bounded impartial game
is equivalent to some nim-pile. This means that it could be replaced by a
nim-pile of similar size without changing the outcome of the game.
Applications of Sums
Ferguson listed three applications for sums of combinatorial
games, and there are a lot of other ones too. I will only be going into depth
of one of them- the sums of subtraction games. This is something that we have focused
most on and are most familiar with, so I thought I would give an example of
sums of subtraction games.
Ferguson
gave the example that G(m) is the one pile subtraction game with subtraction
set S_m = {1,2,…,m} in which from 1 to m chips may be removed. Suppose we
summed together three subtraction games. The three games are:
m=3 and the pile has 9 chips
m=5 and the pile has 10 chips
m=7 and the pile has 14 chips
The game we are playing is G(3) +
G(5) + G(7) and the initial position is (9, 10, 14). In order to find the Sprague-Grundy
value of the sum of games, we must first find the Sprague Grundy values of each
individual game. For each game, the SG value is xmod(m+1). So for G(3) and
initial position at 9, the value is 1. When the initial position is 10 for
G(5), the SG value is 4. Then when the initial position is 14 for G(7), the SG
value is 6. Then, by theorem 2, we know that the SG value for the sum of the
subtraction games is the nim sum of each individual Sprague Grundy Value. In
this case, the Sprague Grundy Value = 1 ⊕ 4 ⊕ 6 = 3. A couple of
classes ago we proved that when the nim-sum is equal to 0, the person is in a
p-position. So, we want to try to make a move that gives a nim-sum of 0 in
order to put our opponent in a p-position. Ferguson gives us one optimal move
which he says is removing one chip from the pile of 14 and which gives a
Sprague-Grundy value of 5. He then says there is another optimal move. After
playing around with the nim-sum of these values, I found that another optimal
move would be to make the Sprague-Grundy value of 2 to the G(3) pile. We can
make this happen by leaving 6 chips in the pile that initially had 9, so we do
this by taking away 3 chips. Using theorem 2, can any of you find the optimal
moves to put your opponent in a p-position in the first example that I gave at
the beginning of the blog? I think that there are also two of them.
There
are many other applications that use the second Sprague-Grundy theorem and
involve the disjunctive sums of combinatorial games. I think that many of these
applications would be interesting to look further into for a potential final
project if anyone was interested!
Danielle, thank you very much for your post. You really made it easy to follow for what seems to be a rather complicated topic. I look forward to hearing further explanations tomorrow, especially for the part where you prove the theorem. I had a little question: can you take the SG-function of each game and add them together directly to be able to have a new equation that will provide SG-values for the new, combined game? Are there conditions that need to be satisfied in order for this to be possible? Thank you again, great post and I look forward to talking about the little challenge you gave us tomorrow.
ReplyDeleteSam
Hey Dani, great post! I really like the way you explain the disjunctive sum of combinatorial games. The example you gave really made the definition easier to understand and follow. And I'm very interested in the proof of the SG Theorem 2 and look forward to hearing your presentation. At the end of the proof part, you mentioned that the theorem implies that every progressively bounded impartial game is equivalent to some nim-pile. I got lost when you say progressively bounded impartial game and I googled it. I think I understand what progressively bounded means, but I still not sure about the entire sentence. Hope you can go over it in class tomorrow and it would be perfect if you could also provide some examples of it! Thanks again for your post and you did an excellent job!
ReplyDeleteAmber
Very good job of explaining the topic, especially regarding that you started simple and only brought up the more complicated ideas once the base facts were set. Concluding with the application, as well as offering a challenge, was a great touch.
ReplyDeleteFurther, you kept your G's, g's, and other notations separate and easy to follow, and you generally made it simple to follow along from one sentence to another. The post also piqued my curiosity:
I'm still not sure what makes a sum of combinatorial games disjunctive. What would a junctive sum of combinatorial games be?
How would you apply the theorem to games that are not similar to G(m)? That is, what if one of the games is sub(21, {2,3}) so you can't take away 1? Does the application of the theorem change?
Thanks again for your explanations, and I look forward to learning more in class.
I would guess that a sum of combinatorial games is disjunctive because the game breaks down into separate non-interactive components (i.e. you can only make a move in one game). If there were such a thing as the junctive sums you allude to, I suspect that you would be able to make a move in all of the games. I have a hunch that the Sprague-Grundy theorem would collapse in this scenario-- not to mention that the games would be weird....
DeleteExactly right, Jesse!
DeleteThis post is so precise and clear its great. You did a really great job. I didnt have anything to say initially but then I started reading the comments and I think I have to go off with what Bayard asked, and thats if the theory still applies to games that are not G(m)? This may be out of your knowledge but if you know it, Im excited to hear about it in class!
ReplyDeleteGreat post here, the text is very easy to follow, and coupled with the presentation you just gave, the application of the proof in this blog is very straight forward. I really liked how you walked us through an example during class as I understand this much better now. One question that I had after the presentation was again relating to the SG value for the sum of the games at a position. For instance in your example above, the SG value is 3, so after a little thought it is clear to take some chips from one of the piles to make the SG value 0, or a P-position. My question is whether it occurs that with getting a SG value for the sums that is not 0, is there a way to figure out how many legal options there are to get to a P-position? For example if the SG value of the sums is over 5 then there must be at least 2 ways to get to a p-position, or something like that. Great presentation!
ReplyDeleteWe can't figure that out just from the SG value. For example, the game
Deletesub(15, {1,2,3}) + sub(9, {1,2,3}) + sub(10,{1,2,3,4})
starts with SG value 3⊕1⊕0=2.
Looking at the SG values written out in binary, we have:
1 1
0 1
0 0
So we can get to nim-sum zero by either:
a) changing the 3 to a 1,
b) changing the 1 to a 3, or
c) changing the 0 to a 2
We can check that all these things are possible:
a) We can change this to a 1 by removing 2 chips from the first pile. This brings us to sub(13,{1,2,3}), which has SG value 13 mod 4 = 1. (Note: we could also have removed 6 chips or 10 chips from the first pile to the same effect.)
b) We can change this 1 to a 3 by removing either 2 chips to get to 7 chips, which gives us SG value 7 mod 4 = 3, or 6 chips to get to 3 chips, which gives SG value 3 mod 4 = 3.
c) We change this 0 to a 2 by removing any number of chips that would get us to some number c of chips which is equivalent to 2 mod 5. So we could go down to 2 chips (by removing 8 chips) or 7 chips (by removing 3 chips).
So in this case, we had SG value 2 for the game, and a total of 7 different moves that would bring us to a P-position.
On the other hand, suppose we played the game
sub(3,{1,2,3})+sub(1,{1,2,3}+sub(5,{1,2,3,4}).
This game starts with SG value 3⊕1&oplus0=2 as well. However, the moves corresponding to the 3 options above are now:
a) To change the 3 to a 1, we'd have to get down to some number of chips c where c = 1 mod 4. The only option for this is to remove 2 chips and get to 1.
b) To change the 1 to a 3, we'd have to get down to some number of chips c where c = 3 mod 4. But there's no way to do this, since we started off with only a single chip in the pile. So option (b) is out.
c) To change the 0 to a 2, we'd have to get down to some number of chips c where c = 2 mod 5. Our only option is therefore to remove 3 chips from the pile to get to 2.
So in this case, we had SG value 2 again, but we only have 2 legal moves.
We can't figure that out just from the SG value. For example, the game
Deletesub(15, {1,2,3}) + sub(9, {1,2,3}) + sub(10,{1,2,3,4})
starts with SG value 3⊕1⊕0=2.
Looking at the SG values written out in binary, we have:
1 1
0 1
0 0
So we can get to nim-sum zero by either:
a) changing the 3 to a 1,
b) changing the 1 to a 3, or
c) changing the 0 to a 2
We can check that all these things are possible:
a) We can change this to a 1 by removing 2 chips from the first pile. This brings us to sub(13,{1,2,3}), which has SG value 13 mod 4 = 1. (Note: we could also have removed 6 chips or 10 chips from the first pile to the same effect.)
b) We can change this 1 to a 3 by removing either 2 chips to get to 7 chips, which gives us SG value 7 mod 4 = 3, or 6 chips to get to 3 chips, which gives SG value 3 mod 4 = 3.
c) We change this 0 to a 2 by removing any number of chips that would get us to some number c of chips which is equivalent to 2 mod 5. So we could go down to 2 chips (by removing 8 chips) or 7 chips (by removing 3 chips).
So in this case, we had SG value 2 for the game, and a total of 7 different moves that would bring us to a P-position.
On the other hand, suppose we played the game
sub(3,{1,2,3})+sub(1,{1,2,3}+sub(5,{1,2,3,4}).
This game starts with SG value 3⊕1&oplus0=2 as well. However, the moves corresponding to the 3 options above are now:
a) To change the 3 to a 1, we'd have to get down to some number of chips c where c = 1 mod 4. The only option for this is to remove 2 chips and get to 1.
b) To change the 1 to a 3, we'd have to get down to some number of chips c where c = 3 mod 4. But there's no way to do this, since we started off with only a single chip in the pile. So option (b) is out.
c) To change the 0 to a 2, we'd have to get down to some number of chips c where c = 2 mod 5. Our only option is therefore to remove 3 chips from the pile to get to 2.
So in this case, we had SG value 2 again, but we only have 2 legal moves.
Nice post and presentation! Small notational note---I went ahead and changed "nim-sum" to the symbol we used in class to make it easier to read.
ReplyDelete(PS) I'd love to see the proof of the theorem here too at some point. :)
Great post!
ReplyDeleteI have a questions just to throw out there for everyone, so we did examples of the sum of three subtraction games with three different conditions (conditions being the amount of chips you can take and the amount of chips you start off with) Do you know of or think there would be an easier way or "trick" if it was three of the subtraction games with the exact same conditions?
Interesting question, Lauren. We can definitely realize one thing right away... Which is that if we have the sum of three subtraction games with the same conditions, we'd have an N-position if the underlying games were in an N-position, and a P-position otherwise! Here's how we can see that:
DeleteSuppose we have a game which us the sum of sub(n, S) + sub(n, S) +sub(n, S) (ie 3 copies of a subtraction game starting with n chips where S is some finite set of positive integers and we are allowed to remove any number s of chips where s is an element of S. Suppose the Sprague Grundy value of position n in sub(n, S) is a. Then by the theorem, the value of the position (n, n, n) in the sum of the games is a ⊕ a ⊕ a (where ⊕ means nim sum). But by the cancellation law, we know a ⊕ a = 0. We also know a ⊕ 0 = a. So a ⊕ a ⊕ a = a. So if a=0 this is a P-position and otherwise it's an N-position.
Nice question!
(PS) So this means that any odd number of games with the same conditions summed together gives us the same N and P-position profile as the underlying game. But if we have an even number of game summed together like this, it would ALWAYS be a P-position! Because we'd have (suppose we have 4 games here but any even number will work) :
Deletea⊕a⊕a⊕a = (a⊕a) ⊕(a⊕a) = 0 ⊕ 0 = 0.
So in this case, you should immediately decide to go second!