An exponential state lower bound for two-way nondeterministic complementation
Abstract
We prove that two-way nondeterministic finite automata cannot be complemented with a polynomial number of states independent of the alphabet. For each n ≥ 4 we construct an n-state automaton over a finite alphabet whose complement requires at least states.
Introduction
A two-way nondeterministic finite automaton (2NFA) has a finite set of states and a single read-only head, which may move in either direction along an input bounded by endmarkers. It accepts when some finite computation reaches an accepting state. The complementation problem asks whether every -state 2NFA over a finite alphabet has a 2NFA for the complementary language with at most states, for one polynomial independent of . We answer this question negatively.
For exact state counts, there is one initial state and a set of accepting states. Each transition depends only on the current state and scanned symbol, updates the state, and moves the head left, right, or not at all. We start the head on the left endmarker and forbid moves beyond either endmarker. Missing transitions reject that branch; infinite nonaccepting computations do not accept. An accepting initial configuration counts as acceptance. All states, including initial and accepting states, are counted. A deterministic two-way automaton (2DFA) has at most one successor for each state and scanned symbol.
For a finite set , let denote all binary relations on . Products are composed in path order: if and only if and for some . Use as an input alphabet. The product of a word is , and the empty product is . Define the relation-product liveness language
In particular, contains the empty word when is nonempty. For nonempty words, this is Sakoda and Sipser’s family , where [7]; the name one-way liveness is used in [4].
Theorem 1.1. For every integer , set and . There is an -state 2NFA recognizing such that every 2NFA recognizing has at least
states. In particular, there is no polynomial state bound for complementation that is independent of the finite alphabet.
The alphabet consists of all binary relations on a set of points, so . The parameter is the number of states, not the size of the transition table. Theorem 1.1 concerns bounds uniform over finite alphabets; it does not assert a lower bound over one fixed alphabet.
History and significance. Sakoda and Sipser’s work on nondeterminism and two-way finite automata [7] initiated the central state-succinctness problem of simulating two-way nondeterministic automata deterministically. Complementation is a separate question: here the target remains nondeterministic. Vardi’s construction gives an exponential-state one-way nondeterministic automaton for the complement of a two-way nondeterministic automaton [8, Theorem 3.2]. It certifies nonacceptance by locally consistent sets of states. For sweeping automata, whose head can reverse direction only at the endmarkers, Kapoutsis proved that the complement of one-way liveness requires exponentially many states in every sweeping 2NFA [4, Theorem 1]. Theorem 1.1 allows unrestricted two-way motion in the complementing automaton.
For deterministic two-way automata, complementation has a linear state bound independent of the alphabet [2]. Guillon, Prigioniero, and Taheri describe polynomial 2NFA complementation as open [3, Section 1] and give polynomial complementation by 1-limited automata [3, Theorem 4.1]. These automata may rewrite a tape cell on its first visit; this resource is absent from the read-only model considered here. Theorem 1.1 resolves the alphabet-uniform polynomial complementation question negatively. The same growing-alphabet family also requires exponentially many states in every equivalent deterministic two-way automaton: a smaller deterministic simulator could be complemented with linear state overhead. Corollary 5.3 makes this implication explicit, including the treatment of infinite nonaccepting computations.
The companion paper [6] proves a deterministic lower bound with a larger exponential rate for the same language, by an independent matching-diagram argument. We compare the exact bounds after Corollary 5.3. The new obstruction here applies even when the complementing machine is nondeterministic.
The argument. An automaton with states guesses a path through the relations and accepts exactly when their product is nonempty. We prove that recognizing product emptiness requires exponentially many states.
The proof separates a representation of computations from a finite algebraic lower bound. A segment of a computation is represented by four relations recording the possible entries and exits through its two boundaries. These path diagrams compose by joining boundaries. Their monoid is the monoid of partitioned binary relations introduced by Martin and Mazorczak [5, Sections 2.1–2.3], written with separate labels for the two directions of travel. Adding edges only increases the available accepting paths. On the other hand, singleton relation contexts test the absence of any prescribed pair. Consequently a machine for product emptiness induces a surjective multiplicative map from its path diagrams to the relation monoid that reverses inclusion.
To bound such maps, we attach recurrent classes of boundary labels to an idempotent diagram , meaning . These classes group labels joined in both directions by through paths together with returns. Their precise definition is given in Section 2. The diagrams satisfying form a submonoid with identity , called its corner. Such a may destroy the loops on some of those classes; we record the destroyed classes as a missing set. Two structural facts control this loss. First, one common missing-set bound transports through any fixed diagram context with only a factor of two. Second, along a chain of nested idempotents the sum of successive losses is bounded by twice a single initial missing-set budget. The second fact permits the corner identity to change during the argument.
For an integer parameter , the amplification step converts conjugates of one relation with an added off-diagonal pair into additions sharing a common budget. Each addition, after restriction to a smaller relation corner, incurs an inductively bounded loss. Taking gives the exponential recurrence. This strategy adapts the conjugate-amplification pattern of the matching-diagram rank-loss argument in [6], that argument concerns a deterministic state lower bound. Here all diagram paths may be nondeterministic, and the transport and nested-class bounds are proved anew. They are stated independently of automata and may be useful for other order-reversing images of finite path monoids.
Section 2 states the algebraic bound and derives the order-reversing map before developing recurrent classes and transport. Section 3 proves the chain bound, and Section 4 proves the algebraic lower bound. Section 5 proves the promised automata representation and completes the proof of Theorem 1.1.
The bounds impose no restriction on input length or on the running time of a successful computation. They compare finite-state machines without a work tape, and give no separation between uniform logarithmic-space complexity classes.
Path diagrams and missing recurrent classes
We first describe finite paths through a segment, without assuming that the paths come from an automaton. Our goal is a loss measure that detects edge inclusion and remains controlled when a segment is put in context.
Relations are composed in path order: means that and for some . On a single set, denotes the reflexive transitive closure, so it includes paths of length zero. We use the elementary path identities
The first groups successive -steps between -steps; the second groups the same alternating path from its opposite end. These identities hold whenever the relation types permit the displayed products.
The diagram monoid
Fix disjoint sets and , each of size . A diagram consists of four arbitrary relations
Entering the segment on the left uses a label of ; records an exit on the right and an exit on the left. Entering on the right uses a label of ; records an exit on the left and an exit on the right. The relations , are the through relations, and , are the return relations; see Figure 1.

