Emptiness problem

From testwiki
Revision as of 20:40, 14 December 2023 by imported>WikiCleanerBot (v2.05b - Bot T20 CW#61 - Fix errors for CW project (Reference before punctuation))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

In theoretical computer science and formal language theory, a formal language is empty if its set of valid sentences is the empty set. The emptiness problem is the question of determining whether a language is empty given some representation of it, such as a finite-state automaton.[1] For an automaton having n states, this is a decision problem that can be solved in O(n2) time,[2] or in time O(n+m) if the automaton has n states and m transitions. However, variants of that question, such as the emptiness problem for non-erasing stack automata, are PSPACE-complete.[3]

The emptiness problem is undecidable for context-sensitive grammars, a fact that follows from the undecidability of the halting problem. It is, however, decidable for context-free grammars.[3]

See also

References

Template:Reflist

Template:Comp-sci-stub