Simulating a modern computer by a Turing machine and vice versa CS 6800 Instructor: Dr. Elise de Doncker By Shweta Gowda Saikiran Ponnam.

Slides:



Advertisements
Similar presentations
Restricted Machines Presented by Muhannad Harrim.
Advertisements

Turing Machines Memory = an infinitely long tape Persistent storage A read/write tape head that can move around the tape Initially, the tape contains only.
CS 345: Chapter 9 Algorithmic Universality and Its Robustness
Variants of Turing machines
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Pages COMPUTABILITY THEORY.
Applied Computer Science II Chapter 3 : Turing Machines Prof. Dr. Luc De Raedt Institut für Informatik Albert-Ludwigs Universität Freiburg Germany.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture11: Variants of Turing Machines Prof. Amos Israeli.
CS 310 – Fall 2006 Pacific University CS310 Turing Machines Section 3.1 November 6, 2006.
1 Lecture 13 Turing machine model of computation –Sequential access memory (tape) –Limited data types and instructions –Graphical representation –Formal.
CS5371 Theory of Computation Lecture 10: Computability Theory I (Turing Machine)
Computability and Complexity 3-1 Turing Machine Computability and Complexity Andrei Bulatov.
1 Lecture 13 Turing machine model of computation –Sequential access memory (tape) –Limited data types and instructions –Formal Definition –Equivalence.
Turing Machines CS 105: Introduction to Computer Science.
Prof. Busch - LSU1 Turing Machines. Prof. Busch - LSU2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Reducibility. 2 Problem is reduced to problem If we can solve problem then we can solve problem.
Theory of Computation. Computation Computation is a general term for any type of information processing that can be represented as an algorithm precisely.
1 Turing Machines. 2 A Turing Machine Tape Read-Write head Control Unit.
Turing Machines A more powerful computation model than a PDA ?
Turing Machines Chapter Plan Turing Machines(TMs) – Alan Turing Church-Turing Thesis – Definitions Computation Configuration Recognizable vs. Decidable.
The Turing machine Olena Lastivka. Definition Turing machine is a theoretical device that manipulates symbols on a strip of tape according to a table.
Theory of Computing Lecture 15 MAS 714 Hartmut Klauck.
CSCI 2670 Introduction to Theory of Computing September 28, 2005.
 Computability Theory Turing Machines Professor MSc. Ivan A. Escobar
Introduction to CS Theory Lecture 15 –Turing Machines Piotr Faliszewski
1 Turing Machines There are languages that are not context-free. What can we say about the most powerful automata and the limits of computation?. Alan.
Lecture # 28 Theory Of Automata By Dr. MM Alam 1.
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Part 1 – Pages COMPUTABILITY THEORY.
©Brooks/Cole, 2003 Chapter 17 Theory of Computation.
Computer Science 101 Theory of Computing. Computer Science is... The study of algorithms, with respect to –their formal properties –their linguistic realizations.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
TM Design Macro Language D and SD MA/CSSE 474 Theory of Computation.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
Computer Theory Michael J. Watts
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich
Lecture 17 Undecidability Topics:  TM variations  Undecidability June 25, 2015 CSCE 355 Foundations of Computation.
1 Section 13.1 Turing Machines A Turing machine (TM) is a simple computer that has an infinite amount of storage in the form of cells on an infinite tape.
1 Turing Machines and Equivalent Models Section 13.1 Turing Machines.
Overview of the theory of computation Episode 3 0 Turing machines The traditional concepts of computability, decidability and recursive enumerability.
1 Course Overview Why this course “formal languages and automata theory?” What do computers really do? What are the practical benefits/application of formal.
1 Turing Machines - Chap 8 Turing Machines Recursive and Recursively Enumerable Languages.
Lecture 16b Turing Machines Topics: Closure Properties of Context Free Languages Cocke-Younger-Kasimi Parsing Algorithm June 23, 2015 CSCE 355 Foundations.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples,
1 Introduction to Turing Machines
Theory of Computation Foundations of Computer Science  Cengage Learning.
1 Chapter 9 Undecidability  Turing Machines Coded as Binary Strings  Universal Turing machine  Diagonalizing over Turing Machines  Problems as Languages.
CS 154 Formal Languages and Computability April 12 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
1 8.4 Extensions to the Basic TM Extended TM’s to be studied: Multitape Turing machine Nondeterministic Turing machine The above extensions make no increase.
Chapter 9 Turing Machines What would happen if we change the stack in Pushdown Automata into some other storage device? Truing Machines, which maintains.
Turing Machines CS 130 Theory of Computation HMU Textbook: Chap 8.
Theory of Automata By:Imran ul haq:2424 Zeshan Ali:2416 Ali Usman:2436 Sakhawat Ali:2411 Mudassar Salfi:2427.
Theory of Computation Automata Theory Dr. Ayman Srour.
Universal Turing Machine
Fall 2013 Lecture 27: Turing machines and decidability CSE 311: Foundations of Computing.
CSE202: Introduction to Formal Languages and Automata Theory
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
Numerical Representation of Strings
Turing Machines Acceptors; Enumerators
Chapter 9 TURING MACHINES.
Chapter 3: The CHURCH-Turing thesis
فصل سوم The Church-Turing Thesis
Theory of Computation Turing Machines.
COSC 3340: Introduction to Theory of Computation
Recall last lecture and Nondeterministic TMs
P.V.G’s College of Engineering, Nashik
Subject Name: FORMAL LANGUAGES AND AUTOMATA THEORY
Hopcroft, Motawi, Ullman, Chap 8
Teori Bahasa dan Automata Lecture 6: Regular Expression
Turing Machines Everything is an Integer
Presentation transcript:

