简体   繁体   中英

How can I construct a finite automaton for even decimal numbers?

I have to do this exercise and am completely stumped as to how. I've constructed some FA's before, but using binary numbers. How can I do this but for even decimal numbers?

It would be a simple one.

2 states: q1, q2.

  • q1 is initial state.
  • q2 is final state.
  • if input digit on q1 is any even digit, make a move to q2.
  • if input digit on q1 is any odd digit, remain on q1.
  • if input digit on q2 is any even digit, remain on q2.
  • if input digit on q2 is any odd digit, make a move back to q1.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM