Theory of Computation Final practice
3. Short answer: What is the maximum number of states that a deterministic finite automaton (DFA) must have to be equivalent to a non-deterministic finite automaton (NFA) with n states?
2^n
5. Multiple choice: A description of the language generated by the grammar with the productions: S→0S1 | 1S0 | SS | λ is: (a) The set of all strings over {0,1} with an equal number of 0's and 1's. (b) The set of all strings consisting of 0's followed by 1's. (c) The set of all palindromes over {0,1}. (d) The set of all strings where the number of 0's is twice the number of 1's. (e) None of the above.
a
2. Multiple choice: Choose the more powerful computational model, or write "equal" if they have equal power. (a) Single-tape Turing machine or Multi-tape Turing machine? (b) Context-free grammar or Regular grammar? (c) Non-deterministic finite automaton (NFA) with ε-transitions or NFA without ε-transitions? (d) Pushdown automaton (PDA) or Linear bounded automaton (LBA)? (e) Decidable language or Recognizable language?
a) equal b) context free c) equal d) LBA e) recognizable
1. For each of these statements, answer T(true) or F(false). (a) The concatenation of a language with itself is always regular. (b) The complement of a context-free language is always context-free. (c) Every regular language is also a context-free language. (d) The class of decidable languages is closed under the operation of Kleene star. (e) The intersection of two context-free languages is always context-free.
a) t b) f c) t d) t e) f
6. True or False: (a) If a language is regular, then it must be context-free. (b) The class of context-sensitive languages is strictly larger than the class of context-free languages. (c) The halting problem for Turing machines is decidable. (d) There exists an algorithm that can determine whether any two context-free grammars generate the same language. (e) The set of all true mathematical statements in number theory is decidable.
a) t b) t c) f d) f e) f
(a) A language is recursively enumerable if and only if some nondeterministic Turing machine recognizes it. (b) The union of two recursively enumerable languages is always recursively enumerable. (c) If a language and its complement are both recursively enumerable, the language is decidable. (d) The class of context-free languages is closed under complementation. (e) A language is decidable if some deterministic Turing machine decides it in polynomial time.
a) t b) t c) t d) f e) t