Simulating a modern computer by a Turing machine and vice versa CS 6800 Instructor: Dr. Elise de Doncker By Shweta Gowda Saikiran Ponnam

Outline Introduction. Components of Turing Machine. Simulating Computer by Turing Machine. Simulating Turing Machine by Computer. Examples. References.

Introduction The Turing machine was introduced in 1936 by Alan M. Turing to solve computable problems, and is the foundation of modern computers. Let us compare TM and the modern computer While both if this model appear to be different but they can accept exactly the same language - the “recursive enumerable languages”.

Components of Turing machine 1.A Tape 2.Controller 3.Read/Write Head

Continue… Tape The tape, at any one time, holds a sequence of characters from the set of characters accepted by the machine. Here we assume that the machine can accept only two symbols a) blank b) digit1.

Continue… Read/Write Head The read/write head reads and writes one symbol at a time from the tape and accordingly moves to right or left based on the design on the Turing machine Controller The controller is the theoretical counterpart of the central processing unit (CPU) in modern computers. It is a finite state automaton i.e., with finite number of states.

Simulating computer by Turing machine Example (1): Increment Operation[ incr(x) ]

Continue… Step by step operation which shows how the TM can increment x when x=2

Continue… Example (2): Decrement Operation[ decr(x) ]

Continue… Step by step operation which shows how the TM can decrement x when x=2

Simulating Turing machine by computer Simulation of the Turing Machine on a Digital Computer is a useful and practical tool not only for problem solving and validation of algorithms but also in the field of programming. TM are as powerful as the most sophisticated real- world programming languages. which is great, because formally proving any thing about C, java would be difficult Here we describe simple Turing machine examples…

Example (1): The Identify Function Let A={0,1} and S={s 0 }. Let M={} be the empty set, the set containing no elements. M is a set of quintuples of the right type with the right requirements. Here M is a TM which computes the identity function, f(n)=n Run M on input n. The tape is initially configured to (s 0,0,”111…1″), where the string contains n 1’s.

Continue… Step1: Tape reader looks for which instruction to use as no instruction are found because there is no instruction given go to step 2 Step2: Immediately, the machine halts, which changing the tape at all. Result: Therefore, the output is identical to the input, and on input n, n is outputted.

Example2: Increment Operation [ f(n)=n+1 ] Here, we build a machine which takes input n and outputs n+1. Strategy : We’ll instruct the tape-head that as long as it sees the symbol 1, it will move to the right, leaving the 1 as it is. This way, the tape-reader will move right until it reaches the first zero. Once the tape-reader reaches the first zero on the tape, it will replace that zero with a 1 and then immediately halt. In this way, the string of n consecutive 1’s originally on the tape will be turned into a string of n+1 consecutive 1’s.

Continue… States: s 0 (initial state)=“haven’t found first zero yet” and s 1 =‘found first zero, ready to halt”. Step1: If the tape-head is in state s 0, i.e., it hasn’t found the first zero yet, and the current cell contains 1, then the reader should move right, leaving the 1 as it is, and staying in the same state. The instruction is represented in the form of quintuple: (s 0,1,1,”R”,s 0 ). Step2: If the tape-head is in state s 0, i.e., still looking for that first zero, and the current cell contains 0, the first zero has been found. In that case, we want to replace the first zero with a 1 and then prepare to halt. So we’ll instruct the reader to write 1, move right, and go to state s 1. Going to state s 1 will be equivalent to halting, provided that we don’t give the machine any instructions in state s 1. Represented as: (s 0,0,1,”R”,s 1 ).

Continue… Step3: We add no other instructions. This ensures that after the machine goes to state s 1 after writing that new “1”, it will immediately halt. Result: The TM which computes the function f(n)=n+1 is the set of quintuples: {(s 0,1,1,”R”,s 0 ), (s 0,0,1,”R”,s 1 )}

Comparison with real machines Anything a real computer can compute, a Turing machine can also compute. Like a Turing machine, a real machine can have its storage space enlarged as needed, by acquiring more disks or other storage media Descriptions of real machine programs using simpler abstract models are often much more complex than descriptions using Turing machines Turing machines simplify the statement of algorithms.

Example 1 Real time example of TM

Continue… Execution and Controls. The Run button starts execution. The Pause button suspends execution. The Run Speed slider changes the execution speed. The Step button executes the next step and pauses. The BackStep button reverses the effect of the previous step. A Turing Machine can be back stepped all the way to its initial state. The Reset button returns the Turing Machine to its initial state. In effect, the definition is reloaded.

Continue… Example 2: HY

References Introduction to Automata Theory, Languages, and Computation by J. E. Hopcroft, (R. Motwani) and J. D. Ullman, Addison Wesley. ( SIMULATION OF A TURING MACHINE ON A DIGJT AL COMPUTER )

Thank You