Table of Contents
Fetching ...

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

Olga Martynova, Alexander Okhotin

TL;DR

The paper tackles the state-complexity of converting a regular expression of alphabetic width $n$ into a deterministic finite automaton. It introduces a two-stage approach that first forms an NFA that remembers the last symbol and then applies a refined subset construction, aided by unary-determinization via the Chrobak form and Landau's function. The main results are a tight upper bound $2^{\frac{n}{2}+ (\frac{\log_2 e}{2\sqrt{2}}+o(1))\sqrt{n\ln n}}$ and a near-matching lower bound $2^{\frac{n}{2}+ (\sqrt{2}+o(1))\sqrt{\frac{n}{\ln n}}}$ for the same class of languages, attained under a two-symbol alphabet and related constructions. This advances the theoretical understanding of regex-to-DFA transformation, sharpening the gap between best-known upper and lower bounds and highlighting the remaining open question on the precise logarithmic factor in the exponent.

Abstract

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.

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

TL;DR

The paper tackles the state-complexity of converting a regular expression of alphabetic width into a deterministic finite automaton. It introduces a two-stage approach that first forms an NFA that remembers the last symbol and then applies a refined subset construction, aided by unary-determinization via the Chrobak form and Landau's function. The main results are a tight upper bound and a near-matching lower bound for the same class of languages, attained under a two-symbol alphabet and related constructions. This advances the theoretical understanding of regex-to-DFA transformation, sharpening the gap between best-known upper and lower bounds and highlighting the remaining open question on the precise logarithmic factor in the exponent.

Abstract

It is proved that every regular expression of alphabetic width , that is, with occurrences of symbols of the alphabet, can be transformed into a deterministic finite automaton (DFA) with states recognizing the same language (the best upper bound up to date is ). At the same time, it is also shown that this bound is close to optimal, namely, that there exist regular expressions of alphabetic width over a two-symbol alphabet, such that every DFA for the same language has at least states (the previously known lower bound is ). 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.
Paper Structure (6 sections, 11 theorems, 28 equations, 4 figures)

This paper contains 6 sections, 11 theorems, 28 equations, 4 figures.

Key Result

Lemma 1

For every regular expression of size $n$, there is an NFA with $n+1$ states that remembers the last symbol and recognizes the same language.

Figures (4)

  • Figure 1: Transformation of a regular expression to an NFA that remembers the last symbol and has a non-reenterable initial state.
  • Figure 2: The Chrobak normal form of unary NFA.
  • Figure 3: NFA $A_{3,5}$.
  • Figure 4: Proof of Claim \ref{['state_complexity_lower_bound_lemma__reachability_claim']} in Lemma \ref{['state_complexity_lower_bound_lemma']}: for NFA $A_{3,5,7}$, applying the string $ba$ to add a a state to the cycle $P_m$, where $m=2$.

Theorems & Definitions (31)

  • Definition 1
  • Definition 2
  • Definition 3
  • Definition 4
  • Lemma 1
  • proof
  • Lemma 2: The first method for subset calculation
  • proof
  • Definition 5: Chrobak Chrobak
  • Lemma 3
  • ...and 21 more