Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Continuation of the Turing Machines in the Senior Seminar | CSC 490, Study notes of Computer Science

Material Type: Notes; Professor: Locklair; Class: Senior Seminar; Subject: Computer Science; University: Concordia University - Wisconsin; Term: Fall 2006;

Typology: Study notes

Pre 2010

Uploaded on 08/19/2009

koofers-user-y9a
koofers-user-y9a 🇺🇸

10 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
8 November – Day 22
Student Presentations
- - - - - - -
Continuation of Turing Machines:
Example: Peter Linz Chapter 9 “addition” p. 242
[movement refers to head moving]
“program” to add (control unit transition functions will add)
“trick” is to use unary notation as it makes programming easier
input:
1 1 1 0 1 1
output:
1 1 1 1 1 0
Transition functions () are the program
“shorthand”
q0111011 means: in state q0, tape appears as 111011 and read/write
head will read the symbol just to the right of the state (q0) next
( q0, 1) = (q0, 1, R))
q0111011 1q011011 11q01011 111q0011
( q0, 0) = (q1, 1, R))
1111q111
( q1, 1) = (q1, 1, R))
11111q11 111111q1
( q1, ) = (q2, , L)
11111q21
( q2, 1) = (q3, 0, L)
1111q310
CSC 490 Course Notes and Outline, © Dr. Gary Locklair, Fall 2006
pf3

Partial preview of the text

Download Continuation of the Turing Machines in the Senior Seminar | CSC 490 and more Study notes Computer Science in PDF only on Docsity!

8 November – Day 22 Student Presentations


Continuation of Turing Machines: Example: Peter Linz Chapter 9 “addition” p. 242 [movement refers to head moving] “program” to add (control unit transition functions will add) “trick” is to use unary notation as it makes programming easier input:   1 1 1 0 1 1   output:   1 1 1 1 1 0   Transition functions () are the program “shorthand” q 0 111011 means: in state q 0 , tape appears as 111011 and read/write head will read the symbol just to the right of the state (q 0 ) next ( q 0 , 1) = (q 0 , 1, R)) q 0111011  1q 011011  11q 01011  111q 0011  ( q 0 , 0) = (q 1 , 1, R)) 1111q 111  ( q 1 , 1) = (q 1 , 1, R)) 11111q 11  111111q 1   ( q 1 , ) = (q 2 , , L) 11111q 21  ( q 2 , 1) = (q 3 , 0, L) 1111q 310 

( q 3 , 1) = (q 3 , 1, L) 111q 3110  11q 31110  1q 311110  q 3111110  q 3  111110  ( q 3 , ) = (q 4 , , R)) q 4111110 q 4 is final; therefore, TM ends with correct answer “5” on the tape Notice how states are used to “remember” something … NTO Chapter 31 (review) [movement refers to tape moving] data representation numbers people: base 10 computers: base 2 to make “programming” a TM easier, we use unary (counting ‘sticks’) - a non place value system Multiplication example Fig 3.12 -- input tape at top (user’s request) = 4 * 3

  • output (results) tape at bottom, TM calculated 12 “Program” on page 209 [transition state diagram, delta function] TM can solve any algorithm We believe that a TM is the simplest model of computation Dewdney’s quintuple for a TM (q, s, q’, s’, d) q = current state s = symbol under the tape q’ = state to transition to s’ = symbol to write on tape d = direction to move tape Note: TM programs are long because there is no real memory; they can’t count and remember a count in a variable; instead, states and temporary tape markers are used to ‘remember’ stuff Follow through multiplication and convince yourself how it works Multiplication is repeated addition, write 3 groups of 4 on the tape …