Finite loop on a NFA I understand that in a non-deterministic automaton, an input can lead to one, more than one, or no transition for a given state.
Given this information, I would assume that if the input lead to a loop, this loop would be infinite until a determined input happened (being one || more || ε).
However I would like to know if there's a way to represent a &quot;finite&quot; loop with an NFA. For example, an ATM where a person only has a determined amount of chances to get the password right. If not, the operation is cancelled.
The input is always the same (0-9 digits), so how can the outcome be different after 3 tries?
Thank you for any hints on this!
Let's assume the user needs to enter a password and then press OK. Let's assume the password is 42:

But let's say the user makes a mistake, how can we allow three tries? By adding failure states, waiting for OK, and if we're in a failure state when OK gets pressed we get another try. Let $*$ notate 'anything else' - any character that wasn't handled by another arrow.