Consider the following language:
L(M) = {w | w € {a, b}* and contains even number of a’s and b’s}
Draw a DFA for the above language
Implement this DFA in C/C++/Java.
Your implementation should validate the input string for alphabet i.e. ∑ = {a, b}, before using it in the DFA.
Your first implementation of DFA should use goto statements only.
Your second implementation of DFA should use switch statement instead of the goto’s.
Test your implementation using the following inputs:
aa, ab, aba, abab, aabbaabb
solve this complete and also c++ code
Enjoy 24/7 customer support for any queries or concerns you have.
Phone: +1 213 3772458
Email: support@gradeessays.com