A Turing machine is a primitive yet general computer with an in64257nite tape In each cycle the control unit reads the current tape symbol writes a symbol on the tape moves one position to the left or right and switches to the next state The last th ID: 30424 Download Pdf

104K - views

Published bynatalia-silvester

A Turing machine is a primitive yet general computer with an in64257nite tape In each cycle the control unit reads the current tape symbol writes a symbol on the tape moves one position to the left or right and switches to the next state The last th

Download Pdf

Download Pdf - The PPT/PDF document "Turing Machines A denition of computatio..." 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.

Page 1

Turing Machines A deﬁnition of computation is needed to study computa- tion mathematically. A Turing machine is a primitive, yet general, computer with an inﬁnite tape. In each “cycle”: the control unit reads the current tape symbol, writes a symbol on the tape, moves one position to the left or right, and switches to the next state. The last three actions depend on the current state and tape symbol. Formally, a Turing machine consists of: , a ﬁnite set of states, including a start state , an alphabet, which is a ﬁnite set of symbols includ- ing the

blank symbol , and , a state transition function, which is a partial func- tion from to { R,L The Turing machine starts in state with the control unit reading the ﬁrst symbol of the input string. There are an inﬁnite number of blanks to the left and right of the input.

Page 2

Turing Machine: Example 1 Here is a Turing machine for incrementing a binary string. 0) = ( ,R ) In state , move to the right 1) = ( ,R ) until you reach a blank, and then ,B ) = ( ,B,L ) switch to state 1) = ( ,L ) In state , move to the left 0) = ( ,L ) changing 1s to 0s until you reach

,B ) = ( ,L ) a 0 or blank, changing it to a 1. There are no transitions from so this is where you halt. ... ... ... ... ... ... ... ... ... ... ... ... ... ...

Page 3

Turing Machine: Example 2 On the next page is a Turing machine for recog- nizing binary strings that have equal numbers of 0s and 1s. On each pass to the right, one 0 and one 1 are changed to an , then the machine goes back to the left of the string. The machine accepts the string when the whole input has been changed to s. 0) = ( ,M,R ) In state , change the ﬁrst 1) = ( ,M,R ) 0 or 1 to an , and then switch ,M

) = ( ,M,R ) to state or ,B ) = accept Accept if all symbols are ,M ) = ( ,M,R ) In state , change the ﬁrst 0) = ( ,R ) 1 to an , and then switch to 1) = ( ,M,L ) state ,M ) = ( ,M,R ) In state , change the ﬁrst 1) = ( ,R ) 0 to an , and then switch to 0) = ( ,M,L ) state 0) = ( ,L ) In state , move back to the 1) = ( ,L ) beginning of the string, and then ,M ) = ( ,M,L ) switch to state ,B ) = ( ,B,R

Page 4

Properties of Turing Machines A Turing machine can recognize a language iﬀ it can be generated by a phrase-structure grammar. The Church-Turing Thesis: A

function can be computed by an algorithm iﬀ it can be computed by a Turing machine.

Â© 2020 docslides.com Inc.

All rights reserved.