Deterministic Finite State Machine - Checking for a valid Sequence and Pattern