I need to design a Turing Machine Simulator in C++ that takes in an input file that goes something like this:
Q:q1,q2,q3,q4
A:0,1
Z:0,1,x
T:q1,0,q2,x,R
T:q1,1,q2,x,R
T:q2,0,q2,0,R
…
S:q1
F:q3,q4
Where Q is states, A is input values, Z is tape alphabet, S is start state, F is accept and reject states.
It needs to handle an input where it takes in the number of inputs, the input strings and accept or reject.
So if it input is:
3
0,#,1,1
1,1
0,1,0
the output would print out the steps and whether it accepts or rejects.
I need to create a TM that performs arithmetic operations, one that performs string operations, and another of my choice.
Any help on how to get started is appreciated.
Try something like this: