Question: 11. (10 points) Create a ) Create a regular expression, DFA, and Regular Grammar that describes a languages that has an even number of as

11. (10 points) Create a ) Create a regular expression, DFA, and Regular Grammar that describes a languages that has an even number of as and an odd number of bs followed by ayn number of cs or ds, OR a patten of even occurrences of the string `cbad`

12. (8 points) Give an explanation as well as 4 examples of why the follow regex does not work for problem 11.

(aa|bb|aabb |abab| abba | baba |baab |bbaa)*b|

b(aa|bb|aabb |abab| abba | baba |baab |bbaa)*|

(aa|bb|aabb |abab| abba | baba |baab |bbaa)*b(aa|bb|aabb |abab| abba | baba

|baab |bbaa)*

ie

evenAB = (aa|bb|aabb |abab| abba | baba |baab |bbaa)*

b(evenAB) | (evenAB)b | evenAB (b) evenAB

13. (8 points) What additions or edits (not using intersection) need to be made to the about to where it would satisfy the problem. If you use code to find the solution, please provide the example. 1

4. (3 points) Write code for problem 11 to determine if a string matches that problem.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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!