In
mathematics
Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, there exist
magmas that are
commutative
In mathematics, a binary operation is commutative if changing the order of the operands does not change the result. It is a fundamental property of many binary operations, and many mathematical proofs depend on it. Perhaps most familiar as a pr ...
but not
associative
In mathematics, the associative property is a property of some binary operations that rearranging the parentheses in an expression will not change the result. In propositional logic, associativity is a valid rule of replacement for express ...
. A simple example of such a magma may be derived from the children's game of
rock, paper, scissors
Rock, Paper, Scissors (also known by #Names, several other names and word orders) is an Intransitive game, intransitive hand game, usually played between two people, in which each player simultaneously forms one of three shapes with an outstret ...
. Such magmas give rise to
non-associative algebra
A non-associative algebra (or distributive algebra) is an algebra over a field where the binary operation, binary multiplication operation is not assumed to be associative operation, associative. That is, an algebraic structure ''A'' is a non-ass ...
s.
A magma which is both commutative and associative is a commutative
semigroup
In mathematics, a semigroup is an algebraic structure consisting of a set together with an associative internal binary operation on it.
The binary operation of a semigroup is most often denoted multiplicatively (just notation, not necessarily th ...
.
Example: rock, paper, scissors
In the game of
rock paper scissors
Rock, Paper, Scissors (also known by #Names, several other names and word orders) is an Intransitive game, intransitive hand game, usually played between two people, in which each player simultaneously forms one of three shapes with an outstret ...
, let
, standing for the "rock", "paper" and "scissors" gestures respectively, and consider the
binary operation
In mathematics, a binary operation or dyadic operation is a rule for combining two elements (called operands) to produce another element. More formally, a binary operation is an operation of arity two.
More specifically, a binary operation ...
derived from the rules of the game as follows:
: For all
:
:* If
and
beats
in the game, then
:*
I.e. every
is
idempotent
Idempotence (, ) is the property of certain operations in mathematics and computer science whereby they can be applied multiple times without changing the result beyond the initial application. The concept of idempotence arises in a number of pl ...
.
: So that for example:
:*
"paper beats rock";
:*
"scissors tie with scissors".
This results in the
Cayley table
Named after the 19th-century United Kingdom, British mathematician Arthur Cayley, a Cayley table describes the structure of a finite group by arranging all the possible products of all the group's elements in a square table reminiscent of an additi ...
:
[
:
By definition, the magma is commutative, but it is also non-associative,] as shown by:
:
but
:
i.e.
:
It is the simplest non-associative magma that is ''conservative'', in the sense that the result of any magma operation is one of the two values given as arguments to the operation.[
]
Applications
The arithmetic mean
In mathematics and statistics, the arithmetic mean ( ), arithmetic average, or just the ''mean'' or ''average'' is the sum of a collection of numbers divided by the count of numbers in the collection. The collection is often a set of results fr ...
, and generalized mean
In mathematics, generalised means (or power mean or Hölder mean from Otto Hölder) are a family of functions for aggregating sets of numbers. These include as special cases the Pythagorean means (arithmetic mean, arithmetic, geometric mean, ge ...
s of numbers or of higher-dimensional quantities, such as Frechet means, are often commutative but non-associative.
Commutative but non-associative magmas may be used to analyze genetic recombination
Genetic recombination (also known as genetic reshuffling) is the exchange of genetic material between different organisms which leads to production of offspring with combinations of traits that differ from those found in either parent. In eukaryot ...
.
References
{{reflist
Non-associative algebra