# Rational set

In computer science, more precisely in automata theory, a **rational set** of a monoid is an element of the minimal class of subsets of this monoid which contains all finite subsets and is closed under union, product and Kleene star. Rational sets are useful in automata theory, formal languages and algebra.

A rational set generalizes the notion of rational (regular) language (understood as defined by regular expressions) to monoids that are not necessarily free.

## Definition

Let be a monoid with identity element . The set of rational subsets of is the smallest set that contains every finite set and is closed under

- union: if then
- product: if then
- Kleene star if then where is the singleton containing the identity element, and where .

This means that any rational subset of can be obtained by taking a finite number of finite subsets of and applying the union, product and Kleene star operations a finite number of times.

In general a rational subset of a monoid is not a submonoid.

## Example

Let be an alphabet, the set of words over is a monoid. The rational subset of are precisely the regular languages. Indeed the regular languages may be defined by a finite regular expression.

The rational subsets of are the ultimately periodic sets of integers. More generally, the rational subsets of are the semilinear sets.^{[1]}

## Properties

McKnight's theorem states that if is finitely generated then its recognizable subset are rational sets. This is not true in general, i.e. is not closed under complement. Let , the sets and are recognizable but is not because its projection to the second element is not rational.

The intersection of a rational subset and of a recognizable subset is rational.

Rational sets are closed under morphism: given and two monoids and a morphism, if then .

For finite groups the following result of Anissimov and Seifert is well known: a subgroup *H* of a finitely generated group *G* is recognizable if and only if *H* has finite index in *G*. In contrast, *H* is rational if and only if *H* is finitely generated.^{[2]}

## Rational relations and rational functions

A binary relation between monoids *M* and *N* is a **rational relation** if the graph of the relation, regarded as a subset of *M*×*N* is a rational set in the product monoid. A function from *M* to *N* is a **rational function** if the graph of the function is a rational set.^{[3]}

## See also

## References

- Straubing, Howard (1994).
*Finite automata, formal logic, and circuit complexity*. Progress in Theoretical Computer Science. Basel: Birkhäuser. p. 8. ISBN 3-7643-3719-2. Zbl 0816.68086. - Jean-Eric Pin, Mathematical Foundations of Automata Theory, Chapter IV: Recognisable and rational sets
- Rational Sets in Commutative Monoids

- ↑ Mathematical Foundations of Automata Theory
- ↑ John Meakin (2007). "Groups and semigroups: connections and contrasts". In C.M. Campbell, M.R. Quick, E.F. Robertson, G.C. Smith.
*Groups St Andrews 2005 Volume 2*. Cambridge University Press. p. 376. ISBN 978-0-521-69470-4. preprint - ↑ Hoffmann, Michael; Kuske, Dietrich; Otto, Friedrich; Thomas, Richard M. (2002). "Some relatives of automatic and hyperbolic groups". In Gomes, Gracinda M. S.
*Semigroups, algorithms, automata and languages. Proceedings of workshops held at the International Centre of Mathematics, CIM, Coimbra, Portugal, May, June and July 2001*. Singapore: World Scientific. pp. 379–406. Zbl 1031.20047.

## Further reading

- Sakarovitch, Jacques (2009).
*Elements of automata theory*. Translated from the French by Reuben Thomas. Cambridge: Cambridge University Press. Part II: The power of algebra. ISBN 978-0-521-84425-3. Zbl 1188.68177.