Introduction to Turing Machines

Download Report

Transcript Introduction to Turing Machines

Introduction to Turing Machines

The Turing Machine

A TM consists of an infinite length tape, on which input is provided as a finite sequence of symbols.

A

head

reads the input tape. The TM starts at start state s 0 . On reading an input symbol it optionally replaces it with another symbol, changes its internal state and moves one cell to the right or left.

The Turing Machine

A TM is defined as: TM = where, S is a set of TM states T is a set of tape symbols s 0 H  d is the start state S is a set of halting states : S x T  S x T x {L,R} is the transition function

Simple TM Examples

Turing Machine U+1: Given a string of 1s on a tape (followed by an infinite number of 0s), add one more 1 at the end of the string. #111100000000…….  #1111100000000……….

Simple TM Examples

TM: U+1 d (s 0 , 1) |-- (s 0 , 1, R) d (s 0 , 0) |-- (h, 1, STOP) #s 0 111100000…..  #1s 0 11100000…..  #11s 0 1100000…..  #111s 0 100000…..  #1111s 0 00000…..  #11111h0000…..

STOP

Exercice

state S 0 S 0 S 1 S 1 symbol b a b a Input = “aaaabb” What is the output for this input?

Δ(state, symbol) (halt, a, stop) (S 1 , a, right ) (halt, b, stop) (S 0 , a, right )

Solution

• s 0 • s 1 • s 0 • s 1 • s 1 • halt “ a aaabb” “ a a aabb ” “ “ “ “ aa a aaa abb a aaaa aaaa bb b a b b ” ” ” ” •Input = a finite sequence of “a” symbol, followed by an infinite sequence of “b”.

•Describe what the output this machine generates.

Turing’s Thesis

Any mathematical problem solving that can be described by a mechanical procedure (algorithm) can be modeled by a Turing machine.

All computers today perform only mechanical problem solving. They are no more expressive than a Turing machine.

Turing’s Thesis

   Turing’s thesis is not a “theorem” there is no “proof” for the thesis.

The theorem may be refuted by showing at least one task that is performed by a digital computer which cannot be performed by a Turing machine.

Many contentions have been made to this end. However, till date there have not been any conclusive evidence to refute Turing’s thesis.

Conclusions

   Turing machines are a minimal extension over PDAs which provide greater expressiveness.

TMs are at a level that is much below the assembly language of any typical microprocessor.

So in the practical world, TMs are more useful in what they cannot do rather than in what they can.