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.
14. (3 points) Write code for problem 11 to determine if a string matches that problem.
please draw the DFA
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started