I am studying for tomorrows exam and I have checked many tutorials telling how to convert NFA to Regex but I can’t seem to confirm my answers. Following the tutorials, I solved that NFA

My solution was:
aba
Am I correct?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
How to convert NFA to Regular Expression?
Your answer
a*ba*is Correct. I can drive your answer fromNFAin given image as follows:There is a self loop on start state q0 with label
a. So there can be any number ofas are possible at initial (prefix) including null^in RE. So Regular Expression(RE) start witha*.You need only one
bto reach to final state. Actually for an accepting string; there must be at-least onebin string ofaandb. So REa*bto reach to either q1 or q2. Both are final states.Once you reach to a final state (q1 or q2). No other
bis possible in string (there is no outgoing edge forbfrom q1 and q2).Only symbol is
acan be possible at q1 and q2. Also for,aat q1 or at q2 move switch between q1 , q2 and both are final. So after symbolbany number ofas can be in suffix. (So string ends witha*).And RE is
a*ba*.Also, its DFA is as follows:
Any number of
as atq0that is:a*once you get
byou can switch to final stateq1:bat final state any number of
ais possible:a*And its a Minimized DFA!
Here is some more interesting answer by me on
FAsandREs, I believe will be useful to you:(AB)* = A*B*?