Turing Machine in TOC (original) (raw)

Last Updated : 13 Apr, 2026

Turing Machines (TM) play a crucial role in the Theory of Computation (TOC). They are abstract computational devices used to explore the limits of what can be computed. Turing Machines help prove that certain languages and problems have no algorithmic solution. Their simplicity makes them an effective tool for studying computational theory, yet they are as powerful as modern computers.

Why Turing Machines is uses

While one might consider using programming languages like C to study computation, Turing Machines are preferred because:

A Turing Machine consists of a tape of infinite length on which read and writes operation can be performed. The tape consists of infinite cells on which each cell either contains input symbol or a special symbol called blank. It also consists of a head pointer which points to cell currently being read and it can move in both directions.

tape

Turing Machine Formalism

A Turing Machine is defined by:

  1. A finite set of states (Q).
  2. An input alphabet (Σ).
  3. A tape alphabet (Γ) that includes Σ.
  4. A transition function (δ).
  5. A start state (q0).
  6. A blank symbol (B).
  7. A set of final states (F).

Example: Turing Machine

We construct a Turing Machine (TM) for the language L = {0ⁿ1ⁿ | n ≥ 1}, which accepts strings of equal 0s followed by equal 1s.

**Components:

**Transition Table:

table1**Illustration

turing2

turing3

turing4

turing5

turing6

Using move δ(q3, B) = halt, it will stop and accepted.

**Note:

**Question: A single tape Turing Machine M has two states q0 and q1, of which q0 is the starting state. The tape alphabet of M is {0, 1, B} and its input alphabet is {0, 1}. The symbol B is the blank symbol used to indicate end of an input string. The transition function of M is described in the following table. turing7

The table is interpreted as illustrated below. The entry (q1, 1, R) in row q0 and column 1 signifies that if M is in state q0 and reads 1 on the current tape square, then it writes 1 on the same tape square, moves its tape head one position to the right and transitions to state q1. Which of the following statements is true about M?

  1. M does not halt on any string in (0 + 1)+
  2. M does not halt on any string in (00 + 1)*
  3. M halts on all string ending in a 0
  4. M halts on all string ending in a 1

Solution: Let us see whether machine halts on string ‘1’. Initially state will be q0, head will point to 1 as:

turing9

turing11

turing12

Option D says M halts on all string ending with 1, but it is not halting for 1. So, option D is incorrect.

Let us see whether machine halts on string ‘0’. Initially state will be q0, head will point to 1 as:

turing13

turing14

turing15

Option C says M halts on all string ending with 0, but it is not halting for 0. So, option C is incorrect.

Option B says that TM does not halt for any string (00 + 1)*. But NULL string is a part of (00 + 1)* and TM will halt for NULL string. For NULL string, tape will be,

turing16

Using δ(q0, B) = halt, TM will halt. As TM is halting for NULL, this option is also incorrect.
So, option (A) is correct.