# Monoid

 Monoid (axioms EAN) affects the special fields is special case of magma (mathematics) (axiom E) half-group (I/O) covers commutative Monoid (EANK) as special cases natural numbers (of N, +) real numbers (of R,·) Group (EANI) Abel group (EANIK) half ring (Monoid concerning. + and *)

in abstract algebra a Monoid is a quantity with quotable a without brackets linkage and a neutral element. An example are the natural numbers with the addition andthe number of 0 as neutral element.

## definition

a Monoid is a Tripel [itex] (M, *, e)< /math> consisting of a quantity [itex] M< /math>, one internal two digit linkage [itex] *: M \ times M \ tons of M, \; (A, b) \ mapsto a*b< /math> and an excellent element [itex] e \ in M< /math> with the following characteristics:

[itex] \ forall A, b, C \ in M: (a*b) *c=a* (b*c)< /math>

2. e is neutral element:

[itex] \ forall A \ in M: e*a=a*e=a< /math>

A Monoid is thusa half-group with neutral element.

If is shown by the context, which is the neutral element, a Monoid often also shortened as pair [itex] (M, *)< /math> written.

The Assoziativität (part of 1. the definition) omitting clips justifies: Forthe binary operator * the term A is first ambiguous * b * C”. Because however the result is invariant concerning the analysis sequence specified by clasping, one can do here without the clips.

## examples and counter examples

 < math> (\ mathbb {N} _0,+, 0) [/itex] a Monoid is [itex] (\ mathbb {N}, \ cdot, 1)< /math> is a Monoid. Thus is [itex] (\ mathbb {N} _0, +, 0, \ cdot, 1)< /math> a half ring. [itex] (\ mathbb {Z}, +, 0) [/itex] (the quantity of the whole numbers with the addition) is a Monoid < math> (\ mathbb {Z}, -, 0)[/itex] is no Monoid, since subtraction is not associative. [itex] (\ mathbb {R} ^ {n, n}, \ cdot, E)< /math> (the quantity n×n of the stencils with the unit matrix E) is a not-commutative Monoid. [itex] (\ mathbb {R} ^3, \ times, \ vec {0})< /math> (the three-dimensional real area with the cross product) is noneMonoid, since the associative law is hurt: We mark with [itex] e_i< /math> the i - ten unit vector, then math <(>e_1 \ times e_1) \ times e_2 = 0 is [/itex], but [itex] e_1 \ times (e_1 \ times e_2) = e_2< /math>. [itex] (n \ Bbb {Z}, +, 0)< /math> (the quantity that multiples of the whole number of nwith the addition) is a Monoid. [itex] (\ Bbb {Q} _+, +, 0)< /math> (the quantity of the nonnegative rational numbers with the addition) is a Monoid. [itex] (\ Bbb {Q} _+^*, \ cdot, 1)< /math> (the quantity of the positive rational numbers with the multiplication) is a Monoid. Thus is [itex] (\ Bbb {Q} _+, +, 0, \ cdot, 1)< /math> a half ring (even a half body). [itex] (\ mathcal {P} (X), \ cap, X)< /math> ( the power quantity of a quantity of X with the cut set operator) is a commutative Monoid.

Each group is a Monoid.

## Untermonoid

a subset [itex] U \ subseteq M< /math> a Monoids [itex] (M, *, e)< /math>, those the neutral element [itex] e< /math> contains and relativethe linkage [itex] *< /math> by [itex] M< /math> is final (i.e. for all [itex] u, v \ in U< /math> math <u*v> \ in U /math<)> is also called Untermonoid of math <M> /math< is>.

## Monoid Homomorphismus

a Monoid Homomorphismus is defined as an illustration [itex] f: A \ tons of B< /math> between two Monoiden [itex] \ left (A,+_A, 0_A \ right)< /math>, [itex] \ left (B, +_B, 0_B \ right)< /math>, to which applies:

• [itex] \ forall x, y \ in A: f (x +_A y) = f (x) +_B f (y)< /math>,
• < math> f \ left (0_A \ right) = 0_B< /math>.

It concerns here thus an illustration, those with the linkages in A and B compatiblyis and the neutral element of A on the neutral element of B illustrates. A Monoid Homomorphismus is in the sense of abstract algebra a Homomorphismus between Monoiden.

The picture [itex] f \ left (A \ right)< /math> a Monoid Homomorphismus [itex] f: A \ tons of B< /math> is a Untermonoid a goalmonoids B.

The Monoid Homomorphismus is [itex] f: A \ tons of B< /math> bijektiv, then one calls him a mono ID isomorphicism and the Monoide A and B isomorphic.

## free Monoid

a Monoid [itex] \ left (M, *, \ varepsilon \ right)< /math> means free, if a nonemptySubset [itex] B \ subset M \ backslash \ {\ varepsilon \}< /math> existed and it to everyone [itex] p \ in M \ backslash \ {\ varepsilon \}< /math> exactly a natural number [itex] n> 1< /math> and tuple [itex] (b_1, b_2, \ ldots, b_n)< a /math> from elements [itex] B< /math> gives, so that

`< math> p = b_1 *b_2 * \ ldots * b_n< /math>`

applies. B is called then basis (producer) of the Monoids.

If A is any quantity, then the quantity of all finite consequences in the quantity forms A with the Hintereinanderschreiben of the consequences as linkage and the empty consequence [itex] \ varepsilon< /math>as neutral element a Monoid, [itex] (A^*, \ circ, \ varepsilon)< /math>. One calls this Monoid “the free Monoid " produced by A. If the quantity of A is finite, then one speaks usually of the alphabet A and of character strings over this alphabet.

The free Monoid A* over a quantity A a role plays within many ranges of theoretical computer science (e.g. Automata theory, formal language, regular expression). See also the article over the clover ash covering for to relatives a term.

The free Monoid A* over A the following universal characteristic fulfills: M is a Monoid and [itex] f \ colon A \ tons of M< /math> any function, then gives it exactly a mono ID Homomorphismus [itex] to T \ colon A^* \ tons of M< /math> with [itex] T (A) = f \ (A \ right) /math< left> for all [itex] A \ in A< /math>. M is thus isomorphic to the free Monoid A *. Such Homomorphismen is used in theoretical computer science for the definition of formal languages (as subsets of A *).

A Monoid <left> math \ (M, *, 1 \ right)< /math> a subset of A, so that itself everyoneElement of M clearly up to the order of the factors as product of elements from A to represent leaves, then one calls M freely commutatively with the producer A. Such Monoid is necessarily commutative. A free Monoid with oneat least zweielementigen producer is not commutative.

The free Monoid is like the free group an example of a free object in the category theory.

### examples

• of a quantity of A is the quantity [itex] \ operator name {Abb_ {fin}} (A, \ Bbb {N} _0)< /math> all illustrations of A inthe nonnegative whole numbers, which take a value only in finally many places not equal 0, with the component-wise addition a commutative Monoid. It is freely commutatively with the basic functions [itex] \ chi_a (x) = \ delta_ {A, x}< /math> as producers (math <\> delta_ {A, x is}< /math> a crowning hitting a corner earth airworthiness directive).
• The Nullmonoid[itex] \ ({0}, +, 0 \ right) /math< left> is free with the empty quantity as a producer. The Monoid [itex] (\ mathbb {N} _0, +, 0)< /math> 1 is free} with the only producer {. Both Monoide are also freely commutative with the producer mentioned.
• The Monoid [itex] (\ mathbb N, {\ cdot}, 1)< /math> is freely commutativeover the quantity of the prime numbers, is however no free Monoid.