# Designing Finite Automata from Regular Expression (Set 7)

In the below article, we shall see some Designing of Finite Automata form the given Regular Expression-

Regular Expression 1: Regular language,

`L1 = b*aa(a+b)*+b*ab*aa(a+b*)  `

The language of the given RE is-

`{aaa, baa, baa, bbaab, ..........}`

Strings containing two a’s always come together.
Its finite automata will be like below-

In the above transition diagram, as we can see that initial state ‘X’ on getting ‘a’ as the input it transits to a
state ‘Y’ and on getting ‘b’ as the input it remains in the state of itself and so on for the remaining states. Thus this FA accepting all the strings of the given RE language.

Regular Expression 2: Regular language,

`L2 = (b+ab)*(ε+a)' or '(a+ε)(b+ba)* `

The language of the given RE is-

`{ababa, aba, baba, bba, ...........}`

Strings containing two a’s never come together.
Its finite automata will be like below-

In the above transition diagram, as we can see that initial and final state ‘X’ on getting ‘a’ as the input it transits to another final state ‘Y’ and on getting ‘b’ as the input it remains in the state of itself and so on for the remaining states. Thus this FA accepting all the strings of the given RE language.

Regular Expression 3: Regular language,

`L3 = ab*c `

The language of the given RE is-

`{ac, abc, abbc, ...........}`

Its finite automata will be like below-

In the above transition diagram, as we can see that initial state ‘X’ on getting ‘a’ as the input it transits to another state ‘Y’ and the state ‘Y’ on getting ‘b’ as the input it remains in the state of itself and so on for the remaining states. Thus this FA accepting all the strings of the given RE language.

Regular Expression 4: Regular language,

`L4 = 0(10)* `

The language of the given RE is-

`{0, 010, 01010, 0101010, ..........}`

Its finite automata will be like below-

In the above transition diagram, as we can see that initial state ‘Y’ on getting ‘0’ as the input it transits to a final state ‘Z’ and so on for the remaining states. Thus this FA accepting all the strings of the given RE language.

Regular Expression 5: Regular language,

`L5 = b(c+ab)*d `

The language of the given RE is-

`{bd, bcd, babd, ..............}`

Its finite automata will be like below-

In the above transition diagram, as we can see that initial state ‘X’ on getting ‘b’ as the input it transits to a state ‘Y’ and so on for the remaining states. Thus this FA accepting all the strings of the given RE language.

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :

Be the First to upvote.

Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.