Monoid

From Wikipedia, the free encyclopedia
(Redirected from Commutative monoid)
Jump to navigation Jump to search

Template:Short description Script error: No such module "For". Script error: No such module "Distinguish". Template:Algebraic structures Template:Dark mode invert

In abstract algebra, a monoid is a set equipped with an associative binary operation and an identity element. For example, the natural numbers with addition form a monoid, the identity element being 0Script error: No such module "Check for unknown parameters"..

Monoids are semigroups with identity. Such algebraic structures occur in several branches of mathematics.

The functions from a set into itself form a monoid with respect to function composition. More generally, in category theory, the morphisms of an object to itself form a monoid, and, conversely, a monoid may be viewed as a category with a single object.

In computer science and computer programming, the set of strings built from a given set of characters is a free monoid. Transition monoids and syntactic monoids are used in describing finite-state machines. Trace monoids and history monoids provide a foundation for process calculi and concurrent computing.

In theoretical computer science, the study of monoids is fundamental for automata theory (Krohn–Rhodes theory), and formal language theory (star height problem).

See semigroup for the history of the subject, and some other general properties of monoids.

Definition

A set SScript error: No such module "Check for unknown parameters". equipped with a binary operation S × SSScript error: No such module "Check for unknown parameters"., which we will denote Script error: No such module "Check for unknown parameters"., is a monoid if it satisfies the following two axioms:

Associativity
For all aScript error: No such module "Check for unknown parameters"., bScript error: No such module "Check for unknown parameters". and cScript error: No such module "Check for unknown parameters". in SScript error: No such module "Check for unknown parameters"., the equation (ab) • c = a • (bc)Script error: No such module "Check for unknown parameters". holds.
Identity element
There exists an element eScript error: No such module "Check for unknown parameters". in SScript error: No such module "Check for unknown parameters". such that for every element aScript error: No such module "Check for unknown parameters". in SScript error: No such module "Check for unknown parameters"., the equalities ea = aScript error: No such module "Check for unknown parameters". and ae = aScript error: No such module "Check for unknown parameters". hold.

In other words, a monoid is a semigroup with an identity element. It can also be thought of as a magma with associativity and identity. The identity element of a monoid is unique.Template:Efn For this reason the identity is regarded as a constant, i. e. 0Script error: No such module "Check for unknown parameters".-ary (or nullary) operation. The monoid therefore is characterized by specification of the triple (S, • , e)Script error: No such module "Check for unknown parameters"..

Depending on the context, the symbol for the binary operation may be omitted, so that the operation is denoted by juxtaposition; for example, the monoid axioms may be written (ab)c = a(bc)Script error: No such module "Check for unknown parameters". and ea = ae = aScript error: No such module "Check for unknown parameters".. This notation does not imply that it is numbers being multiplied.

A monoid in which each element has an inverse is a group.

Monoid structures

Submonoids

A submonoid of a monoid (M, •)Script error: No such module "Check for unknown parameters". is a subset NScript error: No such module "Check for unknown parameters". of MScript error: No such module "Check for unknown parameters". that is closed under the monoid operation and contains the identity element eScript error: No such module "Check for unknown parameters". of MScript error: No such module "Check for unknown parameters"..Template:SfnTemplate:Efn Symbolically, NScript error: No such module "Check for unknown parameters". is a submonoid of MScript error: No such module "Check for unknown parameters". if eNMScript error: No such module "Check for unknown parameters"., and xyNScript error: No such module "Check for unknown parameters". whenever x, yNScript error: No such module "Check for unknown parameters".. In this case, NScript error: No such module "Check for unknown parameters". is a monoid under the binary operation inherited from MScript error: No such module "Check for unknown parameters"..

On the other hand, if NScript error: No such module "Check for unknown parameters". is a subset of a monoid that is closed under the monoid operation, and is a monoid for this inherited operation, then NScript error: No such module "Check for unknown parameters". is not always a submonoid, since the identity elements may differ. For example, the singleton set Template:MsetScript error: No such module "Check for unknown parameters". is closed under multiplication, and is not a submonoid of the (multiplicative) monoid of the nonnegative integers.

