# What is Turing Machine in TOC?

Data Structure AlgorithmsComputer ScienceComputers

A Turing machine is a computational model, like Finite Automata (FA), Pushdown automata (PDA), which works on unrestricted grammar. The Turing machine is the most powerful computation model when compared with FA and PDA.

Formally, a Turing machine M can be defined as follows −

M = (Q, X, ∑, δ, q0, B, F)

• Q represents the finite, non-empty set of states.

• X represents the set of tape alphabets.

• ∑ represents the non-empty set of input alphabets.

• δ is the transition function, whose mapping is given as, δ : Q x X → Q x X x {Left_shift, Right_shift}.

• q0 is the initial state of the machine

• B is the blank symbol

• F is the set of final states or halt states.

A single tape Turing machine has a single infinite tape, which is divided into cells.

The tape symbols are present in these cells.

A finite control is present, which controls the working of Turing machines based on the given input.

The Finite control has a Read/write head, which points to a cell in tape.

A Turing machine can move both left and right from one cell to another.

Input and output tape symbols

 …... B X1 X2 … Xi ... Xn B B ...

Finite control

A Turing can have three types of action upon an input.

Print Si, move one square to the left (L) and go to state qj.

Print Si, move one square to the right (R) and go to state qj.

Print Si, do not move (N) and go to state qj.