2000-Automata_and_Formal_Languages-scanned-solutions -...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Automata and Formal Languages (60 points) Sample Solutions Problem 1. [lo points] Consider the language L defined by the regular expression 00*10. Provide a PDA M for this language using as few states as possible. Note that there is a PDA with only 1 state and that the number of points you get will depend on the number of states used in your solution. Solution: The following PDA with only 1 state accepts the language L(00*10) by empty stack. The PDA has the following components: Q = {q), C = {0,1), I' = {Zo, X, Y), qo = q, and F = 1). The transition function is as follows: Problem 2. [18 points] Decide whether the following statements are TRUE or FALSE. You will receive 3 points for each correct answer and -2 points for each incorrect answer. I. If L1 and Lp are both non-regular, then L1 n L2 must be non-regular. 2. L = {w E {a, b, c)* I w does not contain an equal number of occurrences of a, b, and c) is context-free. 3. Let L represent the language of a non-deterministic finite-state automaton N; then, swapping the final and non-final states of N gives a machine N' whose language is the complement of L. 4. Assume that P # NP. If L1 is in P and L2 is in NP, then L1 n L2 must be in P 5. If L1 and L2 are both in NP, then L1.L2 must be in NP. 6.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

2000-Automata_and_Formal_Languages-scanned-solutions -...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online