2detLIN Languages Overview
- 2detLIN languages are the deterministic linear languages recognized by two-head automata that read from both ends, bridging the gap between regular and full linear language classes.
- They admit a Myhill–Nerode-type characterization using finite, complete prefix-suffix equivalence classes with noncrossing constraints, ensuring structural determinism.
- Their study establishes a hierarchy where 2detLIN properly contains regular languages and is strictly contained within the broader class of linear languages.
2detLIN languages are the deterministic linear languages recognized by deterministic two-head devices that read an input from both extremes inward. In the 2025 formulation, they are accepted by deterministic linear automata, equivalently by deterministic sensing Watson–Crick finite automata; in the 2016 automata-based terminology, the same class is denoted (Nagy, 21 Jul 2025, Bedregal, 2016). The class occupies an intermediate position between the regular and linear languages: it is a proper subset of , a proper superset of the regular languages, and it admits a Myhill–Nerode-type characterization in terms of finite prefix-suffix equivalence classes equipped with additional completeness and noncrossing constraints (Nagy, 21 Jul 2025).
1. Terminological status and basic definition
The underlying notion of linearity is the standard one from formal-language theory: a linear grammar is a grammar in which each production has a variable on the left side and at most one variable on the right side. Languages generated by such grammars are the linear languages. Deterministic linearity is more delicate, because the literature contains different non-equivalent proposals for what “deterministic linear language” should mean (Bedregal, 2016).
One influential grammar-based notion is the class , where a deterministic linear grammar has productions of the form or , together with the condition that for fixed and leading terminal , there is at most one possible continuation . The automata-based class , identified with 2detLIN in the supplied sources, is broader: every language in 0 is in 1, and the inclusion is proper (Bedregal, 2016).
The 2025 characterization makes the terminology explicit. A linear automaton accepts exactly the class 2 of linear languages, while its deterministic counterpart accepts the proper subclass called 2detLIN. The same source also states that 2detLIN is a proper superset of the regular languages (Nagy, 21 Jul 2025).
2. Automata-theoretic model
A linear automaton is presented in the 2025 treatment as a 5-tuple
3
where 4 is a finite set of states, 5 is the input alphabet, 6 is the initial state, 7 is the set of final states, and
8
A configuration is a pair 9, where 0 is the current state and 1 is the unread part of the input. A step
2
means 3, where exactly one of 4 is a letter and the other is 5. Thus, at each step exactly one head moves: either the left head reads a letter or the right head reads a letter. Acceptance is defined by
6
This model accepts exactly 7 (Nagy, 21 Jul 2025).
The deterministic restriction is stronger than mere single-valuedness of a transition relation. In the 2025 formulation, a linear automaton is deterministic iff for each state 8, either
9
or
0
So, in each state, only one head is allowed to move. A complete deterministic linear automaton additionally requires that the enabled head has a defined transition for every input letter (Nagy, 21 Jul 2025).
The 2016 presentation uses a closely related two-head model with disjoint state sets 1 and 2, one associated with reading from the left and the other with reading from the right. A 3-nondeterministic linear automaton is a sextuple
4
and the deterministic restriction requires
5
for each 6 and 7. In that treatment, 8-moves do not increase acceptance power, and nondeterministic linear automata characterize exactly the linear languages (Bedregal, 2016).
A further equivalence is with sensing 9 Watson–Crick finite automata. The supplied summary states that these automata are equivalent in language power to linear automata, and that their deterministic variants also coincide with 2detLIN; even the ability to read strings in a transition does not enlarge the accepted class beyond 0 or 2detLIN (Nagy, 21 Jul 2025).
3. Prefix-suffix equivalence and the Myhill–Nerode-type theorem
The central structural result for 2detLIN replaces the ordinary right-congruence viewpoint of Myhill–Nerode by an equivalence on prefix-suffix pairs, called “presus.” A presu is a pair 1, intended to represent a word 2 with 3 read from the left and 4 from the right. For a language 5, two presus 6 and 7 are equivalent iff
8
A border classification (BC) is a set of equivalence classes of presus under this relation (Nagy, 21 Jul 2025).
Two additional conditions are essential. First, a BC is complete if every word 9 has exactly one decomposition 0 such that 1 appears in the BC: 2 Second, a BC has a crossing pair if it contains 3 and 4 with 5 a proper prefix of 6 and 7 a proper suffix of 8. The characterization requires the absence of crossing pairs (Nagy, 21 Jul 2025).
The main theorem is: 9 The forward direction constructs a complete BC with finitely many classes from a complete deterministic linear automaton. The reverse direction constructs a complete deterministic linear automaton from a complete finite-index BC without crossings (Nagy, 21 Jul 2025).
This characterization departs sharply from the classical Myhill–Nerode theorem. Standard right congruences depend only on prefixes, which suffices for a one-way DFA. For 2detLIN, a deterministic computation may consume a prefix from the left and a suffix from the right before continuing on the middle substring, so the relevant context is a border 0, not a prefix alone. Finite index by itself is also not enough: completeness and the no-crossing-pairs condition are part of the theorem. Moreover, a single equivalence class may require up to two states, one 1 where the left head moves next and one 2 where the right head moves next (Nagy, 21 Jul 2025).
4. Position in the language hierarchy
The supplied sources place 2detLIN in a finely resolved hierarchy of formal-language classes.
| Class | Description | Relation to 2detLIN |
|---|---|---|
| Regular | Classical finite-state languages | Properly contained in 2detLIN |
| 3 | Deterministic linear grammars | 4 |
| 5 | Deterministic context-free languages | Incomparable with 6 |
| 7 | Linear languages | 8 properly |
The strict inclusion
9
is one of the main conclusions of the 2016 work. The same work also proves
0
properly, and establishes the incomparability
1
It further records the conjecture
2
That conjecture is stated, not proved (Bedregal, 2016).
The 2025 treatment supplements this landscape by situating 2detLIN between regular languages and general linear languages, and by relating the characterization to 3-rated linear languages. In particular, for 4-rated linear languages, the result collapses to the classical Myhill–Nerode theorem, while more general 5-rated subclasses admit more DFA-like behavior (Nagy, 21 Jul 2025).
5. Canonical examples, witnesses, and counterexamples
Several languages play a canonical role in delimiting 2detLIN.
- Palindromes: Over 6, the palindrome language is in 2detLIN; the source notes that it is indeed 7-rated linear, though not deterministic context-free in the one-turn sense. The corresponding BC includes classes such as
8
together with classes distinguishing the symbol at the center and a dead class for mismatches. In the 2016 comparison with 9, the palindrome language over 0 is used as a witness for 1 (Nagy, 21 Jul 2025, Bedregal, 2016).
- The language 2: This is given as a nonregular fix-rated linear language in 2detLIN. The source explicitly describes a complete BC with six classes 3, and a deterministic linear automaton with 12 states in the displayed table, some of them unreachable and removable. The example also shows that a class may contain presus with different next-head directions and that the BC need not be minimal (Nagy, 21 Jul 2025).
- The union 4: This language is cited as not belonging to the grammar-based class 5 according to de la Higuera and Oncina, but it is accepted by a deterministic linear automaton. It is therefore a witness that
6
is proper (Bedregal, 2016).
- The language 7: This language is linear but not in 8. The supplied explanation states that a deterministic linear automaton cannot deterministically decide whether each 9 matches one, two, or three 0’s, which witnesses the proper inclusion
1
More generally, the family
2
is used in the hierarchy based on degrees of nondeterminism (Bedregal, 2016).
- The language 3: The 2025 characterization proves that this language is not in 2detLIN. The argument forces infinitely many distinct presu classes of the form 4, contradicting finite index. This is a direct application of the BC theorem to a non-membership result (Nagy, 21 Jul 2025).
These examples show that 2detLIN is neither a minor variant of regularity nor a disguised form of deterministic context-freeness. Its natural examples include languages recognizable by symmetric border consumption, while its obstructions are often tied to the impossibility of assigning a finite, complete, crossing-free classification of border decompositions.
6. Degrees of nondeterminism and broader significance
The 2016 work refines the placement of 2detLIN by measuring how much branching a nondeterministic linear automaton requires. For an NLA
5
the degree of explicit nondeterminism is defined as
6
Then
7
The hierarchy theorem states
8
Thus 2detLIN is the base level of an infinite hierarchy that begins with deterministic linear languages and converges, in the limit, to all linear languages (Bedregal, 2016).
The 2025 characterization gives this base level a structural criterion analogous in spirit to Myhill–Nerode, but adapted to bidirectional reading. Its significance is explicit: it provides a method for proving that languages are in 2detLIN, a method for proving that languages are not in 2detLIN, and a foundation for future descriptional-complexity measures for deterministic linear languages (Nagy, 21 Jul 2025).
A plausible implication is that 2detLIN should be understood less as a small deterministic corner of 9 than as a structurally coherent class with its own canonical congruence theory. The defining feature is not merely determinism, but determinism under a two-sided reading discipline in which every input word must admit a unique, globally compatible border decomposition.