-5

Find a Regular Expression for the language accepted by the Finite Automata

enter image description here

Rohit Jain
  • 209,639
  • 45
  • 409
  • 525

2 Answers2

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
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