HOMEWORK_3_Solution_Key - S= a k b k εL And u,v,w...

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

View Full Document Right Arrow Icon
HOMEWORK 3 Solution Key (Prepared by Baris Caglar) 1. See online answers to Test 1. 2. Disproof: G: S aSb + λ This is a context free grammar that represents the language L={a n b n | n>=0} and it is not a regular language. (Can be proved easily by pumping lemma). It has one non-terminal on the right hand side. So it is not true that CFG’s that has only one non-terminal on the right hand side are regular. Even if you restrict the grammar to have only left-linear or right-linear productions (which is what Prof. Peralta meant to ask) then a grammar can be constructed for a nonregular language. 3. In the example proof of non-regularity, it is claimed that L={a i b j | i>=j}cannot be shown non-regular by pumping lemma, although it can: Let the constant in pumping lemma be k, we can choose the string to be:
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: S= a k b k εL And u,v,w decomposition will have a non empty v composed entirely of ‘a’s If we pump v 0 times (uv i w | i=0), then |a| < |b|, the resulting string is not in L. So L is not regular. 4. There are two different ways that can be employed in solving this question. One can either figure out what this NFA represents and draw a minimized DFA for it, hence finding the number of equivalence classes, or convert the NFA to a DFA, minimize the result and find the number of equivalence classes that way. There are straightforward algorithms to convert an NFA to a DFA (page 178) and minimizing the DFA(pages 182-188) in Sudkamp. Here we will see the second way since it is more rigorous....
View Full Document

This note was uploaded on 06/09/2011 for the course COT 4210 taught by Professor Staff during the Spring '08 term at University of Central Florida.

Ask a homework question - tutors are online