Papers
Topics
Authors
Recent
Search
2000 character limit reached

Reversible 2-Head Finite Automata

Updated 6 July 2026
  • 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 2revLIN2\mathrm{revLIN}. 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

A=(Q,q0,V,δ,F),A=(Q,q_0,V,\delta,F),

where QQ is a finite set of states, q0Qq_0\in Q is the initial state, VV is the input alphabet, FQF\subseteq Q is the set of accepting states, and

δ:Q×(V{λ})×(V{λ})Q\delta:Q\times (V\cup\{\lambda\})\times (V\cup\{\lambda\})\to Q

is a partial transition function. A configuration is a pair (q,w)(q,w), where qQq\in Q and wVw\in V^* is the unread portion of the input; one head is positioned at the left end of A=(Q,q0,V,δ,F),A=(Q,q_0,V,\delta,F),0, the other at its right end. If A=(Q,q0,V,δ,F),A=(Q,q_0,V,\delta,F),1, with A=(Q,q0,V,δ,F),A=(Q,q_0,V,\delta,F),2 and at least one of A=(Q,q0,V,δ,F),A=(Q,q_0,V,\delta,F),3, and if A=(Q,q0,V,δ,F),A=(Q,q_0,V,\delta,F),4, then

A=(Q,q0,V,δ,F),A=(Q,q_0,V,\delta,F),5

Determinism requires that for every configuration there is at most one applicable move. Equivalently, for each A=(Q,q0,V,δ,F),A=(Q,q_0,V,\delta,F),6 and each pair A=(Q,q0,V,δ,F),A=(Q,q_0,V,\delta,F),7 with A=(Q,q0,V,δ,F),A=(Q,q_0,V,\delta,F),8, one has A=(Q,q0,V,δ,F),A=(Q,q_0,V,\delta,F),9, and no two transitions from QQ0 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 QQ1 (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

QQ2

with QQ3, then

QQ4

In particular, no two distinct transitions may enter the same state QQ5 while reading the same nonempty pair. This characterization isolates reversibility as a local syntactic condition on QQ6, 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,

QQ7

This model is denoted QQ8, and its language family is QQ9. 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 q0Qq_0\in Q0, 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: q0Qq_0\in Q1 Here q0Qq_0\in Q2 and q0Qq_0\in Q3 are final-only classes, while q0Qq_0\in Q4 and q0Qq_0\in Q5 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 q0Qq_0\in Q6 and every state q0Qq_0\in Q7 there is exactly one valid move. The corresponding reversible complete model is denoted q0Qq_0\in Q8, and its accepted language family is q0Qq_0\in Q9. 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,

VV0

Moreover, the transition graph of any complete 1-limited rev-2DFA is strongly connected: from every reachable state VV1 and every other state VV2, some input suffix takes VV3 to VV4. 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

VV5

and each inclusion is strict (Nagy et al., 21 Jul 2025). Here VV6 denotes the language family accepted by deterministic two-head finite automata, and all four classes lie inside the linear languages.

Inclusion Separating language
VV7 VV8
VV9 FQF\subseteq Q0
FQF\subseteq Q1 FQF\subseteq Q2

The separation FQF\subseteq Q3 is especially significant because the witness language FQF\subseteq Q4 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 FQF\subseteq Q5 shows that simultaneous two-sided consumption genuinely adds power under reversibility. The language

FQF\subseteq Q6

is outside FQF\subseteq Q7, but an example construction places it in FQF\subseteq Q8. Conversely, the separation FQF\subseteq Q9 shows that completeness is not an innocuous strengthening. The language

δ:Q×(V{λ})×(V{λ})Q\delta:Q\times (V\cup\{\lambda\})\times (V\cup\{\lambda\})\to Q0

cannot be accepted by any complete reversible 2-head DFA, although it belongs to δ:Q×(V{λ})×(V{λ})Q\delta:Q\times (V\cup\{\lambda\})\times (V\cup\{\lambda\})\to Q1 via a two-state cycle reading δ:Q×(V{λ})×(V{λ})Q\delta:Q\times (V\cup\{\lambda\})\times (V\cup\{\lambda\})\to Q2's with head 1 and δ:Q×(V{λ})×(V{λ})Q\delta:Q\times (V\cup\{\lambda\})\times (V\cup\{\lambda\})\to Q3'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 δ:Q×(V{λ})×(V{λ})Q\delta:Q\times (V\cup\{\lambda\})\times (V\cup\{\lambda\})\to Q4, δ:Q×(V{λ})×(V{λ})Q\delta:Q\times (V\cup\{\lambda\})\times (V\cup\{\lambda\})\to Q5, δ:Q×(V{λ})×(V{λ})Q\delta:Q\times (V\cup\{\lambda\})\times (V\cup\{\lambda\})\to Q6, and δ:Q×(V{λ})×(V{λ})Q\delta:Q\times (V\cup\{\lambda\})\times (V\cup\{\lambda\})\to Q7 all sit between the regular languages and the full linear languages δ:Q×(V{λ})×(V{λ})Q\delta:Q\times (V\cup\{\lambda\})\times (V\cup\{\lambda\})\to Q8. More precisely, every machine of these kinds accepts only a subfamily of δ:Q×(V{λ})×(V{λ})Q\delta:Q\times (V\cup\{\lambda\})\times (V\cup\{\lambda\})\to Q9, 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

(q,w)(q,w)0

It belongs to (q,w)(q,w)1, hence also to (q,w)(q,w)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 (q,w)(q,w)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 (q,w)(q,w)4, (q,w)(q,w)5, (q,w)(q,w)6, and (q,w)(q,w)7 is closed under reversal. In addition, (q,w)(q,w)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.

A left-deterministic linear grammar (LDLG) is a linear grammar in which every nonterminal (q,w)(q,w)9 has productions of the form

qQq\in Q0

and if both qQq\in Q1 and qQq\in Q2 occur, then qQq\in Q3 and qQq\in Q4. Its generated language family is denoted qQq\in Q5. 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,

qQq\in Q6

and the inclusion is proper. A witness is

qQq\in Q7

which belongs to qQq\in Q8 but not to qQq\in Q9. Since wVw\in V^*0 and wVw\in V^*1, the reversible classes are, in general, incomparable with wVw\in V^*2: some LDLG languages fail to be reversible, while some reversible languages, including palindromes, are not in wVw\in V^*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 wVw\in V^*4 as an additional information channel. One summary reports that one-way RWKA accept exactly the regular languages, simulate any wVw\in V^*5-state one-way NFA with wVw\in V^*6 states, and achieve an exponential-to-linear state-complexity gap on

wVw\in V^*7

via wVw\in V^*8 and wVw\in V^*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

A=(Q,q0,V,δ,F),A=(Q,q_0,V,\delta,F),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: A=(Q,q0,V,δ,F),A=(Q,q_0,V,\delta,F),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 A=(Q,q0,V,δ,F),A=(Q,q_0,V,\delta,F),02, decidability results, and tighter comparisons with other subclasses of A=(Q,q0,V,δ,F),A=(Q,q_0,V,\delta,F),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.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (3)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Reversible 2-Head Finite Automata.