Reversible 2-Head Finite Automata
- Reversible 2-head finite automata are deterministic machines that read input from both ends and guarantee unique forward and backward computation.
- They enforce reversibility via an injective transition function and include restricted variants like 1-limited and complete models, establishing a strict language hierarchy.
- Their study shows reversibility imposes nonclassical constraints, excluding some regular languages while accepting complex linear languages such as palindromes.
Reversible 2-head finite automata are deterministic two-head finite automata that process an input word from both ends and are constrained to perform reversible computation, meaning that they are also backward deterministic and therefore admit unique forward and backward computation. In the formulation studied in "On some Classes of Reversible 2-head Automata" (Nagy et al., 21 Jul 2025), these machines define the language family . Their behavior is notably nonclassical: some regular languages are not acceptable by reversible 2-head automata, while some characteristic linear languages, including palindromes, are. Two restricted submodels—1-limited reversible 2-head automata and complete reversible 2-head automata—are strictly weaker, yielding a proper hierarchy inside deterministic two-head linear-language recognition.
1. Formal model and reversibility
A deterministic two-head finite automaton is a 5-tuple
where is a finite set of states, is the initial state, is the input alphabet, is the set of accepting states, and
is a partial transition function. A configuration is a pair , where and is the unread portion of the input; one head is positioned at the left end of 0, the other at its right end. If 1, with 2 and at least one of 3, and if 4, then
5
Determinism requires that for every configuration there is at most one applicable move. Equivalently, for each 6 and each pair 7 with 8, one has 9, and no two transitions from 0 move the same head on the same symbol. Backward determinism requires that every configuration have at most one predecessor. A reversible two-head DFA, or rev-2DFA, is precisely a deterministic two-head automaton that is also backward deterministic; the family of languages it accepts is denoted 1 (Nagy et al., 21 Jul 2025).
The key structural criterion is an injectivity condition on the transition function. A deterministic two-head automaton is reversible if and only if its transition function is injective in the following sense: whenever
2
with 3, then
4
In particular, no two distinct transitions may enter the same state 5 while reading the same nonempty pair. This characterization isolates reversibility as a local syntactic condition on 6, rather than only a global property of computation histories.
2. Restricted reversible subclasses
Two restricted variants are central. A rev-2DFA is 1-limited if every transition moves exactly one head. Equivalently,
7
This model is denoted 8, and its language family is 9. The restriction excludes simultaneous consumption from both ends and forces the machine to alternate, in a state-dependent way, between left-head and right-head actions (Nagy et al., 21 Jul 2025).
For 0, the state space admits a sharp structural classification. States can be partitioned according to which head is used to enter the state and which head may be used to leave it: 1 Here 2 and 3 are final-only classes, while 4 and 5 are initial-only classes. Initial and accepting states must lie in the corresponding boundary classes. Together with the injectivity and determinism conditions, this partition completely characterizes 1-limited reversible two-head automata.
The second restriction is completeness. A deterministic two-head automaton, and in particular a rev-2DFA, is complete if for every nonempty unread input 6 and every state 7 there is exactly one valid move. The corresponding reversible complete model is denoted 8, and its accepted language family is 9. Completeness is stronger than mere totality of the transition function in a one-head DFA sense; in this setting it means that any nonempty unread input can be fully read under a unique continuation (Nagy et al., 21 Jul 2025).
A decisive consequence is that in a complete reversible automaton no transition may move both heads simultaneously. Thus,
0
Moreover, the transition graph of any complete 1-limited rev-2DFA is strongly connected: from every reachable state 1 and every other state 2, some input suffix takes 3 to 4. Completeness therefore imposes a strong global regularity on the control graph while simultaneously reducing expressive power.
3. Proper hierarchy of reversible two-head classes
The principal hierarchy theorem is
5
and each inclusion is strict (Nagy et al., 21 Jul 2025). Here 6 denotes the language family accepted by deterministic two-head finite automata, and all four classes lie inside the linear languages.
| Inclusion | Separating language |
|---|---|
| 7 | 8 |
| 9 | 0 |
| 1 | 2 |
The separation 3 is especially significant because the witness language 4 is regular. Reversibility is therefore not a minor implementation constraint layered on top of ordinary deterministic finite-state recognition; it removes some languages already at the regular level.
The separation 5 shows that simultaneous two-sided consumption genuinely adds power under reversibility. The language
6
is outside 7, but an example construction places it in 8. Conversely, the separation 9 shows that completeness is not an innocuous strengthening. The language
0
cannot be accepted by any complete reversible 2-head DFA, although it belongs to 1 via a two-state cycle reading 2's with head 1 and 3's with head 2.
A common misconception is that stronger operational discipline should monotonically increase descriptive regularity. The hierarchy shows the opposite: completeness narrows the class, and 1-limitedness narrows it further relative to unrestricted reversible two-head computation.
4. Language-theoretic profile and closure behavior
The language families 4, 5, 6, and 7 all sit between the regular languages and the full linear languages 8. More precisely, every machine of these kinds accepts only a subfamily of 9, but the reversible classes are neither coextensive with the regular languages nor with all linear languages (Nagy et al., 21 Jul 2025).
The most characteristic positive example is the palindrome language
0
It belongs to 1, hence also to 2. The construction uses a two-state reversible automaton that zig-zags inward, matching symbols from both ends. This sharply contrasts with the negative regular example 3. The comparison demonstrates that reversibility aligns well with symmetric end-to-center comparison tasks, but not with all one-sided regular segmentations. This suggests that the geometry of input access—rather than only Chomsky-style language class membership—is decisive for the model’s expressive behavior.
The closure properties are selective. Each of 4, 5, 6, and 7 is closed under reversal. In addition, 8 is closed under complementation, because completeness and reversibility are preserved when final and nonfinal states are exchanged. No broader closure list is stated for the reversible two-head families in the supplied results, so the current picture is intentionally partial.
5. Grammars and related reversible two-head models
A left-deterministic linear grammar (LDLG) is a linear grammar in which every nonterminal 9 has productions of the form
0
and if both 1 and 2 occur, then 3 and 4. Its generated language family is denoted 5. Every LDLG can be simulated by a deterministic 2-head automaton that reads one terminal on one strand and communicates through the state which production was used; accordingly,
6
and the inclusion is proper. A witness is
7
which belongs to 8 but not to 9. Since 0 and 1, the reversible classes are, in general, incomparable with 2: some LDLG languages fail to be reversible, while some reversible languages, including palindromes, are not in 3 (Nagy et al., 21 Jul 2025).
Related literature on reversible Watson–Crick automata situates reversible 2-head automata inside a broader family of two-head reversible devices on double-stranded inputs. In the strongly reversible case, where the complementarity relation is injective, strongly reversible Watson–Crick automata coincide exactly with reversible two-head DFAs (Chatterjee et al., 2015). More general one-way reversible Watson–Crick automata use a potentially non-injective complementarity relation 4 as an additional information channel. One summary reports that one-way RWKA accept exactly the regular languages, simulate any 5-state one-way NFA with 6 states, and achieve an exponential-to-linear state-complexity gap on
7
via 8 and 9 (Chatterjee et al., 2020). Another summary attributes to non-injective complementarity a strict increase in power over deterministic multi-head finite automata and presents the strongly reversible fragment as the exact counterpart of reversible two-head DFAs (Chatterjee et al., 2015). Taken together, these results make complementarity—not reversibility alone—the central extension mechanism in the Watson–Crick line.
6. Conceptual significance and open questions
Reversible 2-head finite automata isolate a narrow but nontrivial zone between general deterministic two-head linear-language acceptors and stricter reversible submodels. The hierarchy
00
shows that reversibility, single-head-per-step operation, and completeness are logically distinct constraints with genuinely different language-theoretic consequences (Nagy et al., 21 Jul 2025).
Two negative facts are particularly instructive. First, reversibility does not preserve all regular languages: 01 is excluded. Second, completeness does not enlarge the model’s effective control; instead, completeness together with reversibility forces 1-limitedness and yields the weakest class in the hierarchy. These observations undermine any naive expectation that “more disciplined” finite-state dynamics should automatically remain coextensive with standard regular recognition.
The open problems identified for the model are the search for natural complete characterizations of 02, decidability results, and tighter comparisons with other subclasses of 03. A plausible implication is that future progress will depend less on isolated witness languages than on structural invariants analogous to the injectivity criterion and the state-classification theorem. Such invariants would clarify whether the current hierarchy reflects a deeper algebra of reversible end-to-end reading, or only the first layer of a larger taxonomy of reversible linear-language acceptors.