(Solved) : Homework 2 4200 Formal Languages Instructor Dr Anh Nguyen Problem 1 Note Late Assignments Q44153561 . . .
Please help
Homework #2 4200 – Formal Languages (Instructor: Dr. Anh Nguyen) Problem 1 Note: Late assignments will not be graded. You will not only be graded on your mathematics, but also on your organization, proper use of English, spelling, punctuation, and logic. There are in total 2 problems in this homework. Problem 1 15 points Draw the state diagram of DFAs recognizing the following languages. Alphabet 9 = {0,1}. a. A = {ww starts with 0 and has odd length, or starts with 1 and has even length} b. B = {wlw is any string except 11 and 111} c. C = {4,0} Problem 2 10 points Example of set difference: A = {0,01), and B = {0,11}. Then, A – B = {01}. Prove that regular languages are closed under the set difference operation. That is, if A and B are regular languages, then, A – B is also a regular language. Hint: One can prove the statement above by either (1) contradiction or (2) construction. For the proof, you may make use of the theorems that regular languages are closed under union, intersection, and complement (already discussed in class). Show transcribed image text Homework #2 4200 – Formal Languages (Instructor: Dr. Anh Nguyen) Problem 1 Note: Late assignments will not be graded. You will not only be graded on your mathematics, but also on your organization, proper use of English, spelling, punctuation, and logic. There are in total 2 problems in this homework. Problem 1 15 points Draw the state diagram of DFAs recognizing the following languages. Alphabet 9 = {0,1}. a. A = {ww starts with 0 and has odd length, or starts with 1 and has even length} b. B = {wlw is any string except 11 and 111} c. C = {4,0} Problem 2 10 points Example of set difference: A = {0,01), and B = {0,11}. Then, A – B = {01}. Prove that regular languages are closed under the set difference operation. That is, if A and B are regular languages, then, A – B is also a regular language. Hint: One can prove the statement above by either (1) contradiction or (2) construction. For the proof, you may make use of the theorems that regular languages are closed under union, intersection, and complement (already discussed in class).
Expert Answer
Answer to Homework #2 4200 – Formal Languages (Instructor: Dr. Anh Nguyen) Problem 1 Note: Late assignments will not be graded. Yo…
OR