############## The following hints are only intended as either hints or as a quick check that you are on the right track. The answers do not correspond to actual exam answers. They may be continously updated during the exam grading. ############## 1a: No, we have no guarantee that the DFA is minimal. For full score one needs to provide a concrete example where the machine is not minimal. 1b: No, not true. For example, if R = e*, where e is the empty string, then the language is simply {e}, which is not infinite. 1c: No, see the corresponding lecture for more details. 1d: Yes, for example the halting problem. It can be recognized simply by simulating the input machine on the input string and answer yes if it halts. 2 State 0 1 {s0, s1} {s2,s3,s5} {s3} {s2,s3,s5} {s3,s5} {s0,s1,s4} {s3,s5} {s3,s5} {s0,s1,s4} {s0,s1,s4} {s2,s3,s5} {s3,s4} {s3,s4} {s3} {s0,s1,s4} {s3} {s3} {s0,s1,s4} 3 We first observe that the state q8 is inaccessible (as discussed during the lecture). Thus, we first remove it, and then use the marking algorithm. The correct answer is then that q3 can be collapsed with q7. 4a: For this exercise one first need to determine the language generated by the grammar. The crucial observation is that the number of a's is related to the number of c's in such a way that we have at most twice the number of a's. Choosing a suitable string is then straightforward. 4b: Follows the same strategy as usual. One can e.g. consider strings a^{2n}b for all $n \geq 1$. Then appending b^{2n} preserves membership, but appending any larger number takes us outside the language. 5: One can either use the systematic method presented at the lecture, and practiced at the tutorial, or construct a machine from scratch, which uses the stack to keep track of matching parenthesis. 6: No, (perhaps contrary to intuition) the language is not context-free. As soon as we realize this then a pumping lemma proof follows the usual structure. 7: A very similar exercise was discussed at the lecture. The most two important observations are (1) that one can check membership of any context-free language in a mapping reduction, and (2) that this strategy works for almost all languages except for two extreme cases (see the tutorial for hints).