Question: Please Answer Question#02 Solution of Question 1 is attached. Solution of Questions #01 Please do Questions #01 As soon as possible. = {a, b} will

Please Answer Question#02 Solution of Question 1 is attached.

Please Answer Question#02 Solution of Question 1 is attached. Solution of Questions

Solution of Questions #01

#01 Please do Questions #01 As soon as possible. = {a, b}

Please do Questions #01 As soon as possible.

= {a, b} will be used for all of the following exercises. The alphabet 1. Give regular expressions which exactly define the following languages. [7 marks] (a) L1 which has exactly one b but any number of as. (b) L2 which has an even number of as and an even number of bs. [7 marks] (c) L3 which contains exactly two as or exactly two bs, although not necessarily adjacent. [7 marks] (d) L4 which has all the as appearing before any of the bs, or all the bs appearing before any of the as. [7 marks] (e) L5 where there can be any number of bs but the number of as must be even, although the as do not have to be adjacent. [7 marks] 2. Create finite state automota (FSA) for the languages L1 through to L5 defined above. For each FSA you create, pick one string that belongs to the language and show that it is accepted, and one string that does not belong to the language and show that it is rejected. You will receive up to 7 marks for each FSA, and up to 3 marks for each string you pick and show is either accepted or rejected. This gives a total of 65 marks for this question. 1.a) a*ba* Explanation: a* is for 0/more a's 1.b) (aa + bb + (ab + ba)(aa+bb)*(ab + ba))* Explanation: aa and bb are for even number of symbols (ab + ba)(aa+bb)*(ab + ba): If ab or ba comes the we gotta see if the ba or ab comes to make them even 1c) a*ba*ba* + b*ab*ab* Explanation: a*ba*ba* is for 2 number of b's b*ab*ab* is for 2 number of a's 1.d) a*b* + b*a* Explanation: a*b* is for all a's appearing before b's b*a* is for all b's appearing before a's 1.e) (b*ab*ab*)* Explanation: b*ab*ab* is for 2 a's 0/more instances of above will be having even number of a's

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To solve the task of creating finite state automata FSA for the given languages L1 to L5 using the regular expressions provided well cover each one in... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!