Semiring
In abstract algebra, a semiring is an algebraic structure similar to a ring, but without the requirement that each element must have an additive inverse.
The term rig is also used occasionally—this originated as a joke, suggesting that rigs are rings without negative elements, similar to using rng to mean a ring without a multiplicative identity.
Tropical semirings are an active area of research, linking algebraic varieties with piecewise linear structures.
Definition
A semiring is a set R equipped with two binary operations + and ⋅, called addition and multiplication, such that:- is a commutative monoid with identity element 0:
- * + c = a +
- * 0 + a = a + 0 = a
- * a + b = b + a
- is a monoid with identity element 1:
- * ⋅c = a⋅
- * 1⋅a = a⋅1 = a
- Multiplication left and right distributes over addition:
- * a⋅ = +
- * ⋅c = +
- Multiplication by 0 annihilates R:
- * 0⋅a = a⋅0 = 0
Compared to a ring, a semiring omits the requirement for inverses under addition; that is, it requires only a commutative monoid, not a commutative group. In a ring, the additive inverse requirement implies the existence of a multiplicative zero, so here it must be specified explicitly. If a semiring's multiplication is commutative, then it is called a commutative semiring.
There are some authors who prefer to leave out the requirement that a semiring have a 0 or 1. This makes the analogy between ring and semiring on the one hand and group and semigroup on the other hand work more smoothly. These authors often use rig for the concept defined here.
Theory
Much of the theory of rings continues to make sense when applied to arbitrary semirings.In particular, one can generalise the theory of algebras over commutative rings directly to a theory of algebras over commutative semirings.
Then a ring is simply an algebra over the commutative semiring Z of integers.
A semiring in which every element is an additive idempotent is called an . Idempotent semirings are special to semiring theory as any ring which is idempotent under addition is trivial. One can define a partial order ≤ on an idempotent semiring by setting whenever . It is easy to see that 0 is the least element with respect to this order: for all a. Addition and multiplication respect the ordering in the sense that implies and and.
Applications
The and tropical semirings on the reals, are often used in performance evaluation on discrete event systems. The real numbers then are the "costs" or "arrival time"; the "max" operation corresponds to having to wait for all prerequisites of an events while the "min" operation corresponds to being able to choose the best, less costly choice; and + corresponds to accumulation along the same path.The Floyd–Warshall algorithm for shortest paths can thus be reformulated as a computation over a algebra. Similarly, the Viterbi algorithm for finding the most probable state sequence corresponding to an observation sequence in a Hidden Markov model can also be formulated as a computation over a algebra on probabilities. These dynamic programming algorithms rely on the distributive property of their associated semirings to compute quantities over a large number of terms more efficiently than enumerating each of them.
Examples
By definition, any ring is also a semiring. A motivating example of a semiring is the set of natural numbers N under ordinary addition and multiplication. Likewise, the non-negative rational numbers and the non-negative real numbers form semirings. All these semirings are commutative.In general
- The set of all ideals of a given ring form an idempotent semiring under addition and multiplication of ideals.
- Any unital quantale is an idempotent semiring under join and multiplication.
- Any bounded, distributive lattice is a commutative, idempotent semiring under join and meet.
- In particular, a Boolean algebra is such a semiring. A Boolean ring is also a semiring but it is not idempotent under addition. A Boolean semiring is a semiring isomorphic to a subsemiring of a Boolean algebra.
- A normal skew lattice in a ring R is an idempotent semiring for the operations multiplication and nabla, where the latter operation is defined by.
- Any c-semiring is also a semiring, where addition is idempotent and defined over arbitrary sets.
- Isomorphism classes of objects in any distributive category, under coproduct and product operations, form a semiring known as a Burnside rig. A Burnside rig is a ring if and only if the category is trivial.
Semiring of sets
- If and then.
- If and then there exists a finite number of mutually disjoint sets for such that.
Specific examples
Variations
Complete and continuous semirings
A complete semiring is a semiring for which the additive monoid is a complete monoid, meaning that it has an infinitary sum operation ΣI for any index set I and that the following distributive laws must hold:An examples of a complete semiring is the power set of a monoid under union. The matrix semiring over a complete semiring is complete.
A continuous semiring is similarly defined as one for which the addition monoid is a continuous monoid. That is, partially ordered with the least upper bound property, and for which addition and multiplication respect order and suprema. The semiring with usual addition, multiplication and order extended is a continuous semiring.
Any continuous semiring is complete: this may be taken as part of the definition.
Star semirings
A star semiring is a semiring with an additional unary operator, satisfyingA Kleene algebra is a star semiring with idempotent addition. They are important in the theory of formal languages and regular expressions.
Complete star semirings
In a complete star semiring, the star operator behaves more like the usual Kleene star: for a complete semiring we use the infinitary sum operator to give the usual definition of the Kleene star:where
Conway semiring
A Conway semiring is a star semiring satisfying the sum-star and product-star equations:Every complete star semiring is also a Conway semiring, but the converse does not hold. An example of Conway semiring that is not complete is the set of extended non-negative rational numbers with the usual addition and multiplication.
An iteration semiring is a Conway semiring satisfying the Conway group axioms, associated by John Conway to groups in star-semirings.
Examples
Examples of star semirings include:- the semiring of binary relations over some base set U in which for all. This star operation is actually the reflexive and transitive closure of R.
- the [|semiring of formal languages] is also a complete star semiring, with the star operation coinciding with the Kleene star.
- The set of non-negative extended reals together with the usual addition and multiplication of reals is a complete star semiring with the star operation given by for and for.
- The Boolean semiring with.
- The semiring on with extended addition and multiplication, and, for.
Dioid
- It was used by Kuntzman in 1972 to denote what is now termed semiring.
- The use to mean idempotent subgroup was introduced by Baccelli et al. in 1992.
- The name "dioid" is also sometimes used to denote naturally ordered semirings.
Generalizations
Yet a further generalization are near-semirings: in addition to not requiring a neutral element for product, or right-distributivity, they do not require addition to be commutative. Just as cardinal numbers form a semiring, so do ordinal numbers form a near-ring, when the standard ordinal addition and multiplication are taken into account. However, the class of ordinals can be turned into a semiring by considering the so-called natural operations instead.
In category theory, a 2-rig is a category with functorial operations analogous to those of a rig. That the cardinal numbers form a rig can be categorified to say that the category of sets is a 2-rig.