SearcharxivSearch

arXiv subjects

Alexander Okhotin

Publications and source records attributed to Alexander Okhotin.

At least 19 recordsLinked to original sources

Categorial grammars with unique category assignment

A categorial grammar assigns one of several syntactic categories to each symbol of the alphabet, and the category of a string is then deduced from the categories assigned to its symbols using two simple reduction rules. This paper investigates a special class of categorial grammars, in which only one category is assigned to each symbol, thus eliminating ambiguity on the lexical level (in linguistic terms, a unique part of speech is assigned to each word). While unrestricted categorial grammars are equivalent to the context-free grammars, the proposed subclass initially appears weak, as it cannot define even some regular languages. It is proved in the paper that it is actually powerful enough to define a homomorphic encoding of every context-free language, in the sense that for every context-free language $L$ over an alphabet $Σ$ there is a language $L'$ over some alphabet $Ω$ defined by categorial grammar with unique category assignment and a homomorphism $h \colon Σ\to Ω^+$, such that a string $w$ is in $L$ if and only if $h(w)$ is in $L'$. In particular, in Greibach's hardest context-free language theorem, it is sufficient to use a hardest language defined by a categorial grammar with unique category assignment.

math.LO

From regular expressions to deterministic finite automata: $2^{\frac{n}{2}+\sqrt{n}(\log n)^{Θ(1)}}$ states are necessary and sufficient

It is proved that every regular expression of alphabetic width $n$, that is, with $n$ occurrences of symbols of the alphabet, can be transformed into a deterministic finite automaton (DFA) with $2^{\frac{n}{2}+(\frac{\log_2 e}{2\sqrt{2}}+o(1))\sqrt{n\ln n}}$ states recognizing the same language (the best upper bound up to date is $2^n$). At the same time, it is also shown that this bound is close to optimal, namely, that there exist regular expressions of alphabetic width $n$ over a two-symbol alphabet, such that every DFA for the same language has at least $2^{\frac{n}{2}+(\sqrt{2} + o(1))\sqrt{\frac{n}{\ln n}}}$ states (the previously known lower bound is $\frac{5}{4}2^{\frac{n}{2}}$). The same bounds are obtained for an intermediate problem of determinizing nondetermistic finite automata (NFA) with each state having all incoming transitions by the same symbol.

cs.FL

A lower bound on the state complexity of transforming two-way nondeterministic finite automata to unambiguous finite automata

This paper establishes a lower bound on the number of states necessary in the worst case to simulate an $n$-state two-way nondeterministic finite automaton (2NFA) by a one-way unambiguous finite automaton (UFA). It is proved that for every $n$, there is a language recognized by an $n$-state 2NFA that requires a UFA with at least $\sum_{k=1}^{n} (k - 1)! \cdot k! \cdot \mathrm{stirling2}(n, k) \cdot \mathrm{stirling2}(n+1, k)$ = $Ω\big( n^{2n+2} / e^{2n} \big)$ states, where $\mathrm{stirling2}(n, k)$ denotes Stirling's numbers of the second kind. This result is proved by estimating the rank of a certain matrix, which is constructed for the universal language for $n$-state 2NFAs, and describes every possible behaviour of these automata during their computation.

cs.FL

Nondeterministic tree-walking automata are not closed under complementation

It is proved that the family of tree languages recognized by nondeterministic tree-walking automata is not closed under complementation, solving a problem raised by Bojańczyk and Colcombet ("Tree-walking automata do not recognize all regular languages", SIAM J. Comp. 38 (2008) 658--701). In addition, it is shown that nondeterministic tree-walking automata are stronger than unambiguous tree-walking automata.

cs.FL

A hierarchy of reversible finite automata

In this paper, different variants of reversible finite automata are compared, and their hierarchy by the expressive power is established. It is shown that one-way reversible automata with multiple initial states (MRFA) recognize strictly more languages than sweeping reversible automata (sRFA), which are in turn stronger than one-way reversible automata with a single initial state (1RFA). The latter recognize strictly more languages than one-way permutation automata (1PerFA). It is also shown that the hierarchy of sRFA by the number of passes over the input string collapses: it turns out that three passes are always enough. On the other hand, MRFA form a hierarchy by the number of initial states: their subclass with at most $k$ initial states (MRFA$^k$) recognize strictly fewer languages than MRFA$^{k + 1}$, and also MRFA$^k$ are incomparable with sRFA. In the unary case, sRFA, MRFA$^k$ and MRFA become equal in their expressive power, and the inclusion of 1RFA into sRFA remains proper.

cs.FL

Conjunctive categorial grammars and Lambek grammars with additives

A new family of categorial grammars is proposed, defined by enriching basic categorial grammars with a conjunction operation. It is proved that the formalism obtained in this way has the same expressive power as conjunctive grammars, that is, context-free grammars enhanced with conjunction. It is also shown that categorial grammars with conjunction can be naturally embedded into the Lambek calculus with conjunction and disjunction operations. This further implies that a certain NP-complete set can be defined in the Lambek calculus with conjunction. We also show how to handle some subtle issues connected with the empty string. Finally, we prove that a language generated by a conjunctive grammar can be described by a Lambek grammar with disjunction (but without conjunction).

