Turing Machines (TM)

Similar documents
Computability. What can be computed?

Implementation of Recursively Enumerable Languages in Universal Turing Machine

CITS2211 Discrete Structures Turing Machines

of the hypothesis, but it would not lead to a proof. P 1

Tiling Problems. This document supersedes the earlier notes posted about the tiling problem. 1 An Undecidable Problem about Tilings of the Plane

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI

CSCI3390-Lecture 8: Undecidability of a special case of the tiling problem

Automata and Formal Languages - CM0081 Turing Machines

2359 (i.e. 11:59:00 pm) on 4/16/18 via Blackboard

A Learning System for a Computational Science Related Topic

Oracle Turing Machine. Kaixiang Wang

Technical framework of Operating System using Turing Machines

COSE312: Compilers. Lecture 5 Lexical Analysis (4)

CSE 355: Human-aware Robo.cs Introduction to Theoretical Computer Science

Enhanced Turing Machines

CDT314 FABER Formal Languages, Automata and Models of Computation MARK BURGIN INDUCTIVE TURING MACHINES

Sequential program, state machine, Concurrent process models

10.2. Scanning Document Camera Scoring. Page 1 of 5. How do I score answer sheets using a document camera? STEP 1

Membrane Computing as Multi Turing Machines

The Tiling Problem. Nikhil Gopalkrishnan. December 08, 2008

DVA325 Formal Languages, Automata and Models of Computation (FABER)

Regular Expressions and Regular Languages. BBM Automata Theory and Formal Languages 1

Ex Existing Ground Cross Sections

Basic Science for Software Developers

SRM UNIVERSITY FACULTY OF ENGINEERING AND TECHNOLOGY

1 Running the Program

THE ENUMERATION OF PERMUTATIONS SORTABLE BY POP STACKS IN PARALLEL

CHATS Meals On Wheels Online Ordering User Guide

You could identify a point on the graph of a function as (x,y) or (x, f(x)). You may have only one function value for each x number.

Lecture 20 November 13, 2014

Online Check-in Information for 2018 Sunnyvale Alliance Medina Fall Classic

Wine Bottle Carrier. Skill Level: Intermediate. Created by: Diane Kron, Product Development Specialist

A Definition of Artificial Intelligence

NCSS Statistical Software

Getting Started. Spectra Acquisition Tutorial

Scientific Imaging Image Analysis worksheet Page 1 of 8. Image Analysis

2. Creating and using tiles in Cyberboard

Example Application C H A P T E R 4. Contents

Reflector A Dynamic Manifestation of Turing Machines with Time and Space Complexity Analysis

1.1 Displaying Distributions with Graphs, Continued

Online Banking Guide for Commercial Customers

Tinker Tuesday Project - Drinking Glasses

The topic for the third and final major portion of the course is Probability. We will aim to make sense of statements such as the following:

DWG Register User Guide October Adding Drawings... 2 Statuses... 2 Archive... 4 Change Requests... 5 Transmittals... 5 Admin...

Halting Problem. Implement HALT? Today. Halt does not exist. Halt and Turing. Another view of proof: diagonalization. P - program I - input.

Introduction To Automata Theory Languages And Computation Addison Wesley Series In Computer Science

Advanced Automata Theory 4 Games

Batch Counting of Foci

Working With Drawing Views-I

Class #7: Experiment L & C Circuits: Filters and Energy Revisited

HANDBOOK ON INDUSTRIAL PROPERTY INFORMATION AND DOCUMENTATION. Ref.: Standards ST.33 page: STANDARD ST.33

How to create a 24 Bit Bitmap Image for use with the Digital Light Wand in Photoshop (CS4)

Generations Automatic Stand-Alone Lace By Bernie Griffith Generations Software

Advising Appointment Scheduler

Grid Assembly. User guide. A plugin developed for microscopy non-overlapping images stitching, for the public-domain image analysis package ImageJ

Setup and Walk Through Guide Orion for Clubs Orion at Home

