Turing machine for subtraction | Set 1 (original) (raw)

Last Updated : 11 Jul, 2025

Prerequisite - Turing Machine Problem-1: Draw a Turing machine which subtract two numbers. Example: Steps:

Here, q0 shows the initial state and q1, q2, q3, q4, q5are the transition states and q6shows the final state. And X, 0, C are the variables used for subtraction and R, L shows right and left. Problem-2: Draw a Turing machine which subtract two numbers m and n, where m is greater than n. Steps:

Here, q0 shows the initial state and q1, q2, q3, q4, q5are the transition states and q6shows the final state. And B, X, 0, C are the variables used for subtraction(m>n) and R, L shows right and left and B variable is a input symbol. See for - Turing Machine for subtraction | Set 2