Figure 1. The four relations of a path diagram. Each arrow represents a relation between entire label sets, not a single deterministic edge. In a product, an exit enters the neighboring segment with the same label.
Place diagrams in a line. At each internal boundary, identify an exit with the entry of the neighboring diagram bearing the same label. The product records finite paths from an outer entry to the first outer exit, with all earlier joins internal. A traversal of any consecutive block can be replaced by one edge of the block’s product, and that edge can conversely be expanded into a finite traversal. This proves associativity. The diagram with and identity relations and , empty is the identity. Thus the diagrams form a finite monoid .
This is the degree- monoid of partitioned binary relations of Martin and Mazorchuk [5]. To identify the two descriptions, label and by a common -element set. @ Bibliography keys
At each boundary, an entry and an exit with the same underlying label give one vertex. The four relations above become the four blocks of a binary relation on the left and right vertex sets. A join always switches from one factor to its neighbor, exactly as in their alternating-path composition. We have included the path expansion and contraction proof of associativity to fix the finite-path convention used below.
Write when all four relations of are included in the corresponding relations of . Products preserve this order in each argument. Joining two diagrams at one boundary gives
For example, a forward path crosses , alternates returns at the join, and crosses . Reflection exchanges with , with , and with , while reversing product order. We will prove symmetric statements for the positive sign and obtain the negative sign by this reflection.
From complementation to an order-reversing image
The algebraic obstruction to complementation is the following bound. As in the introduction, is the monoid of all binary relations on , composed in path order.
Theorem 2.1 (Order-reversing image bound). Let , let be a finite set of cardinality , and let be a submonoid of . Suppose that a surjective multiplicative map satisfies
Then
The map need not initially be assumed to preserve identities.
The proof is completed in Section 4. We first explain the automata reduction, using the finite-computation representation below. Its construction, proved in Section 5.2, uses one additional state to represent success by an exit past the right endmarker. Local diagram edges record finitely many stay moves followed by one move out of a cell; no bound on repeated crossings is imposed.
Lemma 2.2. Let be an -state NFA over a finite alphabet in the model fixed in the introduction. There are a monoid homomorphism
two fixed endmarker diagrams , and fixed positive labels such that, for every word ,
Consequently, if , then
The acceptance equivalence immediately implies the stated monotonicity in arbitrary word contexts:
Derivation of context monotonicity. Diagram multiplication is increasing in each factor. If , then
The designated forward edge persists under this inclusion. Applying (2.5) proves (4).
For relation-product emptiness, singleton contexts convert this increasing behavior of acceptance into a decreasing relation image. For , write . A multiplicative map is unital if it preserves identities.
Proposition 2.3. Let be a finite set with at least two elements. If an -state NFA recognizes , then a submonoid of admits a surjective unital homomorphism onto satisfying
Proof. Apply Lemma 2.2 to the complementing machine, and let . Suppose . For each , take the one-letter words
They belong to , and
Since the machine accepts exactly the words with empty relation product, (4) implies
Thus
If , applying (2.8) in both directions yields . Therefore
is well-defined. Concatenation of words proves multiplicativity, and the empty word proves preservation of the identity. It is surjective because every relation in is itself a letter of . Equation (2.8) is exactly the required order reversal (2.7).
With , Theorem 2.1 therefore bounds the states of a complementing machine. Section 5 constructs the -state source machine and completes the numerical deduction. It remains to prove the algebraic bound. The next subsection associates at most recurrent classes with an idempotent diagram. We will measure loss by the classes whose through loops are missing, and force that loss to grow exponentially with .
Recurrent classes in a corner
For an idempotent , define
When working only with the positive sign we omit superscripts. By and eq:2,
In particular, is transitive. A point is recurrent if . Mutual relatedness under is an equivalence relation on the recurrent points. Let be the collection of its classes for both signs, keeping the signs distinct. Then
For the identity diagram, is the identity relation on , so all directional labels form singleton recurrent classes.
The corner is a monoid with identity ; membership is equivalent to . For in this corner put
The return formulas and the two corner identities give
Consequently
The last two inclusions follow by multiplying the first two by on the appropriate sides. If belong to one recurrent class, then , , and (2.13) show that a loop implies . Reflection gives the same fact for the negative sign. Hence the following is well-defined:
We call the missing set of relative to .
Lemma 2.4 (Products of missing sets). Let be idempotent. For ,
In particular, for every positive integer .
Proof. The returns of persist in both and , so . Formula eq:2 therefore gives . Two loops at the same point compose to a loop. For the negative sign the corresponding product is , which gives the same conclusion. Finally , so no recurrent class is missing from .
Lemma 2.5 (Rectangles of through edges). Let be idempotent and let . For a positive recurrent class and any , set
The rectangle is independent of and is contained in . These rectangles cover . If , its rectangle is contained in . The reflected assertions hold for negative classes and . In particular,
Proof. Containment in follows from . The identities
show that replacing by a mutually -related point does not change either factor of the rectangle.
To prove coverage, (2.10) implies for every . Given a pair in , choose a witness for this expression with . Some label repeats along the portion. That label is recurrent, since a nonempty -path from back to itself is a -edge by transitivity. The portions before and after belong to and : indeed and for , including since is reflexive.
If is not missing from , insert between the two halves of its rectangle. The resulting relation is contained in by (2.13). Reflection proves the backward assertion. When the missing set is empty all through edges of are thus present in , and its return edges persist by (2.12).
Transport through a fixed context
The next statement controls a whole family of replacements at once. The common target set, rather than merely a bound for each replacement, will be essential in the amplification argument.
Lemma 2.6 (Transport). Let be idempotents and let satisfy . For every there exists a single set , with , such that
for every satisfying and .
Proof. For each positive class of , choose a representative and a witness for . Expand the middle edge into an actual finite path through the three diagrams . For a negative class do the same with . Make these choices once, independently of .
For every occurrence of a through edge of the middle factor on a chosen path, choose an -class whose rectangle covers that edge, using Lemma 2.5. Mark a -class if any class chosen along its witness lies in ; let be the marked set. If a class is unmarked, all its chosen through edges survive replacement of by , as do all return edges of . Its original outer pieces remain fixed. Thus its witness is a loop in , and the class is not missing. This proves the required common-set inclusion.
It remains to count marked classes. For each -class , let be the set of -classes chosen along its fixed witness. We show that the sets are pairwise disjoint among -classes of a fixed sign. Consider two positive witnesses, written as
where and the displayed -edges have been expanded through . Suppose the expanded paths use occurrences of middle-factor edges and covered by one -class. Its rectangle also contains and . The sign of that -class fixes the orientation of both edges and their entry and exit boundaries inside the three-factor product. Thus the prefix ending at , the crossed edge , and the suffix starting at concatenate to a path from to . Neither retained subpath has an earlier outer exit. The concatenation is therefore a valid finite path for , even if it repeats internal crossings or its selected middle edge points backward. Interchanging the two prefixes and suffixes similarly gives . The original exterior factors now give and , so and belong to the same recurrent class. Reflection gives the same conclusion for negative witnesses, with in place of . This proves the asserted disjointness for each sign. A witness using only returns of has and is never marked. Since , at most classes of each sign are marked, and .
A loss budget for nested idempotents
For idempotents in a semigroup, write if , and say that is nested under . This is a partial order: reflexivity and antisymmetry are immediate, and if , then and . Nesting is distinct from the edge-inclusion order .
We will bound the sum of the losses incurred along a nested chain, even though the identity, the recurrent classes, and hence the meaning of a loss change at every step. The key fact is a containment dichotomy: a new recurrent class contains either an old class that is not lost, or at least two old classes.
Lemma 3.1 (Absorption under nesting). Let be idempotents with . For either sign ,
In the positive sign one also has
The corresponding negative-sign inclusions use .
Proof. We prove the positive-sign statements and suppress the superscript . Because , its returns contain those of : and . Set
Then . The multiplication formulas applied to give
We spell out the two star rearrangements needed below, using the finite-path identities in (2.1).
Expanding in , we obtain
Indeed, by eq:3, so the relation inside the last star is contained in . For the other side, expand instead:
Here , so the relation inside the star is contained in . These inclusions, multiplied by the remaining , prove (3.1) because . Finally, and imply
Reflection proves all negative-sign statements.
Lemma 3.2 (Containment of recurrent classes). Let be idempotents with . Every class in contains either
a whole class in ; or
two distinct whole classes in .
All classes in either containment have the same sign.
Proof. Again work in the positive sign and omit its superscript. Fix a recurrent point of . Using (8) twice, its recurrence gives
By the rectangle cover in Lemma 2.5, each of the two displayed -edges can be factored through an -recurrent point. Denote the first point by and the second by . The resulting witness has the form
where
Here because . Moreover, Lemma 3.1 shows that multiplying on either side by or gives a subrelation of . Thus all four endpoint relations needed for class membership follow from (10) and :
In particular and are recurrent for and belong to the class of . In the first and last lines, inserting the recurrence at is essential: the shorter witness portion alone need not contain a -through edge.
The entire -class of lies in the -class of . Indeed, if is in the former class, then and , and the two mixed absorptions of Lemma 3.1 give and . The same argument applies to . If their -classes are distinct, this proves the second alternative. If they coincide, then by (10) and . The corner absorption gives , so that class is not in . This proves the first alternative. Reflection handles the negative sign.
Proposition 3.3 (Chain bound). Let be idempotents such that for . Suppose a single set satisfies
Then
Proof. Choose one protected label in every class of , and keep these choices fixed. Every protected label of sign satisfies at every stage . By transitivity of nesting and Lemma 3.1, , so this loop also belongs to . Thus every protected label remains recurrent. Let count the classes in containing no protected label. In particular .
Write . Every class missing at step is unprotected. Otherwise it would contain a protected label of sign ; the loop and the inclusion would then give , contradicting missingness.
Assign weight to each missing unprotected class of , and weight to each other unprotected class there. Their total weight is . Figure 2 illustrates the two ways that an unprotected new class can obtain weight at least one from the previous stage.

