# Regular Expression for multiple a’s and multiple b’s

## R.E = (a+b)*

Language of all those strings having multiple a’s and b’s, Set of strings of a’s and b’s of any length including the null string. So L = { ε, a, b, aa , ab , bb , ba, aaa…….}.

## Acceptable strings (part of the language)

These strings are part of the given language and must be accepted by our Regular Expression.

• 3 strings of length 1 ={null, a, b}
• 4 strings of length 2 = {aa, bb, ab and ba}
• 3 strings of length 3 = {aba, bab, aaa, and many more similar strings }
• 3 strings of length 4 = {aabb, aaaa, bbbb, and many more similar strings }
• 3 strings of length 7 = {aaaaaaa, bbbbbbb, abababa, and many more similar strings }
• 3 strings of length 10 = {abaaaaaaaa, bababbbbbb, aaaaaaaaaa, and many more similar strings }
• 3 strings of length 15 = {aabbaabbaabbaab, bbaabababbbbbbb, aaaaaaaabbbbbbb, and many more similar strings }
• 3 strings of length 20 = {aaaaaaaaaabbbbbbbbbb, aaaaabbbbbbbbbbbbbbb, bbbbbbbbbbbbbbaaaaaa, and many more similar strings }
• 3 strings of length 25 = {aaaaabbbbbaaaaabbbbbaaaaa, aaaaaaaaaabbbbbbbbbbbbbbb, bbbbbbbbbbbbbbbaaaaaaaaaa, and many more similar strings }
• Many more similar strings

## Rejectable string

These strings are not part of the given language and must be rejected by our Regular Expression.

No Reject able string defined over {a,b}

## Tutorial: Regular Expression

A detailed tutorial of the regular expression is here in the link of regular expression tutorial. This page contains the practice questions of regular expressions with solutions.

Tutorial covering the topics

• Give a regular expression.
• Describe the strings of the regular expression.
• write a regular expression.
• create all strings from regular expression.
• Generate all strings from regular expression.
• Extract all strings from regular expression.
• Find all strings from regular expression.
• Examples of regular expression.