C++
Finite state machine recognizers are easy to encode. There are alsomany ways to encode them. However, for this lab, you MUST encode afinite state machine recognizer using a table lookup (i.e., put thespecifications for the machine in an array and use the array todetermine all output and transitions). The machine that yourprogram must emulate is the machine that recognizes the stringsrepresented by the regular expression
a*ba*b
The program MUST READ ONE CHARACTER AT A TIME AND CHANGE STATE,THEN READ ANOTHER CHARACTER AND CHANGE STATE, ETC.
YOU WILL LOOSE POINTS IF YOU USE A GETLINE OR STORE ALL THEOUTPUT THEN PRINT IT ALL OUT
OR
OR