Generalized Rational Relations and their Logical Definability Christian Choffrut 1 and Leucio Guerra 2 1 LIAFA, Universit´ e Paris 7, Tour 55–56, 1 er ´ etage, 2 Pl. Jussieu, Paris 75 251 Cedex 05, France, cc@litp.ibp.fr 2 IME/USP, Caixa postal 20570, 01452–990, Sa˜o Paulo SP, Brazil, guerra@ime.usp Abstract. The family of rational subsets of a direct product of free monoids Σ * 1 ×... ×Σ * n (the rational relations) is not closed under Boolean operations, except when n = 1 or when all Σi ’s are empty or singletons. In this paper we introduce the family of generalized rational subsets of an arbitrary monoid as the closure of the singletons under the Boolean operations, concatenation and Kleene star (just adding complementation to the usual rational operations). We show that the monadic second order logic enriched with a predicate comparing the cardinalities can express all generalized rational relations. The converse, to wit all subsets defined by this logic are generalized rational subsets, is an open question. 1 Introduction Our paper deals with direct products of free monoids, i. e., monoids whose elements are tuples of strings. The concepts of rational and recognizable string languages carry over to those of rational and recognizable subsets of tuples of strings (rational and recognizable relations), but classical results are usually no longer true in this more general setting. In particular, the class of recognizable relations is a proper subclass of the class of rational relations whenever the direct product contains more than one non trivial free monoid. Also, contrarily to what happens with the rational (string) languages, the class of rational relations is a Boolean algebra only when all free monoids are commutative, i. e., when they have at most one generator. This led us naturally to define the class of generalized rational relations, as the closure of the rational relations under the usual rational operations and complementation. The motivation of this paper originates from the work of B¨ uchi, [4, 3], who established a connection between formal logic and formal languages, by logi- cally characterizing the class of rational string languages. Ever since, significant progress has been made in strenghtening this connection by establishing results similar to those proven by B¨ uchi, specifically for the relevant subclasses of lan- guages of finite or infinite strings. Concerning the logical characterization of families of string relations, there exist basically two different approaches. The first one makes use of Rabin’s result This work was partially supported by the program USP-COFECUB