Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Sprague–Grundy theorem
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Combining Games=== Two games can be combined by '''''adding''''' their positions together. For example, consider another game of nim with heaps <math>A'</math>, <math>B'</math>, and <math>C'</math>. ===={{anchor|secondExample}}Example Game 2==== {{Pre| Sizes of heaps Moves A' B' C' 1 1 1 Alice takes 1 from A' 0 1 1 Bob takes one from B' 0 0 1 Alice takes one from C' 0 0 0 Bob has no moves, so Alice wins. }} We can combine it with our [[#firstExample|first example]] to get a combined game with six heaps: <math>A</math>, <math>B</math>, <math>C</math>, <math>A'</math>, <math>B'</math>, and <math>C'</math>: ===={{anchor|thirdExample}}Combined Game==== {{Pre| Sizes of heaps Moves A B C A' B' C' 1 2 2 1 1 1 Alice takes 1 from A 0 2 2 1 1 1 Bob takes 1 from A' 0 2 2 0 1 1 Alice takes 1 from B' 0 2 2 0 0 1 Bob takes 1 from C' 0 2 2 0 0 0 Alice takes 2 from B 0 0 2 0 0 0 Bob takes 2 from C 0 0 0 0 0 0 Alice has no moves, so Bob wins. }} To differentiate between the two games, for the [[#firstExample|first example game]], we'll label its starting position <math>\color{blue}S</math>, and color it blue: <math display="block">\color{blue}S = \Big\{ \big\{*1, \{*1\}, *2\big\}, \big\{*2, \{*1, \{*1\},*2\} \big\}, \big\{\{*1\}, \{\{*1\}\}, \{*1, \{*1\}, *2\}\big\} \Big\}</math> For the [[#secondExample|second example game]], we'll label the starting position <math>\color{red}S'</math> and color it red: <math display="block"> \color{red}S' = \Big\{\{*1\}\Big\}. </math> To compute the starting position of the [[#thirdExample|combined game]], remember that a player can either make a move in the first game, leaving the second game untouched, or make a move in the second game, leaving the first game untouched. So the combined game's starting position is: <math display="block"> \color{blue}S \color{black} + \color{red}S' \color{black}= \Big\{ \color{blue}S\color{black} + \color{red} \{*1\} \color{black} \Big\} \cup \Big\{ \color{red}S'\color{black} + \color{blue}\{*1, \{*1\}, *2\} \color{black}, \color{red}S'\color{black} + \color{blue} \{*2, \{*1, \{*1\},*2\} \} \color{black}, \color{red}S'\color{black} + \color{blue} \{\{*1\}, \{\{*1\}\}, \{*1, \{*1\}, *2\}\} \color{black} \Big\} </math> The explicit formula for adding positions is: <math>S+S'=\{S+s'\mid s'\in S'\}\cup\{s+S'\mid s\in S\}</math>, which means that addition is both commutative and associative.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)