NFSA Simulation with Deque a 1 2 3 b 4 5 a 6 7 8 c 9 10 11 12 d 13 start accept a a b d a Input Text top bottom state label Deque a a…