4

Is there some kind of proof for this? How can we know that the current NFA has the minimum amount?

Brian
  • 199
  • 4
  • 9

1 Answers1

4

As opposed to DFA minimization, where efficient methods exist to not only determine the size of, but actually compute, the smallest DFA in terms of number of states that describes a given regular language, no such general method is known for determining the size of a smallest NFA. Moreover, unless P=PSPACE, no polynomial-time algorithm exists to compute a minimal NFA to recognize a language, as the following decision problem is PSPACE-complete:

Given a DFA M that accepts the regular language L, and an integer k, is there an NFA with ≤ k states accepting L?

(Jiang & Ravikumar 1993).

There is, however, a simple theorem from Glaister and Shallit that can be used to determine lower bounds on the number of states of a minimal NFA:

Let L ⊆ Σ* be a regular language and suppose that there exist n pairs P = { (xi, wi) | 1 ≤ in } such that:

  1. xi wiL for 1 ≤ in
  2. xj wiL for 1 ≤ j, in and ji

Then any NFA accepting L has at least n states.

See: Ian Glaister and Jeffrey Shallit (1996). "A lower bound technique for the size of nondeterministic finite automata". Information Processing Letters 59 (2), pp. 75–77. DOI:10.1016/0020-0190(96)00095-6.

Community
  • 1
  • 1
Daniel Trebbien
  • 38,421
  • 18
  • 121
  • 193
  • 1
    OK, so polynomial time or space is not possible. What if we aren't concerned with performance. Surely there is an exhaustive algorithm, no? PSPACE-complete doesn't mean unsolvable, right? – Brent Jul 27 '13 at 19:49
  • @Brent: Correct, PSPACE-complete does not mean unsolvable (after all, [TQBF](http://en.wikipedia.org/wiki/TQBF) is solvable by a recursive algorithm). However, in this case, the claim that no such general method is known for determining the smallest NFA comes from the Glaister & Shallit paper. See also "[Computational complexity of NFA minimization for finite and unary languages](http://www.hermann-gruber.com/data/lata07-final.pdf)" by Hermann Gruber and Markus Holzer. – Daniel Trebbien Jul 27 '13 at 22:53
  • Note that the Glaister-Shallit lower bound (also known as the fooling-set method in computational complexity, and a special case of more general computational complexity lower bounds on NFA sizes) is not tight. Unfortunately, it could be that the biggest possible fooling set P has n elements, but the minimal NFAs have $2^O(n)$ states. – Artem Kaznatcheev Oct 03 '13 at 06:51