cs.LO

On the rank of the communication matrix for deterministic two-way finite automata

The communication matrix for two-way deterministic finite automata (2DFA) with $n$ states is defined for an automaton over a full alphabet of all $(2n+1)^n$ possible symbols: its rows and columns are indexed by strings, and the entry $(u, v)$ is $1$ if $uv$ is accepted by the automaton, and $0$ otherwise. With duplicate rows and columns removed, this is a square matrix of order $n(n^n-(n-1)^n)+1$, and its rank is known to be a lower bound on the number of states necessary to transform an $n$-state 2DFA to a one-way unambiguous finite automaton (UFA). This paper determines this rank, showing that it is exactly $f(n)=\sum_{k=1}^n \binom{n}{k-1} \binom{n}{k} \binom{2k-2}{k-1} =(1+o(1)) \frac{3\sqrt{3}}{8πn} 9^n$, and this function becomes the new lower bound on the state complexity of the 2DFA to UFA transformation, thus improving a recent lower bound by S. Petrov and Okhotin (``On the transformation of two-way deterministic finite automata to unambiguous finite automata'', Inf. Comput., 2023). The key element of the proof is determining the rank of a $k! \times k!$ submatrix, with its rows and columns indexed by permutations, where the entry $(π, σ)$ is $1$ if $σ\circ π$ is a cycle of length $k$, and 0 otherwise; using the methods of group representation theory it is shown that its rank is exactly $\binom{2k-2}{k-1}$, and this implies the above formula for $f(n)$.

cs.FL

Sweeping Permutation Automata

This paper introduces sweeping permutation automata, which move over an input string in alternating left-to-right and right-to-left sweeps and have a bijective transition function. It is proved that these automata recognize the same family of languages as the classical one-way permutation automata (Thierrin, "Permutation automata", Mathematical Systems Theory, 1968). An n-state two-way permutation automaton is transformed to a one-way permutation automaton with F(n)=\max_(k+l=n, m <= l) k (l \choose m) (k - 1 \choose l - m) (l - m)! states. This number of states is proved to be necessary in the worst case, and its growth rate is estimated as F(n) = n^(n/2 - (1 + \ln 2)/2 \cdot n/(\ln n) \cdot (1 + o(1))).

cs.FL

Non-closure under complementation for unambiguous linear grammars

The paper demonstrates the non-closure of the family of unambiguous linear languages (that is, those defined by unambiguous linear context-free grammars) under complementation. To be precise, a particular unambiguous linear grammar is presented, and it is proved that the complement of this language is not defined by any context-free grammar. This also constitutes an alternative proof for the result of Hibbard and Ullian ("The independence of inherent ambiguity from complementedness among context-free languages", J.ACM, 1966) on the non-closure of the unambiguous languages under complementation.

cs.FL

The maximum length of shortest accepted strings for direction-determinate two-way finite automata

It is shown that, for every $n \geqslant 2$, the maximum length of the shortest string accepted by an $n$-state direction-determinate two-way finite automaton is exactly $\binom{n}{\lfloor\frac{n}{2}\rfloor}-1$ (direction-determinate automata are those that always remember in the current state whether the last move was to the left or to the right). For two-way finite automata of the general form, a family of $n$-state automata with shortest accepted strings of length $\frac{3}{4} \cdot 2^n - 1$ is constructed.

cs.FL

On LL(k) linear conjunctive grammars

Linear conjunctive grammars are a family of formal grammars with an explicit conjunction operation allowed in the rules, which is notable for its computational equivalence fo one-way real-time cellular automata, also known as trellis automata. This paper investigates the LL($k$) subclass of linear conjunctive grammars, defined by analogy with the classical LL($k$) grammars: these are grammars that admit top-down linear-time parsing with $k$-symbol lookahead. Two results are presented. First, every LL($k$) linear conjunctive grammar can be transformed to an LL(1) linear conjunctive grammar, and, accordingly, the hierarchy with respect to $k$ collapses. Secondly, a parser for these grammars that works in linear time and uses logarithmic space is constructed, showing that the family of LL($k$) linear conjunctive languages is contained in the complexity class $L$.

cs.FL

The hardest language for grammars with context operators

In 1973, Greibach ("The hardest context-free language", SIAM J. Comp., 1973) constructed a context-free language $L_0$ with the property that every context-free language can be reduced to $L_0$ by a homomorphism, thus representing it as an inverse homomorphic image $h^{-1}(L_0)$. In this paper, a similar characterization is established for a family of grammars equipped with operators for referring to the left context of any substring, recently defined by Barash and Okhotin ("An extension of context-free grammars with one-sided context specifications", Inform. Comput., 2014). An essential step of the argument is a new normal form for grammars with context operators, in which every nonterminal symbol defines only strings of odd length in left contexts of even length: the even-odd normal form. The characterization is completed by showing that the language family defined by grammars with context operators is closed under inverse homomorphisms; actually, it is closed under injective nondeterministic finite transductions.

