0

Would this DFA solve the problem to create a DFA that accepts simple arithmetic string.

e.g.

7        -> accepted
4+1      -> accepted
5-7      -> accepted
8*3      -> accepted
2/1      -> accepted

*        -> not accepted
/3       -> not accepted
5+       -> not accepted

I am thinking if I would want to accept negative numbers but this is not required, so I created this DFA

DFA

Joey Hipolito
  • 3,108
  • 11
  • 44
  • 83

0 Answers0