0% found this document useful (0 votes)
26 views2 pages

Assgn3 2011

This document provides 7 questions as part of an assignment on automata theory and computability. The questions ask the student to: 1) Give context-free grammars for two languages and put a grammar in Chomsky Normal Form. 2) Prove that a given grammar generates a specific language of balanced strings. 3) Identify a regular language equivalent to the language from question 2 and construct a semi-linear expression for its Parikh image. 4) Prove that regular grammars define regular languages. 5) Determine if a given language is context-free. 6) Identify which of two statements about the quotient and residual of a context-free language is true.

Uploaded by

No12n533
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views2 pages

Assgn3 2011

This document provides 7 questions as part of an assignment on automata theory and computability. The questions ask the student to: 1) Give context-free grammars for two languages and put a grammar in Chomsky Normal Form. 2) Prove that a given grammar generates a specific language of balanced strings. 3) Identify a regular language equivalent to the language from question 2 and construct a semi-linear expression for its Parikh image. 4) Prove that regular grammars define regular languages. 5) Determine if a given language is context-free. 6) Identify which of two statements about the quotient and residual of a context-free language is true.

Uploaded by

No12n533
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Automata Theory and Computability Assignment 3 (Context-Free Grammars) (Due on Fri 28 Oct 2011) 1.

Give context-free grammars for the following languages. You need not give a proof of correctness. (a) L1 = {ai bj ck | i = k } (b) L2 = a b c {an bn cn | n 0}. 2. Give an equivalent grammar in Chomsky Normal Form for the following CFG: S aSbb | T, T bT aa | S | . 3. Consider the grammar G below: S SS | aSb | bSa | . Prove that it generates the language {x {a, b} | #a (x) = #b (x)}. Hint: Consider the graph of a word x where you plot the value #a (y ) #b (y ) against prexes y of x. Use induction as usual.

#a #b

a b

b a a a a a b

4. For the CFG G in Question 3 above answer the following questions. (a) Give a regular language that is letter-equivalent to L(G). Such a language is guaranteed to exist from Parikhs theorem. (b) Use the construction in Parikhs theorem to construct a semi-linear expression for (L(G)). That is, rst identify the basic pumps for G, and the -minimal parse trees. Use these to obtain an expression for (L). 5. A regular grammar (or a strongly right-linear grammar) is a grammar in which all rules are of the form X aY or X where a is a terminal and X and Y are non-terminals. Prove that the class of languages denable by regular grammars is precisely the class of regular languages.

6. Is the following language context-free? Justify your answer. {al bm cn | l m n}. 7. For A, B , dene A/B AB = {x | y B : xy A} = {x | y B : xy A}.

Exactly one of the following statements is true. Which one is? Justify your answer. (a) If L is context-free, so is L/ . (b) If L is context-free, so is L .

You might also like