arXiv:2610.13274cs.FLOct 2026

Manuscript Offprint

arXiv:2610.13274

Prime Accessible Deterministic Automata

Shen Zhao, Chenghe Xu

Abstract

We classify prime accessible deterministic automata over finite alphabets, both among finite automata and among automata with arbitrary state sets. Every one-state automaton is prime. Over a one-letter alphabet, a finite nontrivial automaton is prime exactly when it is a cycle of prime-power length or a finite chain ending in a fixed state. The unique infinite accessible unary automaton, up to isomorphism, is also prime. Every nontrivial automaton over an alphabet with at least two letters is not prime. Shen proved the finite case; we give a shorter proof.

We also characterize a decomposition of the automaton whose states are all finite input words. The reachable product of the quotients by the least right congruences identifying the empty word with nonempty words p and q, respectively, is isomorphic to this automaton exactly when pr≠qsp^r \neq q^s for all positive integers r, s.

Keywords: prime automata, divisibility, reachable synchronous products, right congruences, infinite automata

1. Introduction

For a nonempty set Σ\Sigma of input letters, let Σ∗\Sigma^* denote the set of all finite words over Σ\Sigma, including the empty word ε\varepsilon. For w∈Σ∗w \in \Sigma^*, write ∣w∣|w| for its length. A deterministic automaton over Σ\Sigma, or a Σ\Sigma-automaton, is a quadruple A=(S,i,Σ,t)\mathcal{A} = (S, i, \Sigma, t), where SS is the state set, i∈Si \in S is the initial state, and t:S×Σ→St: S \times \Sigma \to S is the transition function. We extend tt to words by

t(s,ε)=s,t(s,uv)=t(t(s,u),v)(∀s∈S,  ∀u,v∈Σ∗),t(s,\varepsilon)=s,\qquad t(s,u v)=t(t(s,u),v)\quad(\forall s\in S,\;\forall u,v\in\Sigma^{*}),

∗^{*}Corresponding author.

Email address: 262138051@csu.edu.cn (Chenghe Xu) where uv denotes concatenation. The automaton is accessible if every state is reached from i by some word. All automata in this paper are accessible; no accepting states or output functions are specified. For a set X, we use ∣X∣|X| to represent its cardinality. An automaton is finite if its state set is finite, and nontrivial if it has at least two states. For any automaton A, we write SAS_A, iAi_A, and tAt_A for its state set, initial state, and transition function.

We follow Yao’s definitions of factors, isomorphisms, products, divisibility, and primality [1, Section 5]; see also Kamae and Mendès France [2, Section 2]. Yao works with finite automata over alphabets with at least two letters. We use the same definitions for arbitrary accessible state sets and also include one-letter alphabets.

For accessible Σ\Sigma-automata A,B\mathcal{A}, \mathcal{B}, we say that A\mathcal{A} is a factor of B\mathcal{B} if there is a surjective map λ:SB→SA\lambda: S_{\mathcal{B}} \to S_{\mathcal{A}} satisfying

λ(iB)=iA,\lambda(i_{\mathcal{B}})=i_{\mathcal{A}}, λ(tB(x,a))=tA(λ(x),a)(∀x∈SB,  ∀a∈Σ).\lambda(t_{\mathcal{B}}(x,a))=t_{\mathcal{A}}(\lambda(x),a)\qquad(\forall x\in S_{\mathcal{B}},\;\forall a\in\Sigma).

We write λ:B→A\lambda : \mathcal{B} \to \mathcal{A} for this homomorphism. A bijective homomorphism is an isomorphism; we write A≅B\mathcal{A} \cong \mathcal{B} when one exists.

For accessible Σ\Sigma-automata B,C\mathcal{B}, \mathcal{C}, their reachable synchronous product is

B×C=(SB×C,(iB,iC),Σ,tB×C),\mathcal{B}\times\mathcal{C}=\Big(S_{\mathcal{B}\times\mathcal{C}},(i_{\mathcal{B}},i_{\mathcal{C}}),\Sigma,t_{\mathcal{B}\times\mathcal{C}}\Big),

where

SB×C={(tB(iB,w),tC(iC,w)):w∈Σ∗},S_{\mathcal{B}\times\mathcal{C}}=\{(t_{\mathcal{B}}(i_{\mathcal{B}},w),t_{\mathcal{C}}(i_{\mathcal{C}},w)):w\in\Sigma^{*}\}, tB×C((x,y),a)=(tB(x,a),tC(y,a))t_{\mathcal{B}\times\mathcal{C}}((x,y),a)=(t_{\mathcal{B}}(x,a),t_{\mathcal{C}}(y,a))

for every (x,y)∈SB×C(x,y) \in S_{\mathcal{B} \times \mathcal{C}} and a∈Σa \in \Sigma. Only states reachable from the initial pair are retained. Throughout the paper, “product” means this reachable synchronous product.

We say that B\mathcal{B} is divisible by A\mathcal{A}, or that B\mathcal{B} is a multiple of A\mathcal{A}, and write A∣B\mathcal{A} \mid \mathcal{B}, if there is an accessible Σ\Sigma-automaton C\mathcal{C} such that

B≅A×C.\mathcal{B}\cong\mathcal{A}\times\mathcal{C}.