cs.FL

Homomorphisms on graph-walking automata

Graph-walking automata (GWA) are a model for graph traversal using finite-state control: these automata move between the nodes of an input graph, following its edges. This paper investigates the effect of node-replacement graph homomorphisms on recognizability by these automata. It is not difficult to see that the family of graph languages recognized by GWA is closed under inverse homomorphisms. The main result of this paper is that, for $n$-state automata operating on graphs with $k$ labels of edge end-points, the inverse homomorphic images require GWA with $kn+O(1)$ states in the worst case. The second result is that already for tree-walking automata, the family they recognize is not closed under injective homomorphisms. Here the proof is based on an easy homomorphic characterization of regular tree languages.

cs.FL

On the determinization of event-clock input-driven pushdown automata

Input-driven pushdown automata (also known as visibly pushdown automata and as nested word automata) are a subclass of deterministic pushdown automata and a superclass of the parenthesis languages. Nguyen and Ogawa ("Event-clock visibly pushdown automata", SOFSEM 2009) defined a timed extension of these automata under the event-clock model, and showed that this model can be determinized using the method of region construction. This paper defines a further extension of this model with the event clock on the call-return operations, and proposes a new, direct determinization procedure for these automata: an $n$-state nondeterministic automaton with $k$ different clock constraints is transformed to a deterministic automaton with $2^{n^2}$ states, $2^{n^2+k}$ stack symbols and the same clock constraints as in the original automaton. The construction is shown to be asymptotically optimal with respect to both the number of states and the number of stack symbols.

cs.FL

Describing the syntax of programming languages using conjunctive and Boolean grammars

A classical result by Floyd ("On the non-existence of a phrase structure grammar for ALGOL 60", 1962) states that the complete syntax of any sensible programming language cannot be described by the ordinary kind of formal grammars (Chomsky's ``context-free''). This paper uses grammars extended with conjunction and negation operators, known as conjunctive grammars and Boolean grammars, to describe the set of well-formed programs in a simple typeless procedural programming language. A complete Boolean grammar, which defines such concepts as declaration of variables and functions before their use, is constructed and explained. Using the Generalized LR parsing algorithm for Boolean grammars, a program can then be parsed in time $O(n^4)$ in its length, while another known algorithm allows subcubic-time parsing. Next, it is shown how to transform this grammar to an unambiguous conjunctive grammar, with square-time parsing. This becomes apparently the first specification of the syntax of a programming language entirely by a computationally feasible formal grammar.

cs.FL

Rational index of bounded-oscillation languages

The rational index of a context-free language $L$ is a function $f(n)$, such that for each regular language $R$ recognized by an automaton with $n$ states, the intersection of $L$ and $R$ is either empty or contains a word shorter than $f(n)$. It is known that the context-free language (CFL-)reachability problem and Datalog query evaluation for context-free languages (queries) with the polynomial rational index is in NC, while these problems is P-complete in the general case. We investigate the rational index of bounded-oscillation languages and show that it is of polynomial order. We obtain upper bounds on the values of the rational index for general bounded-oscillation languages and for some of its previously studied subclasses.

cs.FL

Input-driven automata on well-nested infinite strings: automata-theoretic and topological properties

Automata operating on strings of nested brackets, known as input-driven pushdown automata, and as visibly pushdown automata, have been studied since the 1980s. They were extended to the case of infinite strings by Alur and Madhusudan ("Visibly pushdown languages", STOC 2004). This paper investigates the properties of these automata under the assumption that a given infinite string is always well-nested. This restriction enables a complete characterization of the corresponding $ω$-languages in terms of classical $ω$-regular languages and input-driven automata on finite strings. This characterization leads to a determinization result for these automata, as well as to the first results on their Wadge degrees.

cs.FL

State complexity of halting, returning and reversible graph-walking automata

Graph-walking automata (GWA) traverse graphs by moving between the nodes following the edges, using a finite-state control to decide where to go next. It is known that every GWA can be transformed to a GWA that halts on every input, to a GWA returning to the initial node in order to accept, and to a reversible GWA. This paper establishes lower bounds on the state blow-up of these transformations, as well as closely matching upper bounds. It is shown that making an $n$-state GWA traversing $k$-ary graphs halt on every input requires at most $2nk+1$ states and at least $2(n-1)(k-3)$ states in the worst case; making a GWA return to the initial node before acceptance takes at most $2nk+n$ and at least $2(n-1)(k-3)$ states in the worst case; Automata satisfying both properties at once have at most $4nk+1$ and at least $4(n-1)(k-3)$ states in the worst case. Reversible automata have at most $4nk+1$ and at least $4(n-1)(k-3)-1$ states in the worst case.

cs.FL