You are on page 1of 1

Question 1: Ram saved his doc file but has forgotten the file name.

The all he remembers that filename


contains only three alphabet a, b, c and it has even no. of a and even no of b and odd no of c. Help Ram
to find the regular expression so that he can search his file.

Question 2: Let L be the language with alphabet {0, 1, 2} consisting of strings that don’t have any three
consecutive 0, any three consecutive 1 or any three consecutive 2. Prove that L is regular.

Question 3: Find the grammar for if, if….else, if..elseif…else statement .Derive a valid string from the
grammar using leftmost derivation and rightmost derivation.

Question 4: (a) Explain deterministic and nondeterministic PDA. Also explain the acceptance methods
with an example.

(b) Design the PDA to recognize balancing of parenthesis. Also write the grammar. Simulate the working
of PDA with an example.

You might also like