Generators

A subset SScript error: No such module "Check for unknown parameters". of MScript error: No such module "Check for unknown parameters". is said to generate MScript error: No such module "Check for unknown parameters". if the smallest submonoid of MScript error: No such module "Check for unknown parameters". containing SScript error: No such module "Check for unknown parameters". is MScript error: No such module "Check for unknown parameters".. If there is a finite set that generates MScript error: No such module "Check for unknown parameters"., then MScript error: No such module "Check for unknown parameters". is said to be a finitely generated monoid.

Commutative monoid

A monoid whose operation is commutative is called a commutative monoid (or, less commonly, an abelian monoid). Commutative monoids are often written additively. Any commutative monoid is endowed with its algebraic preordering Script error: No such module "Check for unknown parameters"., defined by xyScript error: No such module "Check for unknown parameters". if there exists zScript error: No such module "Check for unknown parameters". such that x + z = yScript error: No such module "Check for unknown parameters"..Template:Sfn An order-unit of a commutative monoid MScript error: No such module "Check for unknown parameters". is an element uScript error: No such module "Check for unknown parameters". of MScript error: No such module "Check for unknown parameters". such that for any element xScript error: No such module "Check for unknown parameters". of MScript error: No such module "Check for unknown parameters"., there exists vScript error: No such module "Check for unknown parameters". in the set generated by uScript error: No such module "Check for unknown parameters". such that xvScript error: No such module "Check for unknown parameters".. This is often used in case MScript error: No such module "Check for unknown parameters". is the positive cone of a partially ordered abelian group GScript error: No such module "Check for unknown parameters"., in which case we say that uScript error: No such module "Check for unknown parameters". is an order-unit of GScript error: No such module "Check for unknown parameters"..

Partially commutative monoid

A monoid for which the operation is commutative for some, but not all elements is a trace monoid; trace monoids commonly occur in the theory of concurrent computation.

