In mathematics and computer science, a rational series is a generalisation of the concept of formal power series over a ring to the case when the basic algebraic structure is no longer a ring but a semiring, and the indeterminates adjoined are not assumed to commute.
They can be regarded as algebraic expressions of a formal language over a finite alphabet.
A non-commutative polynomial over A is a finite formal sum of words over A.
and becomes a semiring under the operations A non-commutative polynomial thus corresponds to a function c on A* of finite support.
In the case when R is a ring, then this is the Magnus ring over R.[1] If L is a language over A, regarded as a subset of A* we can form the characteristic series of L as the formal series corresponding to the characteristic function of L. In