Figure 2. The weighted containment argument in the chain bound. All classes shown have one fixed sign and contain no protected label. Each new class contains either a whole nonmissing old class or two distinct whole old classes. A missing old class has weight ; every other old class has weight . The displayed regions express set containment schematically. Distinct new classes cannot use the same whole old class, so their unit weight requirements add.
By Lemma 3.2, each unprotected class at stage contains previous classes of total weight at least : either one nonmissing class, or two distinct classes. Every contained previous class is unprotected, since a protected label in it would also protect the new class. Distinct new classes cannot use the same previous class, because classes of a fixed sign are disjoint and the two sign-label sets are disjoint. Consequently
Summing and using yields .
An exponential bound for order-reversing images
We now prove Theorem 2.1, combining transport and the nested-chain inequality to bound order-reversing relation images. Write for the monoid of all binary relations on a finite set , with multiplication in path order. For , write ; relations on are also regarded as relations on supported on .
The proof amplifies one off-diagonal pair in the image into a family of pair additions. The chain inequality bounds their total cost in missing recurrent classes; restriction to smaller relation monoids bounds each cost from below. We first record two elementary facts that allow these restrictions without losing the hypotheses. The pattern of relation additions follows the matching-diagram argument in [6]; all loss estimates needed here are supplied by the path-diagram results just proved.
Corners and unit lifts
For an idempotent in a semigroup , its corner is a monoid with identity . A unit means an element with a two-sided inverse relative to the specified monoid identity.
Lemma 4.1 (Minimal idempotent corners). Let be a finite semigroup, let be a monoid, and let be a surjective multiplicative map. For every idempotent , there is an idempotent with that is minimal among such idempotents under . For every such minimal , restriction of gives a unital surjection
Every element of whose image is a unit of is itself a unit of . In particular, every unit of has a unit lift.
Proof. Every element of a finite semigroup has an idempotent positive power: the sequence of powers is eventually periodic, so a sufficiently large exponent divisible by its eventual period gives . Applying this to a preimage of gives an idempotent preimage of . Finiteness then gives one minimal in the nesting order.
For any , choose with . Then , proving surjectivity on the corner; its identity maps to . Now let have unit image. An idempotent power has an image that is both a unit and an idempotent in , hence equals . Since , minimality gives . If , the element is a two-sided inverse of in ; if , then is already the identity.
The next lemma identifies a smaller full relation monoid inside an idempotent corner. Its hypothesis says that the old relation restricts to the identity on the retained points.
Lemma 4.2 (Restriction of a relation corner). Let be idempotent, let , and put . Suppose that , and define . Then is idempotent, , and restriction is a unital monoid isomorphism
Its inverse sends to .
Proof. Using and , we obtain
If , then , and therefore
Thus restriction determines uniquely. Conversely, for a relation supported on , the relation belongs to , since , and
This proves bijectivity with the claimed inverse. For supported relations ,
Hence the inverse, and therefore restriction, preserves multiplication. Finally , the identity of .
Amplifying a single added pair
Set
The choice balances the two estimates proved below: pair additions each cost at least half the smaller-instance bound, while their total cost is at most times the original loss. The resulting gain is , at a reduction of points. We prove a missing-set bound strong enough to survive passage to any of the corners above. The additional unit-lifting hypothesis permits conjugation by arbitrary permutations of ; Lemma 4.1 will supply it when we return to Theorem 2.1.
Proposition 4.3 (Cost of one added pair). Let , let be idempotent, and let be a submonoid with identity . Let be a finite set of cardinality . Suppose that is a unital surjective homomorphism such that
and suppose that each permutation of has a lift that is a unit of . If is idempotent and, for distinct ,
then .
Proof. We induct on , simultaneously over all the data in the statement, including , , , and . For , we have . If were empty, Lemma 2.5 would give . Order reversal would then give , a contradiction.
Assume henceforth that , and put . We will construct nested steps with total missing-set size at most . Each step will contain a smaller instance of the Proposition, on points.
Step 1: A common budget for all pair additions. Choose disjoint sets
in . Conjugating by unit lifts of permutations gives elements with
Indeed, permutation conjugation acts transitively on ordered pairs of distinct points, and the inverse of a unit lift maps to the inverse permutation. Explicitly, a unit gives the conjugate , with . Applying Lemma 2.6 with therefore gives
Consequently the single set
has , and the product inequality of Lemma 2.4 gives for every . Let . Choose an idempotent lift of , by taking an idempotent positive power of any lift, and define
The image of consists of the identity and the three pairs , , and . The outer factors remove the first two, so
Figure 3 illustrates this conversion of two generator families into a family indexed by .

