Come & Join Us at VUSTUDENTS.net For Assignment Solution, GDB, Online Quizzes, Helping Study material, Past Solved Papers, Solved MCQs, Current Papers, E-Books & more. Go to http://www.vustudents.net and click Sing up to register. VUSTUENTS.NET is a community formed to overcome the disadvantages of distant learning and virtual environment, where pupils don’t have any formal contact with their mentors, This community provides its members with the solution to current as well as the past Assignments, Quizzes, GDBs, and Papers. This community also facilitates its members in resolving the issues regarding subject and university matters, by providing text e-books, notes, and helpful conversations in chat room as well as study groups. Only members are privileged with the right to access all the material, so if you are not a member yet, kindly SIGN UP to get access to the resources of VUSTUDENTS.NET » » Regards » » VUSTUDENTS.NET TEAM. Virtual University of Pakistan Come and Join Us at www.vustudents.ning.com CS402_4RTH ASSIGNMENT IDEA SOLUTION Answer # 1 (a): Pumping Lemma Version I Let us suppose a word that belongs to given language like as W = aaabbbbbb Where x =aa y = abbbb z bb xyyz Contain many number of and many numbers of but this string will not belong to L because the substring ab can occur at the most once in the words of L, while the string xyyz contains the substring ab twice. On the other hand if y-part consisting of only or then xyyz will contain number of different from number of this shows that pumping lemma does not hold and hence the language is not regular. Pumping Lemma Version 2 To prove this language to be non regular, suppose contrary, i.e. FACTORIAL is a regular language, then there exist an FA accepts the language FACTORIA. Let the number of states of this machine be 345 and choose a word w from FACTORIA with length more than 345, say, 347 i.e. the word w = a347.Since this language is supposed to be regular, therefore according to pumping lemma xynz L. Consider n=348, then xynz = xy348z = xy347yz. Since x, y and z consist of , so the order of x, y, z does not matter i.e. xy347yz = xyzy347 = a347 y347, y being non-null string and consisting of it can be written y = am, m= 1, 2,3, , 345 . Thus xy348z = a347 (am) 347 = a 347(m+1) Now the number 347(m+1) will not remain FACTORIA for m = 1, 2,3, , 345 . That shows that the string xy348z is not in FACTORIA. Hence pumping lemma version II is not satisfied by the language FACTORIAL. Thus FACTORIAL is no regular. Answer # 1 (b): According to PUMPING LEMMA I AND II given language is not regular explained as above. Come and Join Us at www.vustudents.ning.com ((a+b)(a+b))* = (aa + ab + ba + bb)* given below S XY X aX bX Y aY bY Odd Length Language CFG for ((a+b)(a+b))* (a+b) = (aa + ab + ba + bb)* (a+b) given below S BaB | AbA | X | Y B bbB | /\ A aaA | /\ X BbabB Y AabaA S XY XX Y aY bY X aaa aba bab bbb Answer # 2 (b): Even Multiple of Three Palindrome S Y|Z|YZ|ZY Y b| a Y a | a Y b | b Y a | bY b Z a|aZa|aZb|bZa|bZb Odd Multiple of Three Palindrome S Y|Z|YZ|ZY Y b| a Y b | b Y a Z a | a Z b | bZ a Come and Join Us at www.vustudents.ning.com S aAA bBB A bB Z B aA Her we can see that B also has null production so B is null production A & S are said to be Null able production. S aAA aA a bBB bB b A bB Z b B aA a Answer # 3 (b): S aAA bBB A bB Z B aA Z Her we can see that B & Z & S also have null production so B & Z & S are null production. A is said to be Null able production. S aAA aA a bBB bB b A bB Z b B aA a Z a b Come and Join Us at www.vustudents.ning.com
"CS402 Automata Assignment 04 Solution fall 2012"