SLIDE 3 9
Sample Turing Machine
- Turing Machine to detect equal/unequal number of A's and B's
- The machine works by making repeated passes through the
string, each time removing one A and one B. Eventually string is either empty (AEs = BEs) or something is leF (AEs G BEs)
- The steps the machine takes…
– Start at beginning of string (left side) – Move right looking for either an A or B or end of string
- If end of string found, number of AEs and BEs equal. Done.
- If A or B found, replace it with an X.
– Continue to move right, looking for the other character or end of string
- If other character is found replace it with an X, back to start of string, repeat.
- If end of string reached (other character was NOT found), number AEs and BEs unequal.
Done.
10
Sample Turing Machine
- Turing Machine to detect equal/unequal number of A's and B's
– Sample operation on "AAB"
Start
A B
A B
A B
EQ A,Rt B,Rt UNEQ Lt Find First
'A','X',R 'B','X',R '-’,’-’,N '-’,’-’,N 'B','X',L 'A','X',L '-','-',R 'A','X',R 'B','X',R '-','-’,N {'A','X','B'}, '-',L {‘A’,'X’},-,R {‘B’,'X’},-,R 'X','-',R 11
TM Highlights
- ________________________ a Turing machine is not fun
- But ________________ a current computer can do, a Turing machine can do and
vice versa
- We can use Turing machines to prove what current computers can't do
– What is computable? – It a Turing Machine can't do it, a computer as we know it today _____________ do it
- Example of what isn't computable?
– ________________ Problem: Write a program that is given another program as input and determines if that program will eventually halt. – Turing proved this is not computable in a famous paper
- Turing also proved that there is a Turing Machine that could take as input a
description of another Turing Machine and then emulate its operation
– _______________ Turing Machine – Forerunner of the "Stored Program Concept" (instructions & data are treated similarly)
- If an algorithm is O(polynomial) on TM then it is also O(polynomial) on a
__________________ computer as well
– Modern computers just seek to increase performance
12
CENG
Pre-requisite structure
Your Future CENG Courses
EE 109L (3)
Intro to CENG
<< None >>
EE 277L (2)
Fundamentals of Digital Circuits << EE 109 >>
EE 154 (2)
<< EE 109 >>
EE 254L (4)
Digital Sys. Design
<< EE 154 >>
EE 457 (3)
Computer Sys. Org. << EE 254L >>
EE 454L (4)
<< EE 254L >>
EE 451 (3)
Parallel & Distributed << EE 355 or CSCI 104>>
CS 353 (3) or EE 450(3)
Networks
<< CS 350 >>
CS 350 (4)
Intro to OS
EE 477L (4)
VLSI
<< EE 277L, 254L >>