Name:  To any pushdown automata there exists a deterministic Turing ma- chine accepting the same language. 4. Select classes of languages closed under union

 regular languages  context free languages Automata and Grammars - Written test – Demo  deterministic context free languages. 5. Select true sentences: To pass to the oral exam you need at least 7 out of 12 questions correctly an- ∗ swered. Any missing or superficious cross makes the question incorrectly an-  To any L ⊆ Σ there exists a right congruence swered. The correct answer may contain zero to all crosses. A cross means with a finite index ∼L such that L equals to union of some sets of the ∗ ’YES’ (the language is the given type, an equivalent automaton in the given partition Σ / ∼L. class exists and so on).  Let us have a right congruence with a finite index ∼ and the set of ∗ 2i strings L is equal to the union of some sets of the partition Σ / ∼L. 1. The language {ab c : i ∈ N} is There exists a finite automaton accepting L. ∗  regular  Let us have a right congruence ∼ over Σ . For any three strings u, v, w ∈ Σ∗ it holds: u ∼ v ⇒ uw ∼ vw.  deterministic context–free Let us have a right congruence ∼ over Σ∗. For any three strings  has the prefix property  u, v, w ∈ Σ∗ it holds: u ∼ v ⇒ uw = vw.  context–free recursively enumerable. 6. To any deterministic accepting L by a final state  there exists a grammar generating the same language 2. The language {0i1i : i ≥ 0} is  that is a right linear grammar regular   that is a context grammar deterministic context–free   that is a context–free grammar  has the prefix property  a grammar without λ in the body of any rule except the rule S → λ. context–free  7. Select true sentences:  recursively enumerable.  To any language L accepted by a finite automaton there exists a right 3. Select true sentences: linear grammar generating L. To any regular language L there exists a context–free grammar gen-  To any nondeterministic finite automaton there exists a deterministic  finite automaton accepting the same language. erating L. To any language L accepted by a there exists a  Any two equivalent (deterministic) finite automata have the same  number of states. context–free grammar generating L. To any language L generated by a context–free grammar there exists  Any two equivalent finite automata accept the same language.  a deterministic pushdown automata recognizing L by a final state.

1 8. Consider the smallest set M that contains: 11. There exists a Turing machine accepting

∗  empty set ∅  the language {ww, w ∈ {0, 1} } ∗  a one element set {a} for any letter a of the alphabet Σ  the language {wwww, w ∈ {0, 1} } that is closed under concatenation, intersection and iteration.  the Diagonal language Ld Select true sentences:  the Universal language Lu.  The set M is equal to the set of languages over Σ accepted by finite 12. Write down the definition of a pushdown automata. automata.  The set M is is a subset of the set of languages over Σ accepted by finite automata.

 The set M1 that contains M and is closed under union contains all languages over Σ accepted by finite automata.

 The set M1 that contains M and is closed under union contains all languages over Σ accepted by pushdown automata. 9. Find sets of equivalent states in the following finite automaton: a b only {a, e}, no other equivalent states b  a b f  only {b, c} a b a a  only pairs {a, e} and {f, c} b b a b  no states in this FA are equivalent. c d a e   S → AB  10. Consider the grammar G = ({S, A, B}, {0, 1}, S, P ), where P = A → 0A1|λ . B → 0B1|λ

 G is linear  G is context–free  G is a context grammar  G is the Type 0  G is not context but there exists a context grammar generating the same language.

2