Docsity

CS402 Assignment 2: Regular Expressions & Transition Graphs for Given Languages, Assignments of Computer Applications

Partial preview of the text

Download CS402 Assignment 2: Regular Expressions & Transition Graphs for Given Languages and more Assignments Computer Applications in PDF only on Docsity!

www.vuanswer.com

SUBSCRIBE OUR CHANNEL

https://www.youtube.com/channel/UCvFS8fAv4bvZsOmWu

WMIg3Q

WHATSAPP GROUP JOIN

CS402 ASSIGNMENT 2 SOLUTION SPRING 2021

Provided by VU Answer

Question No 1: Let FA 1 : And FA 2 :

www.vuanswer.com

SUBSCRIBE OUR CHANNEL

https://www.youtube.com/channel/UCvFS8fAv4bvZsOmWu

WMIg3Q

WHATSAPP GROUP JOIN

Construct an FA 3 defining the UNION of FA 1 and FA2. Also, write the regular expression for FA 3. Note: Only FA is required here, not the transition table. Solution: Old state A B

  • X,1=z1 Y,2=z2 X,1=z +Y,2=z2 Y,2=z2 X,3=z +X,3=z3 Y,3=z4 X,3=z +Y,3=z4 Y,3=z4 X,3=z

www.vuanswer.com

SUBSCRIBE OUR CHANNEL

https://www.youtube.com/channel/UCvFS8fAv4bvZsOmWu

WMIg3Q

WHATSAPP GROUP JOIN

Question No 1: Construct a regular expression and Transition Graph (TG) defining the following language over ∑={x,y}: All strings of x’s and y’s having y, x, and y as a subsequence. SOLUTION: R.E=

( xy )* y x (  y )* ( x xy ) y x (  y ) T. G=

www.vuanswer.com

SUBSCRIBE OUR CHANNEL

https://www.youtube.com/channel/UCvFS8fAv4bvZsOmWu

WMIg3Q

WHATSAPP GROUP JOIN

REGARD SARIM

WHATSAPP +

PLEASE NOTE:

Don't copy-paste the same answer. Make sure you can make some changes to your solution file before submitting copy paste solution will be marked zero. If you found any mistake then correct yourself and inform me. Before submitting an assignment check your assignment requirement file. If you need some help and question about file and solutions.

MORE ANY ASSIGNMENTS SOLUTION FREE

www.vuanswer.com