Answered

Discrete Mathematics
For each language L1 to L5, described below, you need to do the following:
• Create a regular expression that defines the language accurately.
The alphabet A = {a, b} will be used.
The languages are:
1. L1 which has exactly one a but any number of bs.
2. L2 which has an odd number of as and an even number of bs.
3. L3 which contains exactly two as or exactly two bs, although not necessarily adjacent.
4. L4 which has all the bs appearing before any of the as, or all the as appearing before any of the bs.
5. L5 where there can be any number of as but the number of bs must be even, although the bs do not have to be adjacent.

Answer :

Other Questions