Skip to article frontmatterSkip to article content

6.1Introduction to Turing Machines

The University of Melbourne

6.1.1Turing Machines, Informally

Recall the view of finite automata as a finite-state machine whose input is on a tape and controls a tape head (High Level Framework for Automata).

Schematic diagram of a finite automata. The finite control box
represents the various states and state transitions of the finite
automata.

Schematic diagram of a finite automata. The finite control box represents the various states and state transitions of the finite automata.

The finite automata can:

A Turing machine (TM) on the other hand can in addition:

6.1.2Formal Definition

The transition function can also be represented using a state transition diagram as was done for finite and pushdown automata. The transition δ(q,a)=(r,b,d)\delta(q,a) = (r,b,d) is represented by qab,drq \xrightarrow{a \rightarrow b, d} r. For transitions that do not overwrite the symbol under the tape head with a different symbol, i.e. δ(q,a)=(r,a,d)\delta(q,a) = (r,a,d), we use qadrq \xrightarrow{a \rightarrow d} r.

Let MM be a Turing machine. Consider an input string w=v1v2vnw = v_1 v_2 \cdots v_n where each viv_i is a symbol of the alphabet. The TM processes ww as follows:

  1. Initially, the first nn tape cells of the tape contain the symbols of ww, with the remaining cells containing the blank symbol ˽

  2. Start at the start state and with the tape head at the start (i.e. left end) of the tape

  3. Repeat the following:

    • Let qq be the current state and xx be the symbol under the tape head

    • If q=qaccq = q_{acc}, MM halts and accepts

    • If q=qrejq = q_{rej}, MM halts and rejects

    • Else:

      • let (r,y,d)=δ(q,x)(r,y,d) = \delta(q,x)

      • write xx to the cell under the tape head, move tape head in direction dd, and move to state rr

Configurations

We now explain in more detail exactly what a single step of computation in a Turing machine looks like.

Let CC and CC' be two configurations. We say that CC yields CC' iff applying δ\delta to CC results in CC' and write CCC \Rightarrow C'.

The initial configuration of MM on ww is q0wq_0w: the state is the initial state, the tape contains the input ww and the tape head is at the start of the tape.

With these definitions, it is now clear that:

Footnotes
  1. Also called semi-decidable.