Skip to content

Turing Machines

Summarized notes from Introduction to Theory of Computation, Chapter 3

Differ from finite automata in following ways:

  • can read and write on the tape

  • read-write head can move left and right

  • the tape is infinite (unrestricted and unlimited memory access)

  • accepting and rejecting states take effect immediately

  • configuration: { current state, tape symbol, head location }

    • can be written as uqv where current state is q, current tape content is uv and current head location is the first symbol of v, e.g. 1011q70111
  • evaluation of input has 3 possible outcomes: accept, reject, or loop
    • decider machines always halt and either accept or reject
    • the language recognized by M is L(M)
  • M accepts input w is a sequence of configurations C1,C2,,Ck exists where
    • C1 is the start configuration of M on input w
    • each Ci yields Ci+1
    • Ck is an accepting configuration

Formal Definition

It is not typical to define TM in this level of detail; it is sufficient to describe the operations of the machine or simply the algorithm and trust that the machine can simulate it.

7-tuple M=(Q,Σ,Γ,δ,q0,qaccept,qreject) where

Q finite set of states
Σ finite input alphabet (without blank symbol)
Γ finite tape alphabet (includes blank symbol and ΣΓ
δ:Q×ΓQ×Γ×{L,R} transition function
q0Q start state
qacceptQ accept state
qrejectQ reject state qacceptqreject

Recognizers and deciders

Turing-recognizable

A language is Turing-recognizable if some Turing machine recognizes it.

decidable

A language is decidable if some Turing machine decides it.

Notes:

  • every decidable language is Turing-recognizable
  • recognizers are more powerful than deciders
  • if both a language and its complement are Turing-recognizable, the language is decidable
  • language is co-Turing-recognizable if it is the complement of a Turing-recognizable language


Relationship between languages

Some variants

The original model and reasonable variants (e.g. finite amount of work/step)
have same computational power. The following are all equivalent to the original model:

Machine Description
stay machine does not have to move left or right at each step, can stay in place: δ:Q×ΓQ×Γ×{L,R,S}
multitape multiple tapes and each tape has own read/write head which move simultaneously, initial input is on tape 1
nondeterministic at each step the computation may proceed according to several possibilities: δ:Q×ΓP(Q×Γ×{L,R})
enumerator machine with an attached printer for producing output; the enumerated language is the strings eventually printed by the machine

Other unequal alternative models:

  • Linear bounded automaton (LBA)

    • restricted TM where the head is not allowed to move off the portion of tape containing input; attempt to move outside the tape causes the head to stay
    • LBA can decide every CFL; some decidable languages cannot be decided by LBA
  • Oracle Turing machine

    • modified Turing machine that has the additional capability of querying an oracle
    • oracle is an external device that is capable of reporting whether any string w is a member of language L
    • can decide more languages than an ordinary Turing machine can