Search code examples
computation-theory

Transition State Diagram for the automata


What will be the transition state diagram of (a+b)* and (a.b)* ? I'm little confused with the two state diagrams. I'm finding both of them same.


Solution

  • Assume the teal-colored states are start and accept states. (a+b)* can be read as "zero or many a's and b's in any order." (a.b)* can be read as "zero or many a's and b's in sequence." Note that node 3 exists as a dead state to reject a match if the sequence is broken. enter image description here