Proposition 2.1 shows that divisibility is equivalent to the factor relation even when state sets are infinite.

Over a fixed alphabet, we consider two classes: all accessible deterministic automata, and those with finite state sets. An automaton A in either class is prime in that class if

A∣B×C⟹(A∣BorA∣C)\mathcal{A}\mid\mathcal{B}\times\mathcal{C}\quad\Longrightarrow\quad\left(\mathcal{A}\mid\mathcal{B}or\mathcal{A}\mid\mathcal{C}\right)

for all B,C\mathcal{B}, \mathcal{C} in that class. We call A\mathcal{A} finite-state prime when B,C\mathcal{B}, \mathcal{C} are required to be finite, and unrestrictedly prime when their state sets may be arbitrary. Outside Section 3, “prime” means unrestrictedly prime unless stated otherwise. One-state automata are included.

This differs from the primality studied by Kupferman and Mosheiff [3] and Spenner [4], where a regular language is composite if it is a finite intersection of languages accepted by deterministic finite automata with fewer states than its minimal automaton. Here primality concerns the underlying accessible transition structure, with no size restriction on the two factors.

Shen proved that no finite nontrivial automaton over a finite alphabet with at least two letters is prime among finite automata [5]. Theorem 3.5 gives a shorter proof. It uses the states reached after the first letter instead of classifying the whole transition graph. The required state information is stored in two finite automata, with explicit bounds on their sizes.

The main new results are Lemma 4.4 and Theorem 4.5. They determine exactly when two quotients by the least right congruences identifying the empty word with chosen nonempty words have product isomorphic to the automaton of all finite input words. This gives more than non-primality: the product retains the entire input word, not just the state reached in a particular automaton. The resulting decomposition applies to arbitrary state sets and alphabets.

An automaton with one input letter is called unary; one with at least two input letters is called non-unary. Over the alphabet {a}\{a\}, for integers ℓ≥0\ell \geq 0 and p≥1p \geq 1, define the unary automaton

A(ℓ,p)=({0,1,…,ℓ+p−1},0,{a},δℓ,p),\mathcal{A}(\ell,p)=\Big(\{0,1,\ldots,\ell+p-1\},0,\{a\},\delta_{\ell,p}\Big),

where

δℓ,p(r,a)={r+1,0≤r<ℓ+p−1,ℓ,r=ℓ+p−1.\delta_{\ell,p}(r,a)=\begin{cases}r+1,&0\leq r<\ell+p-1,\\\ell,&r=\ell+p-1.\end{cases}

Starting from 0, this automaton makes ℓ\ell transitions before entering a cycle of p states. We call ℓ\ell the tail length and p the cycle length.

The following is the primality classification of finite-state automata.

Theorem 1.1. Let A=(S,i,Σ,t)\mathcal{A} = (S, i, \Sigma, t) be a finite accessible deterministic automaton over a finite nonempty alphabet. Primality in this theorem is taken among finite accessible deterministic automata.

(i) If ∣S∣=1|S| = 1, then A is prime.

(ii) If ∣Σ∣=1|\Sigma| = 1, then A\mathcal{A} is isomorphic to a unique automaton A(ℓ,p)\mathcal{A}(\ell, p), with integers ℓ≥0\ell \geq 0 and p≥1p \geq 1. Apart from the one-state automaton A(0,1)\mathcal{A}(0,1), it is prime if and only if

ℓ=0\ell = 0 and pp is a prime power, \quad or \quad ℓ≥1\ell \geq 1 and p=1p = 1.

Here a prime power means an integer of the form qkq^k, where qq is a prime integer and k≥1k \geq 1 is an integer.

(iii) If ∣Σ∣≥2|\Sigma| \geq 2 and ∣S∣≥2|S| \geq 2, then there are finite accessible Σ\Sigma-automata B,C\mathcal{B}, \mathcal{C} such that

A∣B×C,A∤B,A∤C.\mathcal{A}\mid\mathcal{B}\times\mathcal{C},\qquad\mathcal{A}\nmid\mathcal{B},\qquad\mathcal{A}\nmid\mathcal{C}.

In particular, A is not prime.

We now allow both finite and infinite state sets. Put N={0,1,2,…}\mathbb{N} = \{0,1,2,\ldots\}. The infinite unary successor automaton is

U=(N,0,{a},δ),δ(n,a)=n+1(∀n∈N).\mathcal{U}=(\mathbb{N},0,\{a\},\delta),\qquad\delta(n,a)=n+1\quad(\forall n\in\mathbb{N}).

Thus each input letter increases the state by one. An automaton with one state is called a unit automaton.

Theorem 1.2. Let A=(S,i,Σ,t)\mathcal{A} = (S, i, \Sigma, t) be an accessible deterministic automaton over a finite nonempty alphabet. Primality in this theorem is taken among all accessible deterministic automata, with no restriction on state-set cardinality.

(i) Every unit automaton is prime.

(ii) If ∣Σ∣=1|\Sigma| = 1 and S is infinite, then A is isomorphic to the infinite unary successor automaton U and is prime.

(iii) If ∣Σ∣=1|\Sigma| = 1 and S is finite, the classification is the same as in Theorem 1.1(ii).

(iv) If ∣Σ∣≥2|\Sigma| \geq 2 and ∣S∣≥2|S| \geq 2, then A is not prime.