Regular expression for the language of all consecutive even length a’s

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, aabbbaa,………}and all other strings that contain 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 do not contain consecutive even a’s in strings.

R.E =  (aa+b)*

Part 1Part 2
(aa)*b*

 

 

 

DFA for the language of all consecutive even length a’s

DFA for the language of all consecutive even length a's

List of 100+ Important Regular Expression

By:Prof. Fazal Rehman Shamil
CEO @ T4Tutorials
Last Modified: April 2, 2020

Leave a Reply

Your email address will not be published. Required fields are marked *