Figure 3. The relation images of the hub construction, with identity pairs omitted. Composing the and additions creates ; sandwiching by removes the two pairs incident to . The generators yield all pair additions.
Since , the common-set conclusion of Lemma 2.6 gives a single set such that
Step 2: A nested chain spending that budget. List the pairs of in any order, without repetitions. Let be the set of the first pairs, and put for . For any ,
To check this, acts as the identity on all the endpoints in question, and no pair of can be followed by a pair of , because . In particular, every is idempotent.
If the pair at position is , choose to be an idempotent positive power of . Inductively, Equation (4.6) gives . The sandwich, and hence all its positive powers, is absorbed on both sides by . Thus
All these elements lie in the -corner. Starting with , repeated use of Lemma 2.4 and Equation (15) shows that
Here taking a positive power cannot enlarge the missing set: all factors have the same missing set, and their union is unchanged. Proposition 3.3 now yields
We have bounded the total cost of the chain using only the original conjugates. It remains to give an inductive lower bound for each of its steps.
Step 3: A smaller instance inside every step. Fix , let be its newly added pair, and write and . Retain the two endpoints of this pair and all points outside the construction:
Then . Among the possible extra pairs of , only has both endpoints in , and this pair has not yet been added. Therefore . By Lemma 4.2, and restriction gives . Moreover, Equation (4.6) gives . Using and , we obtain
Consider the finite monoid . The restriction of maps it onto : sandwiching any preimage by gives a preimage of its -sandwich. Apply Lemma 4.1 inside to the idempotent . We obtain an idempotent with , minimal there among idempotent lifts of . Its corner maps unitally onto
and all units of this image have unit lifts. Composing with restriction gives a unital surjective homomorphism
This map is order-reversing because is and restriction preserves inclusion. It has unit lifts of every permutation of , by the isomorphism in Lemma 4.2. Also is a submonoid of with identity . These observations verify all the map and domain hypotheses needed for induction.
Because , we have . By Equation (4.8), the element maps under to . This relation is idempotent, so an idempotent positive power of has the same image. Since is idempotent, . Apply Lemma 2.6 from the identity to the identity , with context and missing set . Then apply the power consequence of Lemma 2.4 in the -corner. This gives
The induction hypothesis applies to , , , and , with the smaller parameter . It follows that
Summing this lower bound and using Equation (16), we conclude that
For , the last expression is , by the definition of . This completes the induction.
Proof of Theorem 2.1. Apply Lemma 4.1 to and the idempotent . It supplies an idempotent such that maps unitally onto and every permutation has a unit lift. The restricted map retains order reversal, and is a submonoid of with identity .
Choose distinct and any lift in of . An idempotent positive power of that lift has the same image. Proposition 4.3 therefore gives
as required.
Finite computations and the main lower bound
We complete the concrete obligations deferred in Section 2: constructing the small source automaton and proving the finite-computation representation. The order-reversing map has already been derived in Proposition 2.3; we then combine it with Theorem 2.1 to finish the main proof. Throughout, we use the automaton model fixed in the introduction, including stay moves, finite acceptance, and acceptance in the initial configuration.
The source automaton
Fix a set of size . Recall that the alphabet is , the word product is with , and
Lemma 5.1. The language is recognized by a NFA with exactly states.
Proof. Use one initial state , the states in , and one accepting state , all distinct. From on the left endmarker, the machine moves right into any chosen state of . On a letter , it may move right from to precisely when . At the right endmarker, every state in has a stay transition to . There are no other transitions, and is the only accepting state.
On , an accepting computation is exactly a sequence with for . Such a sequence exists exactly when the relation product is nonempty. For , the initial move reaches the right endmarker directly, and the machine accepts. This agrees with .
Finite computations as diagram paths
We now prove the representation promised in Lemma 2.2. The construction records arbitrary finite computations, including stay moves and repeated crossings of the same cut. It does not require termination of every computation.
Proof of Lemma 2.2. Let be the -state automaton in the lemma, with state set and initial state . Introduce one new state . From every original accepting state, at every cell, add a stay transition to . In state , move right regardless of the scanned symbol, finally exiting past the right endmarker in state . This last exit is only a device for representing acceptance, not a transition of the original machine. All original transitions remain subject to the endmarker restrictions.
A finite augmented computation from the original initial configuration to the designated exit exists if and only if accepts. Indeed, an accepting original computation can be followed by the added stay and rightward sweep. Conversely, the first entry into must come from an original accepting configuration. This argument includes the case that itself is accepting. Infinite computations create no additional finite successful computation.
Put and . Take the directional label sets to be two disjoint copies
For a cell symbol , including either endmarker with its boundary rules, let be the relation on given by the augmented stay transitions. Let and be the relations given by the augmented rightward and leftward transitions, respectively; their second coordinates record the state after the move. At the right endmarker, includes only the designated augmented exit, and at the left endmarker is empty. Define a diagram by
Thus each local diagram edge represents a finite sequence of stays, possibly empty, followed by one move out of the cell. The incoming sign specifies the side of entry, not additional machine memory; the transition rules themselves depend only on the state and symbol.
Set and for the two endmarkers, and set
This is a monoid homomorphism. Every finite augmented computation ending in the designated exit decomposes into successive visits to individual cells, each consisting of finitely many stays and one exit move. These visits give a path through the product of the cell diagrams. In the opposite direction, each local edge in a finite diagram path has a finite transition witness. Expanding these witnesses and concatenating them gives an augmented computation, because the exit state from one cell is exactly the entry state to the next. Neither direction assumes that a cut is crossed at most once.
The fictitious entry into the left endmarker with label represents the initial configuration; it is not an additional machine transition. No path can leave the tape to the left, and a path can leave to the right only through the designated exit. Hence (2.5) holds with and . For the empty word, the two endmarker cells are adjacent, and the identity gives precisely their product. A stay cycle causes no difficulty: only its finite traversals are represented in .
Remark 5.2 (Other standard conventions). The exponential conclusion also survives the usual changes of starting position or acceptance convention, with possible changes to the additive state offsets. To use our representation for a machine whose convention requires a positive transition into an accepting state, add a fresh nonaccepting initial copy with the same outgoing transitions, keeping all original states and transition destinations. This prevents the initial configuration alone from accepting, while preserving every acceptance after a transition. Starting on the first input cell can be simulated from the left endmarker by one additional initial state. If success must occur at a designated marker or on a specified exit, enable the added success routine only at that local accepting event. These versions of the path representation use labels per sign, and the source automaton still uses states. The exact offsets in Theorem 1.1 refer to the convention fixed in the introduction.
Proof of Theorem 1.1. For any , let , choose a set of size , and use the -state source automaton from Lemma 5.1. If an -state 2NFA recognizes its complement, then Proposition 2.3 supplies the order-reversing relation image required by Theorem 2.1. With , that bound gives
Rearranging proves the stated lower bound. Since its right-hand side grows exponentially with , no fixed polynomial can bound the complementation cost for all finite alphabets.
The determinization consequence
The lower bound also applies indirectly to deterministic simulation. Here we use one external automata transformation: deterministic two-way automata can be complemented with linear state overhead independent of the alphabet, even when the original computation may fail to halt [2]. The possible nonaccepting loops are the reason that exchanging accepting and rejecting states alone does not give this transformation.
Corollary 5.3. There are absolute constants and such that, for every , every DFA recognizing the language of the -state NFA in Theorem 1.1 has at least
states. Hence no polynomial state bound independent of the finite alphabet can determinize all NFAs.
Proof. We use only the linear-overhead conclusion of [2], allowing constant-factor changes for model conventions. The standard marker model and its normalization are described in the precursor [1]. Stay moves can be replaced by a two-step excursion that stores the destination state and the return direction in a fixed number of copies of the state set. The excursion goes left at the right endmarker and right elsewhere. Even on the empty word, the two distinct endmarker cells provide the needed adjacent cell. Auxiliary states are nonaccepting, and the destination state is entered only on returning to the original cell. A reached accepting configuration, including the initial configuration, can instead start a fixed marker sweep to a designated accepting halt. Missing transitions can halt and reject. These changes require states for an -state DFA and preserve finite acceptance. The cited transformation supplies the substantive additional step of handling infinite nonaccepting computations.
Thus an -state deterministic recognizer for has a deterministic complement, also a NFA, with at most states for an absolute constant . Theorem 1.1 gives
For all sufficiently large this implies the asserted bound with an absolute . Since the same alphabets are finite for every , it also excludes every polynomial bound uniform over alphabets.
For comparison, the companion theorem [6] gives
for an -state deterministic recognizer of the same language . That theorem also states the improvement from to when the initial configuration counts as acceptance, as it does here. Its exponent therefore grows as , compared with in Corollary 5.3. The source constructions use and states, respectively: the companion includes a rejecting sink, which the partial source automaton above does not need. Its matching-diagram proof gives a stronger deterministic bound independently of the complementation theorem proved here.
References
- [1]Viliam Geffert, Carlo Mereghetti, and Giovanni Pighizzini. Complementing two-way finite automata. In Clelia De Felice and Antonio Restivo, editors, Developments in Language Theory, volume 3572 of Lecture Notes in Computer Science, pages 260–271. Springer, 2005. doi:10.1007/11505877_23.DOI
- [2]Viliam Geffert, Carlo Mereghetti, and Giovanni Pighizzini. Complementing two-way finite automata. Information and Computation, 205(8):1173–1187, 2007. doi:10.1016/j.ic.2007.01.008.DOI
- [4]Christos Kapoutsis. Small sweeping 2NFAs are not closed under complement. In Automata, Languages and Programming (ICALP 2006), volume 4051 of Lecture Notes in Computer Science, pages 144–156. Springer, 2006. doi:10.1007/11786986_14.DOI
- [5]Paul Martin and Volodymyr Mazorchuk. Partitioned binary relations. Mathematica Scandinavica, 113(1):30–52, 2013. doi:10.7146/math.scand.a-15480.DOI
- [6]OpenAI. An exponential two-way deterministic state lower bound for one-way liveness. OpenAI Math Release preprint OAI:An-exponential-two-way-deterministic-state-lower-bound-for-one-way-liveness-September-25-2026, 2026. Theorem 1.1 and Section 3.
- [7]William J. Sakoda and Michael Sipser. Nondeterminism and the size of two way finite automata. In Proceedings of the Tenth Annual ACM Symposium on Theory of Computing, STOC ’78, pages 275–286. Association for Computing Machinery, 1978. doi:10.1145/800133.804357.DOI