Question: Consider the languages A = {a^m b^n c^n | m, n ? 0} and B = {a^n b^n c^m | m, n ? 0}. (a)
Consider the languages A = {a^m b^n c^n | m, n ? 0} and B = {a^n b^n c^m | m, n ? 0}.
(a) Give a context-free grammar for each of A and B. Then, use A and B to show that the class of context free languages is not closed under intersection.
(b) Use (a) and DeMorgans Law (Textbook Theorem 0.20) to show that he class of context-free languages is not closed under complementation.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
