Which one of the following regular expressions correctly represents the language of the finite automaton given below? 

A.

ab*bab*+ba*aba*

B.

(ab*b)*ab*+(ba*a)*ba*

C.

(ab*b+ba*a)*(a*+b*)

D.

(ba*a+ab*b)*(ab*+ba*)

Solution:

Minimal strings accepted by the given finite automata are 'a' and 'b'. Option A is not accepting the minimal strings.

Option B and Option C can generate string 'ab' which is not accepted by the given FA.

Option D is the correct R.E for the given FA.