105 Practice Final

These questions are from old 105 exams. Consider them representative of the type of questions that might be asked on the final. Note that the topics emphasized on our final differ vary from this practice test, i.e. your mileage may vary! Our exam will be on MONDAY, JUNE 8 at 8 a.m.. You will have 3 hours, however I am planning an exam that is only slightly longer than the midterm so you should have plenty of time. The exam will be closed book and closed notes.

By the way, you've been a great class! Study hard and good luck on the final.

1. Consider the context-free grammar G=(V,T,P,S) where P is the set of productions:
S-->aB
B-->Sbb
S--> epsilon

2. Consider the PDA M=({q0,q1,q2},{a},{A,B},delta,q0,A,{q0}) with instructions delta(q0,a,A)={(q1,BA)}, delta(q1,a,B)={(q0,epsilon)} and delta({q1,epsilon,B)={(q2,B)}.

3. Fill in the following chart with Y if the set of languages in the row is closed under the property in the column and N if it is not.
Give a brief justification for 2 of your answers in each row.

unionintersectionconcatenationcomplement
regular languages
context-free languages
recursive languages
r.e. languages

4. Consider the language L={0n1n2n| n > 0}.

5. Let M=({q0},{1},{1,B},delta,q0,B,F) be a Turing machine with instructions delta(q0,1)=(q0,1,R) and delta(q0,B)=(q0,B,R).

6. What kind of machines accept r.e. languages?
What kind of machines accept recursive languages?
Which one of these classes is a subset of the other?
Is this a proper subset (i.e. the two classes are not equal)? Why or why not?

7. Consider the following classes: recursively enumerable (r.e.) languages, languages accepted by deterministic FSAs, context-free languages (CFLs), recursive languages, all languages, regular langugages, deterministic context-free languages (DCFLs), languages accepted by DTMs.

Draw a diagram which shows the subset relationships between these languages.

For the given language classes, show by exhibiting particular languages, which subset relationships in the diagram are proper. For example, if you have claimed that language class A is a proper subset of language class B, then give an example of a language that is in class B but not in class A.

8. Show that it is undecidable to determine the following question: "Given TMs M1 and M2, is L(M1)=L(M2)?".