Squares and Circles

In the game of Squares and Circles, the players (you and your computer) start with a sequence of shapes: some circles and some squares. On each move a player selects two shapes. These two are replaced with a single one according to the following rule:

Identical shapes are replaced with a square. Different shapes are replaced with a circle.

At the end of the game, when only one shape remains, you are a winner if the remaining shape is a circle. Otherwise, your computer wins.

If the Random box is checked, computer (on Reset) will randomly select the length of the sequence (from 3 to 20). When the box is unchecked, you may set the number of shapes manually.

What kind of mathematics is related to the game? Think up a problem and find its solution.

Copyright © 1997 Alexander Bogomolny