Turing machines 1

Post on 22-Oct-2014

773 views 1 download

description

 

Transcript of Turing machines 1

Turing MachinesTuring Machines

John 18:38 Pilate said to him, What is truth? And when he had said this, he went out again to the Jews, and said to them, I find in him no fault at all.

How Euclid’s ‘Elements’ work

• Definitions

• Postulates

• Axioms

• Agreed Method Each step in the proof is an application of one of the above.

Hilbert’s question (1900)

• Is there, or could there possibly be, a definite method that could decide whether a particular mathematical expression is true?

• What – exactly – do we mean by a definite method? – Turing’s answer - mechanical – algorithmic - the Turing machine

Turing’s Concept

• A machine– With a finite set of states– Unrestricted input and output– Unlimited storage space– Simplest possible operations

01 00 1 11 1 10 0 0

Read/write head

Infinite tape

Basic operations of the machine

• Read– Read the symbol on the current square– Change the inner state of the machine

• Write– Change the symbol on the current square– Change the inner state of the machine

• Move– Tape can move any distance left or right

Turing-Kara

Turing machine is a 5-tuple

Current Input Output Move Next

0 0 1 - 1

0 1 - R 0

1 1 - L 1

1 0 - R Stop

Current Input Output Move Next

0 0 0 R 0

0 1 0 R 1

1 0 1 L 10

1 1 1 R 1

10 0 0 R 11

10 1 0 R 100

11 0 1 Stop 0

11 1 1 R 11

100 0 1 L 101

100 1 1 R 100

101 0 1 L 10

101 1 1 L 101

Universal Turing Machines

• Each quintuple could be coded into a single number, each number coded on tape.

• We therefore have the idea of a Turing machine which reads its own instructions.

• Such a machine could mimic any possible Turing machine.

Turing Machines and Computability

• Is there an algorithm which will establish the truth of mathematical proposition ‘p’?

…. is equivalent to the question

• Is there a possible Turing machine which will calculate all values of ‘p’ and stop if ‘p’ is false … and if so, can we know in advance if it will stop.

The Goldbach conjecture

Every even number greater than two, is the sum of two prime numbers.

We could make a Turing machine to test each successive number and find out if it is the sum of two primes. If it isn’t then the machine halts – having disproved the conjecture

The Entscheidungsproblem

The Halting Problem