Chord Track Explained

Catholic Diocese of Salt Lake City

Prasanth. Lathe Machining

Technical Note How to Compensate Lateral Chromatic Aberration

One computer theorist s view of cognitive systems

ScriptPro Menu Script Overview

Game Theory. Lecture Notes By Y. Narahari. Department of Computer Science and Automation Indian Institute of Science Bangalore, India August 2012

Introduction to Filters

Fire CR Calibration Guide

Online Banking Guide for Commercial Customers

ScanArray Overview. Principle of Operation. Instrument Components

Welcome to the Sudoku and Kakuro Help File.

You can easily print images using the Capture NX print function. Here we will explain the process for printing

CHAPTER 18 DOCUMENT IMAGING MODULE 18.0 OVERVIEW 18.1 REQUIREMENTS AND INSTALLATION Special Requirements Mapping Network Drive

Undecidability and Nonperiodicity for Tilings of the Plane

Christmas Table Mat Using Letters

Digital Image Processing Labs DENOISING IMAGES

Recovering highlight detail in over exposed NEF images

International Journal of Computer Sciences and Engineering. Research Paper Volume-5, Issue-5 E-ISSN:

The next several lectures will be concerned with probability theory. We will aim to make sense of statements such as the following:

CHAPTER 15. Cross Section Sheets. None, except batch processing of an input file.

Extending the Dynamic Range of Film

On the Power of Interactive Computing

NOVA also supports multiple BA modules. Please refer to the MultiBA tutorial for more information. 2

Introduction to Layers

Basic Radio Settings on the WAP371

Tinker Tuesday Project - Stainless Steel Tumblers

MicroLab 500-series Getting Started

Geometer s Sketchpad Version 4

Tinker Tuesday Project - Pumpkin Carving

Tile Number and Space-Efficient Knot Mosaics

MESA Cyber Robot Challenge: Robot Controller Guide

GIMP Layers. Creating a Blank Image

Permutation Groups. Definition and Notation

Kurzweil Adaptive Technology Lab - FAQs.

The Basic RAW Image Processing Workflow In PSE 2018

LESSONS Lesson 1. Microcontrollers and SBCs. The Big Idea: Lesson 1: Microcontrollers and SBCs. Background: What, precisely, is computer science?

Computer Science 1001.py. Lecture 25 : Intro to Error Correction and Detection Codes

MEDIA CONVERSION PROJECT: DIGITIZING HISTORIC PHOTOS

Wire Terms and Features

Problem F. Chessboard Coloring

PROFESSIONAL DIGITAL TWO-WAY RADIO SYSTEM MOTOTRBO DP 3600/DP 3601 DISPLAY PORTABLE QUICK REFERENCE GUIDE

You should see the following screen when you first login to Student E-Service

Batch Processing Converting images in a folder to JPEG

Transcription:

1 Introduction Turing Machines (TM) Jay Bagga A Turing Machine (TM) is a powerful model which represents a general purpose computer. The Church-Turing thesis states that our intuitive notion of algorithms is equivalent to TM algorithms. In this module, we discuss the concept of a TM through an example and use JFLAP to simulate and test the TM. A TM can be defined in terms of its components in a manner similar to DFA, NFA and PDA etc. Informally, a one-tape TM consists of a single infinite tape that is divided into cells. Each cell can contain a symbol. A read-write head can scan the tape one cell at a time by moving to the right or left (or staying on a cell). There are also variations of TMs with several tapes and heads. In this module we restrict our discussion to a TM with a single tape and single head. Initially the cells are all blanks and an input string is placed on contiguous cells. The tape head then scans the input and moves according to the TM s transition function. If the TM reaches an accept state the input is accepted. Otherwise a TM may reject an input string or may never halt. 2 An example TM A TM can also be described by a state-transition diagram. Look at such a diagram of a TM below. We shall use JFLAP to test this TM with several inputs. We observe that this TM has nine states q0 through q8, with q0 as the initial state and q8 as the final state. Initially the tape head is at the leftmost symbol of the input. A transition such as q0 a;x,r q1 is interpreted as follows: If the TM is in state q0 and the tape head reads a in the current cell, then it writes x in that cell and moves one cell to the right (R). The little square symbols in the transition from q7 to q8 denote the special blank symbol. Question 1. 1. Load the TM in the file TMv7.jff. 2. For each transition in this TM describe in words what the transition means. 1

