Space1
Ones1
Program Library
Examples
Saved Programs
From your computer
Instructions
Basic Usage
All commands are separated by comma,
Declare machine's initial state
initial
keyword.Eg:
initial q0
declares q0 as the initial state.Declare accept state
accept
keyword.Eg:
accept qa
declares qa as the accept state.Declare reject state (optional)
reject
keyword.Eg:
reject qr
declares qr as the reject state.Tuples
- current state
- read symbol (truncated to the first character)
- next state
- write symbol (truncated to the first character)
- direction
l
(or-1
) means left,r
(or1
) means right
Q0 a Q1 b r
means: when you are at state Q0 and you encounter
symbol "a" on the tape, switch to state Q1, write "b" on the tape and move right.Calling one machine from another
You can create multiple machine programs and call the one machine from the other.
- Create a new program with the "New Program" button.
- Declare the machine's initial, accept/reject states and tuples according to your needs.
- Give that program a name e.g. IS_EVEN
- Now, to call IS_EVEN from another machine, use the exec command.
For example, if you want IS_EVEN to be called when you are at stateq1
and you read0
you should useq1 0 exec IS_EVEN
.
Specifying parent machine state after child machine executed (optional)
You can specify the parent machine state after the child machine has finished execution, depending on whether the child machine accepted or rejected.For example, the following command executes the machine IS_EVEN and then switches to state Qeven if IS_EVEN has accepted:q1 0 exec IS_EVEN Qeven
Furthermore, the following command switches to state Qeven if IS_EVEN has accepted or Qodd or if IS_EVEN has rejected:q1 0 exec IS_EVEN Qeven Qodd
If no states are specified for the accept or reject scenario, the parent machine keeps the last state of the child machine.
Who is using this tool (NEW)
Hello, thanks for using the Turing Machine Simulator! This tool will never display ads or use your machine for crypto mining like some others do.
I made this tool for students to engage with computability and I am happy that it has been used more than 80 thousand times.
I am now inviting you to reach out at logiki608@gmail.com
and let me know which university/institution/lab/course you come from so that they be listed here.
Also, don't hesitate to include suggestions and feedback :)
And if you feel like supporting my work, you may buy me a coffee through buymeacoffee.com/alistat