State complexity

State complexity is an area of theoretical computer science dealing with the size of abstract automata, such as different kinds of finite automata. The classical result in the area is that simulating an n-state nondeterministic finite automaton by a deterministic finite automaton requires exactly 2n states in the worst case.

Transformation between variants of finite automata

Finite automata can be deterministic and nondeterministic, one-way (DFA, NFA) and two-way (2DFA, 2NFA). Other related classes are unambiguous (UFA), self-verifying (SVFA) and alternating (AFA) finite automata. These automata can also be two-way (2UFA, 2SVFA, 2AFA).

All these machines can accept exactly the regular languages. However, the size of different types of automata necessary to accept the same language (measured in the number of their states) may be different. For any two types of finite automata, the state complexity tradeoff between them is an integer function f where f(n) is the least number of states in automata of the second type sufficient to recognize every language recognized by an n-state automaton of the first type. The following results are known.

The 2DFA vs. 2NFA problem and logarithmic space

Unsolved problem in computer science
Does every n-state 2NFA have an equivalent poly⁡(n)-state 2DFA?

It is an open problem whether all 2NFAs can be converted to 2DFAs with polynomially many states, i.e. whether there is a polynomial p(n) such that for every n-state 2NFA there exists a p(n)-state 2DFA. The problem was raised by Sakoda and Sipser, who compared it to the P vs. NP problem in the computational complexity theory. Berman and Lingas discovered a formal relation between this problem and the L vs. NL open problem. This relation was further elaborated by Kapoutsis.

State complexity of operations for finite automata

Given a binary regularity-preserving operation on languages ∘ and a family of automata X (DFA, NFA, etc.), the state complexity of ∘ is an integer function f(m,n) such that

Analogous definition applies for operations with any number of arguments.

The first results on state complexity of operations for DFAs were published by Maslov and by Yu, Zhuang and Salomaa. Holzer and Kutrib pioneered the state complexity of operations on NFA. The known results for basic operations are listed below.

Union

If language L1 requires m states and language L2 requires n states, how many states does L1∪L2 require?

  • DFA: mn states, see Maslov and Yu, Zhuang and Salomaa.
  • NFA: m+n+1 states, see Holzer and Kutrib.
  • UFA: at least min⁡(n,m)Ω(log⁡(min⁡(n,m))); between mn+m+n and m+nm20.79m states, see Jirásek, Jirásková and Šebej.
  • SVFA: mn states, see Jirásek, Jirásková and Szabari.
  • 2DFA: between m+n and 4m+n+4 states, see Kunc and Okhotin.
  • 2NFA: m+n states, see Kunc and Okhotin.

Intersection

How many states does L1∩L2 require?

  • DFA: mn states, see Maslov and Yu, Zhuang and Salomaa.
  • NFA: mn states, see Holzer and Kutrib.
  • UFA: mn states, see Jirásek, Jirásková and Šebej.
  • SVFA: mn states, see Jirásek, Jirásková and Szabari.
  • 2DFA: between m+n and m+n+1 states, see Kunc and Okhotin.
  • 2NFA: between m+n and m+n+1 states, see Kunc and Okhotin.

Complementation

If language L requires n states then how many states does its complement require?

  • DFA: n states, by exchanging accepting and rejecting states.
  • NFA: 2n states, see Birget. or Jirásková
  • UFA: at least nΩ~(log⁡n) states, see Göös, Kiefer and Yuan, (this follows an earlier bound by Raskin); and at most n+1⋅20.5n states, see Indzhev and Kiefer.
  • SVFA: n states, by exchanging accepting and rejecting states.
  • 2DFA: at least n and at most 4n states, see Geffert, Mereghetti and Pighizzini.

Concatenation

How many states does L1L2={w1w2∣w1∈L1,w2∈L2} require?

  • DFA: m⋅2n−2n−1 states, see Maslov and Yu, Zhuang and Salomaa.
  • NFA: m+n states, see Holzer and Kutrib.
  • UFA: 342m+n−1 states, see Jirásek, Jirásková and Šebej.
  • SVFA: Θ(3n/32m) states, see Jirásek, Jirásková and Szabari.
  • 2DFA: at least 2Ω(n)log⁡m and at most 2mm+1⋅2nn+1 states, see Jirásková and Okhotin.

