Turing Machines and PowerPoint Presentation, PPT - DocSlides

Turing Machines and PowerPoint Presentation, PPT - DocSlides

2017-04-30 96K 96 0 0

Description

the Halting Problem. This work is licensed under the Creative Commons Attribution-. NonCommercial. -. ShareAlike. 3.0 . Unported. License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mo.... ID: 543244

Direct Link: Embed code:

Download this presentation



DownloadNote - The PPT/PDF document "Turing Machines and" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.

Presentations text content in Turing Machines and

Slide1

Turing Machines and the Halting Problem

This work is licensed under the Creative Commons Attribution-

NonCommercial

-

ShareAlike

3.0

Unported

License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.

Slide2

Outline and Objectives

OutlineMotivationTuring MachineDefinitionExamplesHalting Problem

Learning Objectives

Discuss the concept of a

Turing Machine and tie to stored program concept and FSM

Explain the Halting problem

and its result

Slide3

????

What are the limits of algorithm problem solving and solutions?

Do you think there are formulated problems that cannot be solved algorithmically?

What would a problem like this look like?

Slide4

Turing Machine

A Turing Machine is an abstract computational model that …

operates on an infinite, bi-directional tape

reads/writes a symbol to the tape

keeps track of a state and jumps from one finite state to another based on the current state and input

Slide5

Turing Machine

Mathematically, a Turing Machine can be defined as a function ff: Q x S -> S x {L,R} x Q where S = {0,1,…} // finite set of symbolsQ = {A,B,C,…H,} // finite set of states L,R // direction to move tape

(

Sipser

,

140

)

Slide6

Turing Machine

Or…

A TM reads a value from the tape… transitions to a new state based on the value read and current state… moves the position of the tape… and possibly writes to the tape.

Slide7

Turing Machine

Two of the states are of particular interest…

Initial state (e.g., A) – where the machine starts

Halt state (e.g., H) – upon entering this state the machine stops execution (i.e., halts)

Initially, the

position of the tape is located at the leftmost character and blanks are interpreted as ‘0’.

Slide8

Turing Machine

What differentiates one Turing Machine from another is primarily …

… the function

f

(i.e., transition function)

The symbols and states play a role as well.

Slide9

TM Notation for Graphs

state

halt state

read/write/head

direction

read/head direction

Slide10

TRUE/FALSE Example

Assume TRUE = “11” and FALSE = “1”.

We want to create a TM

W

such if the tape contains true when started, the machine does not stop. If the tape contains FALSE, then

W

will halt.

We need to specify S, Q, and f.

Slide11

TRUE/FALSE Example

Slide12

Specification for TM W

S={A,B,C,H}Q={0,1} // A blank is interpreted as 0f:

f(Q,S)

0

1

A (start)

---

1BR

B

0HR

1CR

C

0CR

1CR

H (halt)

---

---

Slide13

COPY Example

Activity: Create a TM to copy a string of 1’s on the Tape.Assume the input is a block of 1’s. The TM should make a copy of the 1’s separated by a 0 and then halt.

11111

11111011111

Mark current 1 with an X’s and copy across, replacing second 0 with 1.

Slide14

Specification for TM C

S={A,B,C,D,E,H}Q={0,1,x}f:

f(Q,S

)

0

1

X

A (start)

0HR

XBR

--

B

0CR

1BR

--

C

1DL

1CR

--

D

0DL

1DL

1ER

E

0HR

XBR

--

H (halt)

--

--

--

Slide15

COPY Example

Slide16

Turing Machine

youtube.com/watch?v=cYw2ewoO6c4

Slide17

Turing Machine

How to relate a Turing Machine to modern computing?

Tape -> Storage (RAM or Disk)

Function -> Program

Significant in that it was first described by Alan Turing in 1937…

Slide18

Universal Turing Machine (UTM)

The idea is to encode a Turing Machine (t) on the tape and follow it by the input (n) to the TMThen the UTM would read the TM and execute it.What key concept does this resemble?STORED PROGRAM CONCEPT

(

Sipser

,

174

)

Slide19

Computability

TMs are quite powerful…

computable numbers – a number is TM computable if a TM can calculate a number to arbitrary precision starting from a black tape

computable functions – a function that determines a TRUE/FALSE statement about computable arguments is a TM computable function.

Slide20

Halting Problem

It is of interest to know if a TM will halt for a particular input…

We would like a TM which will compute a function

h(t,n)

that which returns

- TRUE if TM

t

halts when started with

n

- FALSE otherwise

Slide21

Halting Problem

The halting problem is not computable!!!

Proof by Contraction: Assume that we have such a TM H. Join H and C* (the copy TM) such that the halt state of C is the start state of H. This TM will determine if a machine whose encoding is

t

, halts when given

t

as an input.

Slide22

Halting Problem

To the halt state of H, add the TM W which goes to into an infinite set of transitions if its input is TRUE and halts if its input is FALSE. Call the final TM M. M halts if the TM with encoding t does not halt on an tape which initially contains t. Otherwise it does not halt. Consider running M on itself. This is a contradiction!

(

Sipser

,

174

)

Slide23

Halting Problem

There are two possibilities…

M halts on its encoding t (

ie

, H(

t,t

) is TRUE), but then M(t) should not halt by definition.

M does not halt on its encoding t (

ie

, H(

t,t

) is FALSE), but then M(t) should halt by definition.

Either way there is a contradiction. Our initial assumption about the existence of H is false.

Slide24

Consequences of the Halting Problem

Not everything is computable…

we can’t write a program which checks if it will stop

software verification

Slide25

References

Sipser

M:

Introduction to the theory of computation

. 2nd ed. Boston: Thomson Course Technology; 2006.


About DocSlides
DocSlides allows users to easily upload and share presentations, PDF documents, and images.Share your documents with the world , watch,share and upload any time you want. How can you benefit from using DocSlides? DocSlides consists documents from individuals and organizations on topics ranging from technology and business to travel, health, and education. Find and search for what interests you, and learn from people and more. You can also download DocSlides to read or reference later.