# Group theory in games

This is a survey article related to:group

View other survey articles about group

Some popular mathematical games have a group-theoretic foundation, and in some cases, group theory helps provide strategies to win these games. In this article we discuss how the different facets of the definition relate with the different ways in which groups turn in in games.

## Contents

## Groups, games and moves: the loose idea

Group are useful in modeling games that involve a series of discrete moves, with each move leading to a change in the *board state*. The loose idea is to identify each possible *move* with an element of a certain huge group, where the effect of performing a sequence of moves corresponds to the *product* of those elements. However, not every game with moves can be modeled using a group. Let's first look at some examples of games:

- The fifteen puzzle is a game involving fifteen pieces labeled 1-15 on a four-by-four board. There is one blank space, which, at the beginning, is the one on the lower right corner. A move of the game involves moving a piece into the current blank space from one of the positions sharing an edge with it. The goal is to reach some other specified configuration of the board.

Each *move* can thus be specified by stating which piece goes into the blank space. Alternatively, it can be specified by stating which position the piece moves from, and which position it goes to. Performing a sequence of moves gives some rearrangement (permutation) of the group. Thus, the group modeling this game is the group of permutations on sixteen letters, with the moves being a (restricted) set of elements of the group, and the composition of moves resulting in the multiplication of the corresponding group elements.

- The Rubik's cube is another game where the various
*moves*involve specific permutations of the individual cubes. The group here is thus the group of permutations on all the cubes (26 in number, because the central cube is left intact by all operations). The individual moves permissible constitute a small subset of this group, and the question of interest here is: what elements of the group can be expressed as products of*moves*?

**PLACEHOLDER FOR INFORMATION TO BE FILLED IN**: [SHOW MORE]

## A formal understanding

### The definition of group

A group is a set with a binary operation satisfying the following three conditions:

- Associativity: for all .
- Identity element: There exists such that for all .
- Inverse elements: For every , there exists an element such that . Such a is termed .

### The definition of generating set

A subset of a group is termed a generating set for if every element of can be expressed as a product involving elements from and their inverses.

Given a group and a subset , the subgroup generated by is defined as the subgroup of comprising elements of and their inverses.

### The definition of group action

**PLACEHOLDER FOR INFORMATION TO BE FILLED IN**: [SHOW MORE]

### A setup relating games and moves to groups and generating sets

The game has a set of legal configurations. For instance, in the fifteen puzzle, this is the set of all ways of placing fifteen numbers 1-15 on a board. In the Rubik's cube puzzle, this is the set of all visible arrangements of the Rubik's cube.

This set of legal configurations may come with an associated group. For instance, the set of all arrangements of the numbers 1-15 on a board is naturally associated with the group of permutations on sixteen letters, because each arrangement can be viewed as a permutation of sixteen letters (the numbers 1-15 and the blank space). Similarly, the set of legal configurations for the Rubik's cube is associated with the set of all arrangements on 26 letters, because there are 26 little cubes to be moved around.

The group *acts* on the set of legal configurations. Any permutation of sixteen letters takes as input an arrangement of the fifteen puzzle board and outputs another arrangement.

Every move is an element of the group, as it takes in a legal configuration and outputs a new legal configuration -- the one obtained after performing the move.

A few points of note here:

- Identity element:The identity element of the group is the element we get by doing no moves at all.
- Legal moves: There is a fundamental difference between the fifteen puzzle and the Rubik's cube. In the fifteen puzzle, the set of legal moves depends on the current configuration (because a legal move must involve the current blank position and an adjacent position). On the other hand, in the Rubik's cube puzzle, the set of legal moves is independent of the current configuration.
- Inverses and reversible games: In both the Rubik's cube and the fifteen puzzle, the inverse of every legal move is a legal move. In other words, every move can be undone in the next move, or could have been the result of undoing a previous move.

The questions now are as follows:

- What elements of the group are expressible as products of legal moves? In other words (due to reversibility of moves), what is the subgroup of the big permutation group generated by all the legal moves?
- Given an element that
*is*expressible as a product of legal moves, how short can we make the expression for it?