HOMEWORK_3_Solution_Key

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

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

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:
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

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern