Algebra of Rock-Paper-Scissors

I remember being asked by a student many years ago if I could think of an example of an algebraic structure that was commutative but not associative. Introductory undergraduate algebra courses abound with examples in the other direction: matrix multiplication, multiplication of quaternions, in fact “most” groups. To recall: if S is a set and ∗ is a binary operation on S (i.e. an operation that picks up any two elements of S and outputs another element of S), then ∗ is called associative if, for all x, y, zS,

x∗(yz) = (xy)∗z;

and ∗ is called commutative if, for all x, yS,

xy = yx.

I scratched my head for a little while and then realized that the game of rock-paper-scissors provides a nice example of what my student sought.

The idea is this. Consider the set S consisting of the three moves in a game of rock-paper-scissors: r for rock, p for paper, and s for scissors. Now define the product m1m2 of two moves m1, m2S to be whichever of the moves would win according to the usual rule that rock beats scissors, scissors beats paper, and paper beats rock; a rock-rock draw counts as a win for rock, and so on. The multiplication table for (S, ∗) is

r p s
r r p r
p p p s
s r s s

This multiplication table is symmetric about the diagonal, so commutativity holds. However, associativity fails:

r∗(ps) = rs = rs = ps = (rp)∗s.

Simple! In general, starting with any finite “cyclically ordered” set, one could proceed just as above to define a commutative but non-associative magma.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s