Write the Regular expression for the language of all consecutive even length a’s ?
Accepted Strings:Â
These all strings are the part of the language so should be accepted by regular expression;
Example strings = {aa, aab, aabaa, aabbaa, aababaa,………}and all other strings that contains consecutive even a’s.
Rejected Strings:
These all strings are not part of the language so should be rejected by regular expression;
Example strings = {a, b, ab, ba, aba, bba, abba,……………..} and all other strings that does not contains consecutive even a’s in strings.
R.E = aa (a+b)*ba
Part 1 | Part 2 | Part 3 |
aa | (a+b)* | ba |