Bulgarian solitaire
Bulgarian solitaire
In mathematics and game-theory, Bulgarian solitaire is a card game that was introduced by Martin Gardner.
Rules In the game, a pack of <math>N</math> cards is divided into several piles. Then for each pile, remove one card; collect the removed cards together to form a new pile (piles of zero size are ignored).
If <math>N</math> is a triangular number (that is, <math>N=1+2+\cdots+k</math> for some <math>k</math>), then it is known that Bulgarian solitaire will reach a stable configuration in which the sizes of the piles are <math>1,2,\ldots, k</math>. This state is reached in <math>k^2-k</math> moves or fewer. If <math>N</math> is not triangular, no stable configuration exists and a limit cycle is reached.