arXiv:2609.08843cs.FLSep 2026

Manuscript Offprint

arXiv:2609.08843

Graph-based automata

Cyril Pujol

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We study graph-based automata: nondeterministic finite automata obtained from edge-colored or oriented graphs by taking every vertex as both initial and accepting, and every edge as a pair of opposite transitions. The language of these automata corresponds to the set of edge-colored or oriented paths mapping to their corresponding graphs. We develop an analogous notion for trees and characterise the languages recognised by these models. For tree languages we prove the existence of a unique size-minimal graph and, more generally, a homomorphism-minimal graph for both word and tree languages using duality methods.

In order to further motivate these models, we showcase a few results at the intersection between graph theory and automata theory: We relate graph-based automata to reversible automata, give a decomposition of graph-based languages into reversible languages, and introduce the remanent language of an undirected graph as the intersection of all its orientations. This remanent language captures structural information on the graph such as chromatic number.

1 Introduction

A graph is a system of states together with a system of symmetric relations between them. An automaton is a transition system between states. Therefore, they are conceptually very similar structures. However, automata theory and graph theory have led these objects to evolve in very different directions. The heart of automata theory has created many strong equivalences between languages, monoids, regular expressions and logic, which allow regular languages to be extremely well understood and easy to manipulate. On the other hand, a big part of graph theory consists of considering NP-hard problems that need to be restricted to subclasses to be manageable. For instance, one may restrict to graphs of bounded treewidth or to perfect graphs when computing the chromatic number. It is rather uncommon to obtain characterisations that are as well behaved as regular languages. In this work, we try to take advantage of the tools of automata theory to get structural information about a graph.

A graph morphism is a function between the vertices of two graphs which preserves adjacency. It is a central notion in graph theory, as it encapsulates many parameters, such as the chromatic number and the clique number. Given a fixed graph GG, by counting the number of homomorphisms from any graph HH to GG, we obtain an infinite vector known as the homomorphism profile of GG. In [7] Lovasz proved that two graphs have the same homomorphism profile if and only if they are isomorphic.

By looking only at the existence of a homomorphism instead of the exact count, we obtain the set of graphs HH that map into GG. Two graphs G,G′G, G' lead to the same set if and only if they are homomorphically equivalent, meaning that there exists a morphism from GG to G′G' and a morphism from G′G' to GG. In each homomorphism-equivalence class of graphs, there exists a unique minimal graph (in terms of the number of vertices and edges), called the core, to which any other one maps surjectively.

By viewing the set of graphs that map into GG as a language associated to GG, it is natural to draw a parallel to the existence of a minimal automaton in the context of deterministic finite automata. This similarity is accentuated by the fact that an automaton accepting a word ww corresponds to the existence of a function from the word ww, seen as a path, to the states of the automaton, in a way that is coherent with the transition labels. Therefore, it is essentially a morphism from the word to the automaton.

We introduce the notion of graph-based automata, which are nondeterministic finite automata whose language is the set of paths mapping to an edge-colored or oriented graph. In terms of automata, this is equivalent to asking that every state be initial and terminal, and that every transition be bidirectional (in the edge-colored case), or part of a pair of opposite transitions (in the oriented case). This notion should not be confused with graph automata appearing in the literature [2], where automata are used to process graph-structured inputs.

We also introduce the notion of graph-based tree automata, the analogous model where paths are replaced with trees. Those notions have been used before in graph theory, in particular, in works related to homomorphism, either explicitly [4] or implicitly [9], through the study of “bounded path”. But they were used only as tools and not objects of interest.

From the point of view of automata theory, to the best of our knowledge, the class of graph-based automata has not been studied as a subject in its own right. However, its defining features are very natural: asking that every state be both initial and accepting is standard, and so are bidirectional transitions. For this reason, we do not claim novelty for the model itself, but rather for its explicit formulation and study. One of the closest related notion appears to be that of reversible automata and reversible languages: automata where the transition function is injective. A link between the two notions is established in Proposition 30.

In this work, we characterise the languages associated with graph-based (tree) automata and study, for a given language, the possible minimal graph-based (tree) automata associated with it. For graph-based tree automata, we prove the existence of a unique minimal automaton with respect to size. This is particularly surprising since the related automata are highly nondeterministic. There also exists a minimal automaton with respect to the homomorphism order, this is a consequence of a very general duality result by Erdős, Pálvölgyib, Tardif and Tardos [4]. We give a different proof of that result, adapted to our context. For graph-based automata, there is no minimal graph with respect to size, but a unique homomorphism-minimal graph does exist, as a direct consequence of a well-known result by Christian Carrez [1].

Finally, we give some applications at the intersection of automata and graph theory: we give a way to disambiguate a graph-based language by lifting it into a reversible language, and introduce the notion of the remanent language of an undirected graph, which is the language of oriented paths that can map to any orientation of the graph. This language encapsulates considerable structural information about the graph, such as the chromatic number.