Rings vs semirings
Overview A semiring is an algebraic structure with two binary operations (usually called “addition” and “multiplication”) satisfying most of the familiar ring axioms except that additive inverses need not exist. A ring, by contrast, does require that every element have an additive inverse. Below is a side-by-side comparison of their defining properties, followed by examples and some remarks on when each arises in mathematics and computer science.
1. Definitions and Axioms
Property | Semiring | Ring |
---|---|---|
Underlying set | $S$ | $R$ |
Addition $(+,0)$ | Commutative monoid:$\forall a,b,c\in S$,$a+(b+c)=(a+b)+c$,$a+b=b+a$,$0+a=a$. | Abelian group:All semiring properties plus$\forall a\exists(-a)$ such that $a+(-a)=0$. |
Multiplication $(\cdot,1)$ | Monoid:$\forall a,b,c\in S$,$a\cdot(b\cdot c)=(a\cdot b)\cdot c$,often with identity $1$. | Monoid:Same as semiring. Often required to have $1$. |
Distributivity | $\forall a,b,c$,$a\cdot(b+c)=a\cdot b + a\cdot c$,$(b+c)\cdot a = b\cdot a + c\cdot a$. | Same as semiring. |
Zero-absorption | $\forall a,;0\cdot a = a\cdot 0 = 0$. | Same as semiring. |
Additive inverses | Not required | Required |
Note on terminology:
- Some authors require a multiplicative identity $1$ in both structures; others call a structure without $1$ a “hemiring” (for semirings without identity) or a “rng” (for rings without unity).
- In this summary we assume both have $1$, unless noted otherwise.
2. Key Differences
-
Additive inverses
- Ring: Every element $a$ has an inverse $-a$ so that $a + (-a) = 0$.
- Semiring: May lack inverses; subtraction need not be defined.
-
Examples
-
Semiring but not Ring:
- $\mathbb{N} = {0,1,2,\dots}$ with usual $+$ and $\times$.
- The Boolean semiring ${0,1}$ with $+$ = OR, $\cdot$ = AND.
-
Ring:
- $\mathbb{Z}$, $\mathbb{Q}$, $\mathbb{R}$, $\mathbb{C}$.
- Matrix rings $M_n(\mathbb{R})$.
-
-
Subtraction vs. cancellation
- In rings you can “cancel” addition using inverses: from $a + x = a + y$ infer $x=y$.
- In semirings, one often works with cancellative semirings to get a weak form of cancellation, but it’s not automatic.
-
Applications
-
Semirings:
- Automata theory & formal languages (e.g.\ shortest-path semirings).
- Tropical geometry (min-plus semiring).
- Quantitative program analysis (probabilities, costs).
-
Rings:
- Core algebra and number theory.
- Algebraic geometry, homological algebra.
-
3. Examples in More Detail
-
Natural numbers $(\mathbb{N}, +, \times)$
- Satisfies all semiring axioms: $0$ is additive identity, $1$ is multiplicative identity.
- Fails ring axioms because there is no $n\in\mathbb{N}$ with $3 + n = 0$.
-
Tropical semiring
- Underlying set $\mathbb{R}\cup{\infty}$.
- “Addition” is $\min$, “multiplication” is $+$.
- Used for shortest-path computations (Dijkstra, Bellman–Ford).
-
Boolean semiring ${0,1}$
- $a+b = \max(a,b)$ (logical OR), $a\cdot b = \min(a,b)$ (logical AND).
- Fundamental in logic, circuit design, and automata.
-
Integer ring $(\mathbb{Z}, +, \times)$
- Every integer has an additive inverse.
- Ring of central importance in algebra and number theory.
4. When to Use Which?
- Use a semiring when only nonnegative (or otherwise “one-sided”) quantities make sense and subtraction would be inappropriate or undefined.
- Use a ring when a full-fledged additive group structure (including negatives) is needed for constructions like modules, ideals, and homological tools.
Further Reading
- Golan, J. S. Semirings and their Applications (Kluwer, 1999)
- Dummit & Foote, Abstract Algebra (especially the sections on rings and modules)
By focusing on the presence or absence of additive inverses, you can quickly tell whether an algebraic system is a semiring or a ring—and choose the right framework for your application.
No comments:
Post a Comment