Why should you not implement a while loop in a FSM state?
In Finite State Machine, there is transition from one state to another based on some input.
Finite State machine can only look at the input and not the count of input symbol since it doesn't have stack or tape to store symbol.
While loop is used to count symbol and should terminate when condition holds False ie a particular count is reached.
FSM doesn't have provision to keep count of input symbol and thus while loop cannot be used in FSM.
If you have any questions comment down. Please don't simply downvote and leave. If you are satisfied with answer, please? upvote thanks
Get Answers For Free
Most questions answered within 1 hours.