Examples

  • Out of the 16 possible binary Boolean operators, four have a two-sided identity that is also commutative and associative. These four each make the set Template:MsetScript error: No such module "Check for unknown parameters". a commutative monoid. Under the standard definitions, AND and XNOR have the identity TrueScript error: No such module "Check for unknown parameters". while XOR and OR have the identity FalseScript error: No such module "Check for unknown parameters".. The monoids from AND and OR are also idempotent while those from XOR and XNOR are not.
  • The set of natural numbers N = Template:MsetScript error: No such module "Check for unknown parameters". is a commutative monoid under addition (identity element 0Script error: No such module "Check for unknown parameters".) or multiplication (identity element 1Script error: No such module "Check for unknown parameters".). A submonoid of NScript error: No such module "Check for unknown parameters". under addition is called a numerical monoid.
  • The set of positive integers NTemplate:MsetScript error: No such module "Check for unknown parameters". is a commutative monoid under multiplication (identity element 1Script error: No such module "Check for unknown parameters".).
  • Given a set AScript error: No such module "Check for unknown parameters"., the set of subsets of AScript error: No such module "Check for unknown parameters". is a commutative monoid under intersection (identity element is AScript error: No such module "Check for unknown parameters". itself).
  • Given a set AScript error: No such module "Check for unknown parameters"., the set of subsets of AScript error: No such module "Check for unknown parameters". is a commutative monoid under union (identity element is the empty set).
  • Generalizing the previous example, every bounded semilattice is an idempotent commutative monoid.
    • In particular, any bounded lattice can be endowed with both a meet- and a join- monoid structure. The identity elements are the lattice's top and its bottom, respectively. Being lattices, Heyting algebras and Boolean algebras are endowed with these monoid structures.
  • Every singleton set Template:MsetScript error: No such module "Check for unknown parameters". closed under a binary operation Script error: No such module "Check for unknown parameters". forms the trivial (one-element) monoid, which is also the trivial group.
  • Every group is a monoid and every abelian group a commutative monoid.
  • Any semigroup SScript error: No such module "Check for unknown parameters". may be turned into a monoid simply by adjoining an element eScript error: No such module "Check for unknown parameters". not in SScript error: No such module "Check for unknown parameters". and defining es = s = seScript error: No such module "Check for unknown parameters". for all sSScript error: No such module "Check for unknown parameters".. This conversion of any semigroup to the monoid is done by the free functor between the category of semigroups and the category of monoids.Template:Sfn
    • Thus, an idempotent monoid (sometimes known as find-first) may be formed by adjoining an identity element eScript error: No such module "Check for unknown parameters". to the left zero semigroup over a set SScript error: No such module "Check for unknown parameters".. The opposite monoid (sometimes called find-last) is formed from the right zero semigroup over SScript error: No such module "Check for unknown parameters"..
      • Adjoin an identity eScript error: No such module "Check for unknown parameters". to the left-zero semigroup with two elements Template:MsetScript error: No such module "Check for unknown parameters".. Then the resulting idempotent monoid Template:MsetScript error: No such module "Check for unknown parameters". models the lexicographical order of a sequence given the orders of its elements, with e representing equality.
  • The underlying set of any ring, with addition or multiplication as the operation. (By definition, a ring has a multiplicative identity 1Script error: No such module "Check for unknown parameters"..)
  • The set of all finite strings over some fixed alphabet ΣScript error: No such module "Check for unknown parameters". forms a monoid with string concatenation as the operation. The empty string serves as the identity element. This monoid is denoted ΣScript error: No such module "Check for unknown parameters". and is called the free monoid over ΣScript error: No such module "Check for unknown parameters".. It is not commutative if ΣScript error: No such module "Check for unknown parameters". has at least two elements.
  • Given any monoid MScript error: No such module "Check for unknown parameters"., the opposite monoid MopScript error: No such module "Check for unknown parameters". has the same carrier set and identity element as MScript error: No such module "Check for unknown parameters"., and its operation is defined by xop y = yxScript error: No such module "Check for unknown parameters".. Any commutative monoid is the opposite monoid of itself.
  • Given two sets MScript error: No such module "Check for unknown parameters". and NScript error: No such module "Check for unknown parameters". endowed with monoid structure (or, in general, any finite number of monoids, M1, ..., MkScript error: No such module "Check for unknown parameters".), their Cartesian product M × NScript error: No such module "Check for unknown parameters"., with the binary operation and identity element defined on corresponding coordinates, called the direct product, is also a monoid (respectively, M1 × ⋅⋅⋅ × MkScript error: No such module "Check for unknown parameters".).Template:Sfn
  • Fix a monoid MScript error: No such module "Check for unknown parameters".. The set of all functions from a given set to MScript error: No such module "Check for unknown parameters". is also a monoid. The identity element is a constant function mapping any value to the identity of MScript error: No such module "Check for unknown parameters".; the associative operation is defined pointwise.
  • Fix a monoid MScript error: No such module "Check for unknown parameters". with the operation Script error: No such module "Check for unknown parameters". and identity element eScript error: No such module "Check for unknown parameters"., and consider its power set P(M)Script error: No such module "Check for unknown parameters". consisting of all subsets of MScript error: No such module "Check for unknown parameters".. A binary operation for such subsets can be defined by ST = Template:MsetScript error: No such module "Check for unknown parameters".. This turns P(M)Script error: No such module "Check for unknown parameters". into a monoid with identity element Template:MsetScript error: No such module "Check for unknown parameters".. In the same way the power set of a group GScript error: No such module "Check for unknown parameters". is a monoid under the product of group subsets.
  • Let SScript error: No such module "Check for unknown parameters". be a set. The set of all functions SSScript error: No such module "Check for unknown parameters". forms a monoid under function composition. The identity is just the identity function. It is also called the full transformation monoid of SScript error: No such module "Check for unknown parameters".. If SScript error: No such module "Check for unknown parameters". is finite with nScript error: No such module "Check for unknown parameters". elements, the monoid of functions on SScript error: No such module "Check for unknown parameters". is finite with nnScript error: No such module "Check for unknown parameters". elements.
  • Generalizing the previous example, let CScript error: No such module "Check for unknown parameters". be a category and XScript error: No such module "Check for unknown parameters". an object of CScript error: No such module "Check for unknown parameters".. The set of all endomorphisms of XScript error: No such module "Check for unknown parameters"., denoted EndC(X)Script error: No such module "Check for unknown parameters"., forms a monoid under composition of morphisms. For more on the relationship between category theory and monoids see below.
  • The set of homeomorphism classes of compact surfaces with the connected sum. Its unit element is the class of the ordinary 2-sphere. Furthermore, if aScript error: No such module "Check for unknown parameters". denotes the class of the torus, and bScript error: No such module "Check for unknown parameters". denotes the class of the projective plane, then every element cScript error: No such module "Check for unknown parameters". of the monoid has a unique expression in the form c = na + mbScript error: No such module "Check for unknown parameters". where nScript error: No such module "Check for unknown parameters". is a positive integer and m = 0, 1Script error: No such module "Check for unknown parameters"., or 2Script error: No such module "Check for unknown parameters".. We have 3b = a + bScript error: No such module "Check for unknown parameters"..
  • Let Template:Angle bracketScript error: No such module "Check for unknown parameters". be a cyclic monoid of order nScript error: No such module "Check for unknown parameters"., that is, Template:Angle bracket = Template:MsetScript error: No such module "Check for unknown parameters".. Then Template:Itcon = Template:ItcokScript error: No such module "Check for unknown parameters". for some 0 ≤ k < nScript error: No such module "Check for unknown parameters".. Each such kScript error: No such module "Check for unknown parameters". gives a distinct monoid of order nScript error: No such module "Check for unknown parameters"., and every cyclic monoid is isomorphic to one of these.
    Moreover, fScript error: No such module "Check for unknown parameters". can be considered as a function on the points Template:MsetScript error: No such module "Check for unknown parameters". given by