Kleene star

  • DFA: 342n states, see Maslov and Yu, Zhuang and Salomaa.
  • NFA: n+1 states, see Holzer and Kutrib.
  • UFA: 342n states, see Jirásek, Jirásková and Šebej.
  • SVFA: 342n states, see Jirásek, Jirásková and Szabari.
  • 2DFA: at least 1n2n2−1 and at most 2O(nn+1) states, see Jirásková and Okhotin.

Reversal

  • DFA: 2n states, see Mirkin, Leiss, and Yu, Zhuang and Salomaa.
  • NFA: n+1 states, see Holzer and Kutrib.
  • UFA: n states.
  • SVFA: 2n+1 states, see Jirásek, Jirásková and Szabari.
  • 2DFA: between n+1 and n+2 states, see Jirásková and Okhotin.

Finite automata over a unary alphabet

State complexity of finite automata with a one-letter (unary) alphabet, pioneered by Chrobak, is different from the multi-letter case.

Let g(n)=eΘ(nln⁡n) be Landau's function.

Transformation between models

For a one-letter alphabet, transformations between different types of finite automata are sometimes more efficient than in the general case.

  • NFA to DFA: g(n)+O(n2) states, see Chrobak.
  • 2DFA to DFA: g(n)+O(n) states, see Chrobak and Kunc and Okhotin.
  • 2NFA to DFA: O(g(n)) states, see Mereghetti and Pighizzini. and Geffert, Mereghetti and Pighizzini.
  • NFA to 2DFA: at most O(n2) states, see Chrobak.
  • 2NFA to 2DFA: at most nO(log⁡n) states, proved by implementing the method of Savitch's theorem, see Geffert, Mereghetti and Pighizzini.
  • UFA to DFA: eΘ(n(ln⁡n)23), see Okhotin.
  • NFA to UFA: g(n)+O(n2), see Okhotin.

Union

  • DFA: mn states, see Yu, Zhuang and Salomaa.
  • NFA: m+n+1 states, see Holzer and Kutrib.
  • 2DFA: between m+n and 2m+n+4 states, see Kunc and Okhotin.
  • 2NFA: m+n states, see Kunc and Okhotin.

Intersection

  • DFA: mn states, see Yu, Zhuang and Salomaa.
  • NFA: mn states, see Holzer and Kutrib.
  • 2DFA: between m+n and m+n+1 states, see Kunc and Okhotin.
  • 2NFA: between m+n and m+n+1 states, see Kunc and Okhotin.

Complementation

  • DFA: n states.
  • NFA: g(n)+O(n2) states, see Holzer and Kutrib.
  • UFA: at least n(log⁡log⁡log⁡n)Θ(1) states, see Raskin, and at most eΘ(n(ln⁡n)23) states, see Okhotin.
  • 2DFA: at least n and at most 2n+3 states, see Kunc and Okhotin.
  • 2NFA: at least n and at most O(n8) states. The upper bound is by implementing the method of the Immerman–Szelepcsényi theorem, see Geffert, Mereghetti and Pighizzini.

Concatenation

  • DFA: mn states, see Yu, Zhuang and Salomaa.
  • NFA: between m+n−1 and m+n states, see Holzer and Kutrib.
  • 2DFA: eΘ((m+n)log⁡(m+n)) states, see Kunc and Okhotin.
  • 2NFA: eΘ((m+n)log⁡(m+n)) states, see Kunc and Okhotin.

Kleene star

  • DFA: (n−1)2+1 states, see Yu, Zhuang and Salomaa.
  • NFA: n+1 states, see Holzer and Kutrib.
  • UFA: (n−1)2+1 states, see Okhotin.
  • 2DFA: Θ((g(n))2) states, see Kunc and Okhotin.
  • 2NFA: Θ(g(n)) states, see Kunc and Okhotin.