computer theory michael j. watts mike.watts.nz
DESCRIPTION
Computer Theory Michael J. Watts http://mike.watts.net.nz. Lecture Outline. Turing machines Computability Representation issues. Turing Machines. Simple theoretical model computability Basis of modern computers Finite state machines Equivalent to a digital computer - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Computer Theory Michael J. Watts mike.watts.nz](https://reader036.vdocument.in/reader036/viewer/2022082422/56812cda550346895d919b8c/html5/thumbnails/1.jpg)
Computer Theory
Michael J. Watts
http://mike.watts.net.nz
![Page 2: Computer Theory Michael J. Watts mike.watts.nz](https://reader036.vdocument.in/reader036/viewer/2022082422/56812cda550346895d919b8c/html5/thumbnails/2.jpg)
Lecture Outline
Turing machines Computability Representation issues
![Page 3: Computer Theory Michael J. Watts mike.watts.nz](https://reader036.vdocument.in/reader036/viewer/2022082422/56812cda550346895d919b8c/html5/thumbnails/3.jpg)
Turing Machines
Simple theoretical model computability
Basis of modern computers Finite state machines Equivalent to a digital computer Deal with an infinitely long tape Tape has a finite number of non-blank squares
![Page 4: Computer Theory Michael J. Watts mike.watts.nz](https://reader036.vdocument.in/reader036/viewer/2022082422/56812cda550346895d919b8c/html5/thumbnails/4.jpg)
Turing Machines
Each square has a symbol from a finite alphabet A datum
Has a read-write head Reads a symbol Symbol + current state
Writes a new symbol Moves left or right on the tape
![Page 5: Computer Theory Michael J. Watts mike.watts.nz](https://reader036.vdocument.in/reader036/viewer/2022082422/56812cda550346895d919b8c/html5/thumbnails/5.jpg)
Turing Machines
Continues until it reaches an unknown condition All computer languages and architectures are
equivalent to Turing machines Universal Turing machine
Generalisation Reads instructions off of tape
![Page 6: Computer Theory Michael J. Watts mike.watts.nz](https://reader036.vdocument.in/reader036/viewer/2022082422/56812cda550346895d919b8c/html5/thumbnails/6.jpg)
Turing Machines
Nondeterministic Turing machine Adds a write-only head Writes a guess at the solution Based on internal “rule”
![Page 7: Computer Theory Michael J. Watts mike.watts.nz](https://reader036.vdocument.in/reader036/viewer/2022082422/56812cda550346895d919b8c/html5/thumbnails/7.jpg)
Computability
“A function is computable if can be computed with a Turing machine”
http://www.ams.org/new-in-math/cover/turing.html
Valid input -> algorithm -> correct output Some problems are not computable
Halting problem
![Page 8: Computer Theory Michael J. Watts mike.watts.nz](https://reader036.vdocument.in/reader036/viewer/2022082422/56812cda550346895d919b8c/html5/thumbnails/8.jpg)
Computability
Polynomial time NP-Complete
Non-deterministic polynomial time NP-Hard
Many optimisation problems are NP-complete or NP-hard
Hamilton path Travelling salesman
![Page 9: Computer Theory Michael J. Watts mike.watts.nz](https://reader036.vdocument.in/reader036/viewer/2022082422/56812cda550346895d919b8c/html5/thumbnails/9.jpg)
Computability
Exponential time Number of steps is an exponential function of
complexity Encryption breaking Factorial complexity
Don't bother
![Page 10: Computer Theory Michael J. Watts mike.watts.nz](https://reader036.vdocument.in/reader036/viewer/2022082422/56812cda550346895d919b8c/html5/thumbnails/10.jpg)
Representation
Numbers in computers are represented in binary Base two numbers Integers / floating point
Floating point Single / double precision
Problems Recurring digits Accuracy
![Page 11: Computer Theory Michael J. Watts mike.watts.nz](https://reader036.vdocument.in/reader036/viewer/2022082422/56812cda550346895d919b8c/html5/thumbnails/11.jpg)
Summary
Turing machines are the basis of computer theory Any function that can be computed by a Turing
machine in computable Some problems are not computable Some problems are infeasible Problems with representation of numbers in
computers