Download presentation

Presentation is loading. Please wait.

Published byXander Ayers Modified over 3 years ago

1
The Turing Machine A definition of computability by Noah Richards

2
Computability In the 1930s, mathematicians were looking for a definition of what it means to be able to compute a function. They came up with: A function is computable if it can be computed by a Turing machine.

3
What is a Turing Machine? Invented by Alonzo Church and Alan Turing, it is an incredibly simple machine with all of the power of any digital computer.

4
Parts of a Turing Machine 1) An infinite tape that is bi-directional and made up of squares containing a symbol from a finite alphabet. It contains only finitely many non-blank squares on the tape.

5
Parts, cont. 2) A read/write head positioned at some square on the tape. 3) A finite number of internal states at which it can be at exactly one at any given time.

6
Using a Turing Machine The general form of instruction for a touring machine is: (current_state, current_symbol, new_state, new_symbol, left/right)

7
Using, cont. An example of this is: (s1, 1, s2, 0, R) This means when the machine is in state s1 and reads a 1, it transfers to state s2, writes a 0 (to the same cell), and moves to the right one cell

8
Multiply Lets assume we want to write a program to multiply two numbers. We define this function as: multiply(n1, n2) = n1 * n2 As per common Turing convention, we will be representing numbers in unary (strings of 1s) separated by spaces (_s)

9
Heres the code: Multiply function Turing Machine code Step by step output for the multiply function

10
Virtual Turing Machine This code was created and run on the Virtual Turing Machine Virtual Turing Machine

11
Other sources of information The Turing Machine, written in JavaScriptThe Turing Machine, written in JavaScript with examples in unary addition, divisibility, and primality testing You guessed it: a Turing Machine written in schemea Turing Machine written in scheme

12
Moral of this story: Enjoy writing code in Scheme and Haskell. After all, you could be writing it for a Turing Machine.

Similar presentations

Presentation is loading. Please wait....

OK

Design and Analysis of Algorithms

Design and Analysis of Algorithms

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on web services testing Ppt on sustainable development in bangladesh Ppt on australian continent history Ppt on types of clouds Ppt on benefits of drinking water Ppt on world diabetes day 2016 Ppt on any civil engineering topics Ppt on human chromosomes number Ppt on non agricultural activities in antigua Download ppt on user interface