{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Midterm 2 Solution Fall 2013

so intersect the complement of l with abc to get

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

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

{[ snackBarMessage ]}

Ask a homework question - tutors are online