Related Searches
Definitions
Nearby Words

# Kayles

In combinatorial game theory, Kayles is a simple impartial game. In the notation of octal games, Kayles is denoted . 077.

## Rules

Kayles is played with a row of tokens, which represent bowling pins. The row may be of any length. The two players alternate; each player, on his or her turn, may remove either any one pin (a ball bowled directly at that pin), or two adjacent pins (a ball bowled to strike both). Under the normal play convention, a player loses when he or she has no legal move (that is, when all the pins are gone). The game can also be played using misère rules; in this case, the player who cannot move wins.

## Analysis

Most players quickly discover that the first player has a guaranteed win in normal Kayles whenever the row length is greater than zero. This win can be achieved using a symmetry strategy. On his or her first move, the first player should move so that the row is broken into two sections of equal length. This restricts all future moves to one section or the other. Now, the first player merely imitates the second player's moves in the opposite row.

It is more interesting to ask what the nim-value is of a row of length $n$. This is often denoted $K_n$; it is a nimber, not a number. By the Sprague-Grundy theorem, $K_n$ is the mex of the options. For example,

$K_5 = mbox\left\{mex\right\}\left\{K_0 + K_4, K_1 + K_3, K_2 + K_2, K_0 + K_3, K_1 + K_2\right\},,$

because from a row of length 5, one can move to the positions

$K_0 + K_4,quad K_1 + K_3,quad K_2 + K_2,quad K_0 + K_3,text\left\{ and \right\} K_1 + K_2.,$

Recursive calculation of values (starting with $K_0 = 0$) gives the results summarized in the following table. To find the value of $K_n$ on the table, write $n$ as $12p + q$, and look at row a, column b:

Kayles nim-values through $K_\left\{83\right\}$
$K_n$ 0 1 2 3 4 5 6 7 8 9 10 11
0+ 0 1 2 3 1 4 3 2 1 4 2 6
12+ 4 1 2 7 1 4 3 2 1 4 6 7
24+ 4 1 2 8 5 4 7 2 1 8 6 7
36+ 4 1 2 3 1 4 7 2 1 8 2 7
48+ 4 1 2 8 1 4 7 2 1 4 2 7
60+ 4 1 2 8 1 4 7 2 1 8 6 7
72+ 4 1 2 8 1 4 7 2 1 8 2 7
At this point, the nim-value sequence becomes periodic with period 12, so all further rows of the table are identical to the last row.

## Applications

Because certain positions in Dots and Boxes reduce to Kayles positions, it is necessary to understand Kayles in order to analyze a generic Dots and Boxes position.

## History

Kayles was invented by Henry Dudeney . Richard Guy and Cedric Smith were first to completely analyze the normal-play version, using Sprague-Grundy theory. The misère version was analyzed by William Sibert in 1973, but he did not publish his work until 1989.

The name "Kayles" is an Anglicization of the French quilles, meaning "bowling."