In this section we study chocolate games using Grundy Number.
First we define Grundy number for the Chocolate that satisfy the inequality
, where
is a natural number.
Definition 4.1Let
be a natural number.
For
we define
, where
.
is the set of state that can be reached from the state
directly.
We define the function
.
Definition 4.2We define function
to be the least nonnegative integer not in the set
.
Example 4.1
,
.
Next we define Grundy Number.
Definition 4.3Let
.
For a state
we define Grundy Number recursively by
.
Theorem 4.1In chocolate games a state is an L-state of the game if and only if the Grundy number of the state is 0
.
This is a well known fact of Grundy Number. For a proof see [2].
Grundy Number is an effective tool to calculate L-states in combinatorial games, since by Theorem 4.1 we calculate L-states using Grundy Number .