[012n2n1123n1k] or, equivalently f(i):={i+1,if 0i<n1k,if i=n1. Multiplication of elements in Template:Angle bracketScript error: No such module "Check for unknown parameters". is then given by function composition. Template:Pb When k = 0Script error: No such module "Check for unknown parameters". then the function fScript error: No such module "Check for unknown parameters". is a permutation of Template:MsetScript error: No such module "Check for unknown parameters"., and gives the unique cyclic group of order nScript error: No such module "Check for unknown parameters"..

Properties

By the monoid axioms the identity element eScript error: No such module "Check for unknown parameters". is unique, since if eScript error: No such module "Check for unknown parameters". and fScript error: No such module "Check for unknown parameters". were identity elements of a monoid, then e = ef = fScript error: No such module "Check for unknown parameters"..

Products and powers

For each nonnegative integer nScript error: No such module "Check for unknown parameters"., one can define the product pn=i=1nai of any sequence (a1, ..., an)Script error: No such module "Check for unknown parameters". of nScript error: No such module "Check for unknown parameters". elements of a monoid recursively: let p0 = eScript error: No such module "Check for unknown parameters". and let pm = pm−1amScript error: No such module "Check for unknown parameters". for 1 ≤ mnScript error: No such module "Check for unknown parameters"..

As a special case, one can define nonnegative integer powers of an element xScript error: No such module "Check for unknown parameters". of a monoid: x0 = 1Script error: No such module "Check for unknown parameters". and xn = xn−1xScript error: No such module "Check for unknown parameters". for n ≥ 1Script error: No such module "Check for unknown parameters".. Then xm+n = xmxnScript error: No such module "Check for unknown parameters". for all m, n ≥ 0Script error: No such module "Check for unknown parameters"..

Invertible elements

An element xScript error: No such module "Check for unknown parameters". is called invertible if there exists an element yScript error: No such module "Check for unknown parameters". such that xy = eScript error: No such module "Check for unknown parameters". and yx = eScript error: No such module "Check for unknown parameters".. The element yScript error: No such module "Check for unknown parameters". is called the inverse of xScript error: No such module "Check for unknown parameters".. Inverses, if they exist, are unique: if yScript error: No such module "Check for unknown parameters". and zScript error: No such module "Check for unknown parameters". are inverses of xScript error: No such module "Check for unknown parameters"., then by associativity y = ey = (zx)y = z(xy) = ze = zScript error: No such module "Check for unknown parameters"..Template:Sfn

If xScript error: No such module "Check for unknown parameters". is invertible, say with inverse yScript error: No such module "Check for unknown parameters"., then one can define negative powers of xScript error: No such module "Check for unknown parameters". by setting xn = ynScript error: No such module "Check for unknown parameters". for each n ≥ 1Script error: No such module "Check for unknown parameters".; this makes the equation xm+n = xmxnScript error: No such module "Check for unknown parameters". hold for all m, nZScript error: No such module "Check for unknown parameters"..

The set of all invertible elements in a monoid, together with the operation •, forms a group.

Grothendieck group

Script error: No such module "Labelled list hatnote". Not every monoid sits inside a group. For instance, it is perfectly possible to have a monoid in which two elements aScript error: No such module "Check for unknown parameters". and bScript error: No such module "Check for unknown parameters". exist such that ab = aScript error: No such module "Check for unknown parameters". holds even though bScript error: No such module "Check for unknown parameters". is not the identity element (for example, take a = 0 and b = 5 in the multiplicative monoid of nonnegative integers.) Such a monoid cannot be embedded in a group, because in the group multiplying both sides with the inverse of aScript error: No such module "Check for unknown parameters". would get that b = eScript error: No such module "Check for unknown parameters"., which is not true.

A monoid (M, •)Script error: No such module "Check for unknown parameters". has the cancellation property (or is cancellative) if for all aScript error: No such module "Check for unknown parameters"., bScript error: No such module "Check for unknown parameters". and cScript error: No such module "Check for unknown parameters". in MScript error: No such module "Check for unknown parameters"., the equality ab = acScript error: No such module "Check for unknown parameters". implies b = cScript error: No such module "Check for unknown parameters"., and the equality ba = caScript error: No such module "Check for unknown parameters". implies b = cScript error: No such module "Check for unknown parameters"..

A commutative monoid with the cancellation property can always be embedded in a group via the Grothendieck group construction. That is how the additive group of the integers (a group with operation +Script error: No such module "Check for unknown parameters".) is constructed from the additive monoid of natural numbers (a commutative monoid with operation +Script error: No such module "Check for unknown parameters". and cancellation property). However, a non-commutative cancellative monoid need not be embeddable in a group.

If a monoid has the cancellation property and is finite, then it is in fact a group.Template:Efn

The right- and left-cancellative elements of a monoid each in turn form a submonoid (i.e. are closed under the operation and obviously include the identity). This means that the cancellative elements of any commutative monoid can be extended to a group.

The cancellative property in a monoid is not necessary to perform the Grothendieck construction – commutativity is sufficient. However, if a commutative monoid does not have the cancellation property, the homomorphism of the monoid into its Grothendieck group is not injective. More precisely, if ab = acScript error: No such module "Check for unknown parameters"., then bScript error: No such module "Check for unknown parameters". and cScript error: No such module "Check for unknown parameters". have the same image in the Grothendieck group, even if bcScript error: No such module "Check for unknown parameters".. In particular, if the monoid has an absorbing element, then its Grothendieck group is the trivial group.

Types of monoids

An inverse monoid is a monoid where for every aScript error: No such module "Check for unknown parameters". in MScript error: No such module "Check for unknown parameters"., there exists a unique a−1Script error: No such module "Check for unknown parameters". in MScript error: No such module "Check for unknown parameters". such that a = aa−1aScript error: No such module "Check for unknown parameters". and a−1 = a−1aa−1Script error: No such module "Check for unknown parameters".. If an inverse monoid is cancellative, then it is a group.

In the opposite direction, a zerosumfree monoid is an additively written monoid in which a + b = 0Script error: No such module "Check for unknown parameters". implies that a = 0Script error: No such module "Check for unknown parameters". and b = 0Script error: No such module "Check for unknown parameters".:Template:Sfn equivalently, that no element other than zero has an additive inverse.

Acts and operator monoids

Script error: No such module "Labelled list hatnote". Let MScript error: No such module "Check for unknown parameters". be a monoid, with the binary operation denoted by Script error: No such module "Check for unknown parameters". and the identity element denoted by eScript error: No such module "Check for unknown parameters".. Then a (left) MScript error: No such module "Check for unknown parameters".-act (or left act over MScript error: No such module "Check for unknown parameters".) is a set XScript error: No such module "Check for unknown parameters". together with an operation ⋅ : M × XXScript error: No such module "Check for unknown parameters". which is compatible with the monoid structure as follows:

  • for all xScript error: No such module "Check for unknown parameters". in XScript error: No such module "Check for unknown parameters".: ex = xScript error: No such module "Check for unknown parameters".;
  • for all aScript error: No such module "Check for unknown parameters"., bScript error: No such module "Check for unknown parameters". in MScript error: No such module "Check for unknown parameters". and xScript error: No such module "Check for unknown parameters". in XScript error: No such module "Check for unknown parameters".: a ⋅ (bx) = (ab) ⋅ xScript error: No such module "Check for unknown parameters"..

This is the analogue in monoid theory of a (left) group action. Right MScript error: No such module "Check for unknown parameters".-acts are defined in a similar way. A monoid with an act is also known as an operator monoid. Important examples include transition systems of semiautomata. A transformation semigroup can be made into an operator monoid by adjoining the identity transformation.

Monoid homomorphisms

File:Exponentiation as monoid homomorphism svg.svg
Example monoid homomorphism x ↦ 2xScript error: No such module "Check for unknown parameters". from <templatestyles src="Template:Color/styles.css" />(N, +, 0)Script error: No such module "Check for unknown parameters". to <templatestyles src="Template:Color/styles.css" />(N, ×, 1)Script error: No such module "Check for unknown parameters".. It is injective, but not surjective.

A homomorphism between two monoids (M, ∗)Script error: No such module "Check for unknown parameters". and (N, •)Script error: No such module "Check for unknown parameters". is a function f : MNScript error: No such module "Check for unknown parameters". such that

  • f(xy) = f(x) • f(y)Script error: No such module "Check for unknown parameters". for all xScript error: No such module "Check for unknown parameters"., yScript error: No such module "Check for unknown parameters". in MScript error: No such module "Check for unknown parameters".
  • f(eM) = eNScript error: No such module "Check for unknown parameters".,

where eMScript error: No such module "Check for unknown parameters". and eNScript error: No such module "Check for unknown parameters". are the identities on MScript error: No such module "Check for unknown parameters". and NScript error: No such module "Check for unknown parameters". respectively. Monoid homomorphisms are sometimes simply called monoid morphisms.

Not every semigroup homomorphism between monoids is a monoid homomorphism, since it may not map the identity to the identity of the target monoid, even though the identity is the identity of the image of the homomorphism.Template:Efn For example, consider [Z]nScript error: No such module "Check for unknown parameters"., the set of residue classes modulo nScript error: No such module "Check for unknown parameters". equipped with multiplication. In particular, [1]nScript error: No such module "Check for unknown parameters". is the identity element. Function f : [Z]3 → [Z]6Script error: No such module "Check for unknown parameters". given by [k]3 ↦ [3k]6Script error: No such module "Check for unknown parameters". is a semigroup homomorphism, since [3k ⋅ 3l]6 = [9kl]6 = [3kl]6Script error: No such module "Check for unknown parameters".. However, f([1]3) = [3]6 ≠ [1]6Script error: No such module "Check for unknown parameters"., so a monoid homomorphism is a semigroup homomorphism between monoids that maps the identity of the first monoid to the identity of the second monoid and the latter condition cannot be omitted.

In contrast, a semigroup homomorphism between groups is always a group homomorphism, as it necessarily preserves the identity (because, in the target group of the homomorphism, the identity element is the only element xScript error: No such module "Check for unknown parameters". such that xx = xScript error: No such module "Check for unknown parameters".).

A bijective monoid homomorphism is called a monoid isomorphism. Two monoids are said to be isomorphic if there is a monoid isomorphism between them.

Equational presentation

Script error: No such module "Labelled list hatnote".

Monoids may be given a presentation, much in the same way that groups can be specified by means of a group presentation. One does this by specifying a set of generators ΣScript error: No such module "Check for unknown parameters"., and a set of relations on the free monoid ΣScript error: No such module "Check for unknown parameters".. One does this by extending (finite) binary relations on ΣScript error: No such module "Check for unknown parameters". to monoid congruences, and then constructing the quotient monoid, as above.

Given a binary relation R ⊂ Σ × ΣScript error: No such module "Check for unknown parameters"., one defines its symmetric closure as RR−1Script error: No such module "Check for unknown parameters".. This can be extended to a symmetric relation E ⊂ Σ × ΣScript error: No such module "Check for unknown parameters". by defining x ~E yScript error: No such module "Check for unknown parameters". if and only if x = sutScript error: No such module "Check for unknown parameters". and y = svtScript error: No such module "Check for unknown parameters". for some strings u, v, s, t ∈ ΣScript error: No such module "Check for unknown parameters". with (u,v) ∈ RR−1Script error: No such module "Check for unknown parameters".. Finally, one takes the reflexive and transitive closure of EScript error: No such module "Check for unknown parameters"., which is then a monoid congruence.

In the typical situation, the relation RScript error: No such module "Check for unknown parameters". is simply given as a set of equations, so that R = Template:MsetScript error: No such module "Check for unknown parameters".. Thus, for example,

p,q|pq=1

is the equational presentation for the bicyclic monoid, and

a,b|aba=baa,bba=bab

is the plactic monoid of degree 2Script error: No such module "Check for unknown parameters". (it has infinite order). Elements of this plactic monoid may be written as aibj(ba)k for integers iScript error: No such module "Check for unknown parameters"., jScript error: No such module "Check for unknown parameters"., kScript error: No such module "Check for unknown parameters"., as the relations show that baScript error: No such module "Check for unknown parameters". commutes with both aScript error: No such module "Check for unknown parameters". and bScript error: No such module "Check for unknown parameters"..

Relation to category theory

Group-like structures
Total Associative Identity <templatestyles src="Template:Tooltip/styles.css" />DivisibleScript error: No such module "Check for unknown parameters". Commutative
Partial magma Unneeded Unneeded Unneeded Unneeded Unneeded
Semigroupoid Unneeded Required Unneeded Unneeded Unneeded
Small category Unneeded Required Required Unneeded Unneeded
Groupoid Unneeded Required Required Required Unneeded
Magma Required Unneeded Unneeded Unneeded Unneeded
Quasigroup Required Unneeded Unneeded Required Unneeded
Unital magma Required Unneeded Required Unneeded Unneeded
Loop Required Unneeded Required Required Unneeded
Semigroup Required Required Unneeded Unneeded Unneeded
Monoid Required Required Required Unneeded Unneeded
Group Required Required Required Required Unneeded
Abelian group Required Required Required Required Required

Monoids can be viewed as a special class of categories. Indeed, the axioms required of a monoid operation are exactly those required of morphism composition when restricted to the set of all morphisms whose source and target is a given object.Template:Sfn That is,

A monoid is, essentially, the same thing as a category with a single object.

More precisely, given a monoid (M, •)Script error: No such module "Check for unknown parameters"., one can construct a small category with only one object and whose morphisms are the elements of MScript error: No such module "Check for unknown parameters".. The composition of morphisms is given by the monoid operation Script error: No such module "Check for unknown parameters"..

Likewise, monoid homomorphisms are just functors between single object categories.Template:Sfn So this construction gives an equivalence between the category of (small) monoids Mon and a full subcategory of the category of (small) categories Cat. Similarly, the category of groups is equivalent to another full subcategory of Cat.

In this sense, category theory can be thought of as an extension of the concept of a monoid. Many definitions and theorems about monoids can be generalised to small categories with more than one object. For example, a quotient of a category with one object is just a quotient monoid.

Monoids, just like other algebraic structures, also form their own category, Mon, whose objects are monoids and whose morphisms are monoid homomorphisms.Template:Sfn

There is also a notion of monoid object which is an abstract definition of what is a monoid in a category. A monoid object in Set is just a monoid.

Monoids in computer science

In computer science, many abstract data types can be endowed with a monoid structure. In a common pattern, a sequence of elements of a monoid is "folded" or "accumulated" to produce a final value. For instance, many iterative algorithms need to update some kind of "running total" at each iteration; this pattern may be elegantly expressed by a monoid operation. Alternatively, the associativity of monoid operations ensures that the operation can be parallelized by employing a prefix sum or similar algorithm, in order to utilize multiple cores or processors efficiently.

Given a sequence of values of type MScript error: No such module "Check for unknown parameters". with identity element εScript error: No such module "Check for unknown parameters". and associative operation Script error: No such module "Check for unknown parameters"., the fold operation is defined as follows: fold:M*M={εif =nilmfoldif =consm

In addition, any data structure can be 'folded' in a similar way, given a serialization of its elements. For instance, the result of "folding" a binary tree might differ depending on pre-order vs. post-order tree traversal.

MapReduce

An application of monoids in computer science is the so-called MapReduce programming model (see Encoding Map-Reduce As A Monoid With Left Folding). MapReduce, in computing, consists of two or three operations. Given a dataset, "Map" consists of mapping arbitrary data to elements of a specific monoid. "Reduce" consists of folding those elements, so that in the end we produce just one element.

For example, if we have a multiset, in a program it is represented as a map from elements to their numbers. Elements are called keys in this case. The number of distinct keys may be too big, and in this case, the multiset is being sharded. To finalize reduction properly, the "Shuffling" stage regroups the data among the nodes. If we do not need this step, the whole Map/Reduce consists of mapping and reducing; both operations are parallelizable, the former due to its element-wise nature, the latter due to associativity of the monoid.

Complete monoids

A complete monoid is a commutative monoid equipped with an infinitary sum operation ΣI for any index set IScript error: No such module "Check for unknown parameters". such thatTemplate:SfnTemplate:SfnTemplate:SfnTemplate:Sfn imi=0;i{j}mi=mj;i{j,k}mi=mj+mk for jk and jJiIjmi=iImi if jJIj=I and IjIj= for jj.

An ordered commutative monoid is a commutative monoid MScript error: No such module "Check for unknown parameters". together with a partial ordering Script error: No such module "Check for unknown parameters". such that a ≥ 0Script error: No such module "Check for unknown parameters". for every aMScript error: No such module "Check for unknown parameters"., and abScript error: No such module "Check for unknown parameters". implies a + cb + cScript error: No such module "Check for unknown parameters". for all a, b, cMScript error: No such module "Check for unknown parameters"..

A continuous monoid is an ordered commutative monoid (M, ≤)Script error: No such module "Check for unknown parameters". in which every directed subset has a least upper bound, and these least upper bounds are compatible with the monoid operation: a+supS=sup(a+S) for every aMScript error: No such module "Check for unknown parameters". and directed subset SScript error: No such module "Check for unknown parameters". of MScript error: No such module "Check for unknown parameters"..

If (M, ≤)Script error: No such module "Check for unknown parameters". is a continuous monoid, then for any index set IScript error: No such module "Check for unknown parameters". and collection of elements (ai)iIScript error: No such module "Check for unknown parameters"., one can define Iai=supfinite EIEai, and MScript error: No such module "Check for unknown parameters". together with this infinitary sum operation is a complete monoid.Template:Sfn

See also

Notes

Template:Notelist

Citations

<templatestyles src="Reflist/styles.css" />

Script error: No such module "Check for unknown parameters".

References

<templatestyles src="Refbegin/styles.css" />

  • Script error: No such module "citation/CS1".
  • Script error: No such module "citation/CS1".
  • Script error: No such module "citation/CS1".
  • Script error: No such module "Citation/CS1".
  • Script error: No such module "citation/CS1".
  • Script error: No such module "citation/CS1".
  • Script error: No such module "citation/CS1".
  • Script error: No such module "citation/CS1".
  • Script error: No such module "citation/CS1".
  • Script error: No such module "citation/CS1".
  • Script error: No such module "citation/CS1".
  • Script error: No such module "citation/CS1".
  • Script error: No such module "Citation/CS1".

External links