Find a Regular Expression for the language accepted by the Finite Automata
Asked
Active
Viewed 1,204 times
-5
-
3Homework? What have you tried? – Reinstate Monica -- notmaynard Jan 24 '13 at 21:20
-
1What are the start and accept states? – Reinstate Monica -- notmaynard Jan 24 '13 at 21:26
-
I am not sure? How would I determine this? – OSUBuckeyeCompSci Jan 24 '13 at 21:33
-
@OSU it should be given in the problem. And this does seem like HW. – TakeS Jan 28 '13 at 14:43
2 Answers
1
Assuming that both your start and end state is -
, your finite automata accepts strings like these: -
ab
aab
abb
aabb
aabbaaabbb
abaabbaaabbb
aaaabbbb
bbaaabbbaab
so on..
Note that, strings accepted by your automata will change based on start
and end
state. But that you can make out yourself.
Based on the above pattern, you can probably generate a regex. It won't be that tough.

Rohit Jain
- 209,639
- 45
- 409
- 525
-
-
@OSUBuckeyeCompSci. You're almost there. Notice the strings at the ends. Your automata can repeat the string. So, it would be - `(a*b*)*`. – Rohit Jain Jan 24 '13 at 21:27
-
So based on the above FA how would you determine the start and end state? – OSUBuckeyeCompSci Jan 24 '13 at 21:33
-
-
@OSUBuckeyeCompSci.. They are already given. They are not determined. – Rohit Jain Jan 24 '13 at 21:33
-
@OSUBuckeyeCompSci. The person giving you an FSA to work with will also give you start and end state. Else you cannot work it out. – Rohit Jain Jan 24 '13 at 21:35
-
@OSUBuckeyeCompSci: Usually they are marked in the diagram. See http://en.wikipedia.org/wiki/State_diagram – Bergi Jan 24 '13 at 21:40
0
If your (-) state is end state then:
b*(a+b+)*
If your (+) state is end state:
b*(a+b+)*a+

Sten Petrov
- 10,943
- 1
- 41
- 61