Unformatted text preview: gular, must symmetric(L) be regular? Explain. Yes. Let Lrev be the language {w : wrev ∈ L}. We have seen that regular languages are closed under reversal, so if L is regular so is Lrev. Now symmetric(L) = L ∩ Lrev, so because regular languages are closed under intersection, symmetric(L) is regular whenever L is. (b) [7 marks] If L is context free, must symmetric(L) be context free? Explain. No. Let L = {aibiaj : i,j ≥ 0}. Then L is a CFL. (Here’s a CFG: S → TA; T → aTb  ε; A → aA  ε.) But symmetric(L) = {aibiai : i ≥ 0}. By pumping, symmetric(L) is not a CFL even though L is. Question 3 [10 marks] Consider the language L = {aibjck: i≠j or j≠k}. Show that L is not a DCFL. You cannot show this by showing that L is not a CFL, because it is. (Here’s a CFG for it: S → RC  AT; A → aA  ε; B → bB...
View
Full Document
 Fall '08
 lee
 Computer Science, Regular expression, Automata theory, Contextfree grammar, CFL

Click to edit the document details