For the alphabet Σ = {a, b, $}, let us now consider the language L = {w$w w {a, b} }. Thus L is the set of words that have any string of a s and b s followed by one $ sign followed by the same string. For example, ab$ab, aaa$aaa, and $ are words in L, while ab$aa, aba and $$ are not in L. We want to construct a TM that accepts precisely the words in L. A standard method of building a TM is to use the Church-Turing thesis. Thus, we first describe an intuitive algorithm for recognizing words in L, and then we build a TM for this algorithm. Our intuitive algorithm is stated in terms of reading an input on a tape. So to recognize that an input is of the form w$w, we look at the leftmost character of the first w and try to match it with the first symbol to the right $. We then repeat this process for each symbol in w. To keep track of what symbols have already been read, we replace a symbol (a or b) with an x as soon as it is read for the next match. Thus the tape head zig-zags between the symbols to the left of the $ sign and to the right of the $ sign, matching them one at a time. If a match fails at any step, the input is rejected. We now show that the TM shown above implements this algorithm. For example, starting at the initial state q0, if an a is read, it is replaced by an x and the TM moves to the state q1. Now we are looking to match the a just read to an a to the right of the $ sign. We stay in q1 as we read through the other a s and b s. Once we reach the $ sign, the TM moves to the state q2. We move though the x s and look for an a. If at any time this match does not occur, the TM halts in a non-accept state and the input is not accepted. If an a is found, the TM moves left through all the symbols until it finds the $ sign and then keeps moving left until it is back to q0, at which point the TM repeats the process, taking a path toward q3 if a b is read. If all the a s and b s are matched and the TM returns to q0, it then moves right through the q7 and reads only x s to reach the accept state. You will now simulate this TM in JFLAP and test it for several inputs. 2

Question 2. 1. Load the TM in the file TMv7.jff. This is the same TM as shown above. 2. Study the path q0 q1 q2 q5 q6 q0 and the transitions along this path. Explain the actions of the TM along this path. 3. Repeat the above step for the path q0 q3 q4 q5 q6 q0. 4. Choose Input from the menu and click on Step... Enter the input abb$abb and click OK. Verify that the you have the window as shown below. At this stage the initial state q0 is highlighted. In the lower left corner, you see the current state, the tape and the current cell highlighted. See the diagram below. 5. Click on the button Step in the lower left corner. Describe the changes you see on the tape and the current state. Explain those changes. Continue to step through until the state in again at q0. Compare this with you answer in part 2. above. The diagram below shows an intermediate step. 3

6. Continue to step through until you see the state q8 highlighted and the lower left portion of the window is green. See the diagram below. Is the input accepted? 4

7. Repeat the above steps with a new input: abb$aba. See the diagram below. Is this input accepted? Why or why not? What happens after the TM reaches q4? Question 3. 1. You will now test the TM with multiple inputs. 5

2. Load the TM in the file TMv7.jff. 3. Choose Input in the menu and click on Multiple Run. See the diagram above. Enter inputs as shown in the diagram. Explain why each input is accepted or rejected. Enter four more different inputs, two of which should be accepted and two rejected. 4. If q7 is also made an accept state, how would it change the language of words that are accepted by the modified TM? Explain your answer. Test your answer with several inputs in JFLAP. 3 References 1. Introduction to the Theory of Computation (Third Edition), Michael Sipser. Cengage Learning. 2013. 2. JFLAP - An Interactive Formal Languages and Automata Package, Susan H. Rodger and Thomas W Finley. Jones and Bartlett Publishers. 2006 6