Professional Documents
Culture Documents
Assignment One
Assignment One
Assignment One
(6 marks)
Q.#3: Let L be the language accepted by the following non-deterministic finite automaton with ε-
transitions:
(6 marks)
Q.#4: Construct a non-deterministic finite automaton with ε-transitions whose language of
accepted strings is equal to the language over the alphabet {a, b, c} generated by the context-
free grammar with non-terminals q0 and q1, whose start symbol is q0 and whose productions are
q0 → abq1, q1 → ε, q1 → q0 and q1 → abc. (6 marks)
Page 1 of 2
Q.#5: Let L = {w ∈ {0, 1}* : the first, middle, and last characters of w are identical}. (6 marks)
i. Show a context-free grammar that generates L.
ii. Show a natural PushDown Automata (PDA) that accepts L.
iii. Prove that L is not regular
Q.#6: Consider the following grammar G: (6 marks)
i. What are the first four strings in the lexicographic enumeration of L(G)?
ii. Give an example of a string w ∈ {0, 1}+ such that |w| > 7 and w ∉ L(G).
iii. Show that G is ambiguous
Page 2 of 2