Introduction to Turing Machines

Slides:



Advertisements
Similar presentations
1 Radio Maria World. 2 Postazioni Transmitter locations.
Advertisements

EcoTherm Plus WGB-K 20 E 4,5 – 20 kW.
Números.
Trend for Precision Soil Testing % Zone or Grid Samples Tested compared to Total Samples.
Trend for Precision Soil Testing % Zone or Grid Samples Tested compared to Total Samples.
AGVISE Laboratories %Zone or Grid Samples – Northwood laboratory
Trend for Precision Soil Testing % Zone or Grid Samples Tested compared to Total Samples.
Variations of the Turing Machine
PDAs Accept Context-Free Languages
ALAK ROY. Assistant Professor Dept. of CSE NIT Agartala
/ /17 32/ / /
Reflection nurulquran.com.
EuroCondens SGB E.
Worksheets.
Sequential Logic Design
Addition and Subtraction Equations
By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman
1 When you see… Find the zeros You think…. 2 To find the zeros...
Western Public Lands Grazing: The Real Costs Explore, enjoy and protect the planet Forest Guardians Jonathan Proctor.
Add Governors Discretionary (1G) Grants Chapter 6.
CALENDAR.
CHAPTER 18 The Ankle and Lower Leg
Summative Math Test Algebra (28%) Geometry (29%)
Introduction to Turing Machines
ASCII stands for American Standard Code for Information Interchange
The 5S numbers game..
突破信息检索壁垒 -SciFinder Scholar 介绍
A Fractional Order (Proportional and Derivative) Motion Controller Design for A Class of Second-order Systems Center for Self-Organizing Intelligent.
The basics for simulations
Turing Machines.
MM4A6c: Apply the law of sines and the law of cosines.
Figure 3–1 Standard logic symbols for the inverter (ANSI/IEEE Std
Dynamic Access Control the file server, reimagined Presented by Mark on twitter 1 contents copyright 2013 Mark Minasi.
TCCI Barometer March “Establishing a reliable tool for monitoring the financial, business and social activity in the Prefecture of Thessaloniki”
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
Progressive Aerobic Cardiovascular Endurance Run
MaK_Full ahead loaded 1 Alarm Page Directory (F11)
When you see… Find the zeros You think….
2011 WINNISQUAM COMMUNITY SURVEY YOUTH RISK BEHAVIOR GRADES 9-12 STUDENTS=1021.
Before Between After.
2011 FRANKLIN COMMUNITY SURVEY YOUTH RISK BEHAVIOR GRADES 9-12 STUDENTS=332.
ST/PRM3-EU | | © Robert Bosch GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying.
Foundation Stage Results CLL (6 or above) 79% 73.5%79.4%86.5% M (6 or above) 91%99%97%99% PSE (6 or above) 96%84%100%91.2%97.3% CLL.
Subtraction: Adding UP
Numeracy Resources for KS2
1 Non Deterministic Automata. 2 Alphabet = Nondeterministic Finite Accepter (NFA)
Static Equilibrium; Elasticity and Fracture
Converting a Fraction to %
Resistência dos Materiais, 5ª ed.
Lial/Hungerford/Holcomb/Mullins: Mathematics with Applications 11e Finite Mathematics with Applications 11e Copyright ©2015 Pearson Education, Inc. All.
UNDERSTANDING THE ISSUES. 22 HILLSBOROUGH IS A REALLY BIG COUNTY.
Chart Deception Main Source: How to Lie with Charts, by Gerald E. Jones Dr. Michael R. Hyman, NMSU.
1 Non Deterministic Automata. 2 Alphabet = Nondeterministic Finite Accepter (NFA)
Introduction Embedded Universal Tools and Online Features 2.
úkol = A 77 B 72 C 67 D = A 77 B 72 C 67 D 79.
Schutzvermerk nach DIN 34 beachten 05/04/15 Seite 1 Training EPAM and CANopen Basic Solution: Password * * Level 1 Level 2 * Level 3 Password2 IP-Adr.
Fall 2004COMP 3351 Turing Machines. Fall 2004COMP 3352 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Courtesy Costas Busch - RPI1 Turing Machines. Courtesy Costas Busch - RPI2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Computing Functions with Turing Machines. 2 A function Domain: Result Region: has:
Costas Busch - RPI1 Turing Machines. Costas Busch - RPI2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.
1 Introduction to Turing Machines
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
Turing Machines 2nd 2017 Lecture 9.
Computing Functions with Turing Machines
Presentation transcript:

Introduction to Turing Machines 1 1 1 1 1 1 1 1 1 1 1 1 1

Alan Turing -- 1912 – 1954 Mathematician, a computer scientis Influantial Development of computer sciences provided an influential formalisation of the concept of the algorithm and computation with the Turing Machine Turing Test contribute to the debate of AI Can machines think? One of the 100 more imp. People in 20th century 21st on BBC nation wide poll of the 100 Greatest britons http://www.turing.org.uk/turing/ http://en.wikipedia.org/wiki/Alan_Turing/

The Turing Machine A TM consists of an infinite length tape, on which 1 1 1 1 1 1 1 1 1 1 1 1 1 1 A TM consists of an infinite length tape, on which input is provided as a finite sequence of symbols. A head reads the input tape. The TM starts at start state s0. On reading an input symbol it optionally replaces it with another symbol, changes its internal state and moves one cell to the right or left. In the above diagram, TM states are depicted by different colours. So, when the head moves, its colour also changes indicating that it has changed its internal state.

The Turing Machine A TM is defined as: TM = <S, T, s0, d, H> where, S is a set of TM states T is a set of tape symbols s0 is the start state H  S is a set of halting states d : S x T S x T x {L,R} is the transition function A TM begins computation at state s0. At each computational step, it reads the present tape symbol, changes its internal state, optionally writes another symbol onto tape, and moves one cell to the left or right in the tape. The TM halts computation (and accepts the input string) when it reaches one of the halt states in H.

A Turing Machine Tape ...... ...... Read-Write head Control Unit

The Tape No boundaries -- infinite length ...... ...... Read-Write head The head moves Left or Right

...... ...... Read-Write head The head at each time step: 1. Reads a symbol 2. Writes a symbol 3. Moves Left or Right

Example: Time 0 ...... ...... Time 1 ...... d 1. Reads 2. Writes d 3. Moves Left

Time 1 ...... ...... b s Time 2 ...... ...... f s b 1. Reads 2. Writes f 3. Moves Right

The Input String Input string Blank symbol ...... ...... # # # # # head Head starts at the leftmost position of the input string. The input string is never empty

States & Transitions Write Read Move Left Move Right

R d a , ® Example: Time 1 ...... ...... a current state Time 2 ......

Example: Time 1 ...... ...... a Time 2 ...... ...... b

L g , ® # Example: Time 1 ...... ...... Time 2 ...... ...... # # # # #

Determinism Not Allowed Turing Machines are deterministic Allowed No lambda transitions allowed

Partial Transition Function Example: # ...... Allowed: No transition for input symbol

Halting The machine halts if there are no possible transitions to follow ...... ...... # # # # # No possible transition HALT!!!

Final States Not Allowed Allowed Final states have no outgoing transitions In a final state the machine halts

Acceptance If machine halts Accept Input in a final state in a non-final state or If machine enters an infinite loop Reject Input

Turing Machine Example A Turing machine that accepts the language:

Time 0

Time 1

Time 2

Time 3

Time 4 Halt & Accept

Rejection Example Time 0

Time 1 No possible Transition Halt & Reject

Infinite Loop Example A Turing machine for language

Time 0

Time 1

Time 2

Time 2 Time 3 Infinite loop Time 4 Time 5

Because of the infinite loop: The final state cannot be reached The machine never halts The input is not accepted

Another Turing Machine Example Turing machine for the language

Time 0

Time 1

Time 2

Time 3

Time 4

Time 5

Time 6

Time 7

Time 8

Time 9

Time 10

Time 11

Time 12

Time 13 Halt & Accept

Observation: If we modify the machine for the language we can easily construct a machine for the language

Formal Definitions for Turing Machines

Transition Function

Transition Function

Turing Machine: Input alphabet Tape alphabet States Transition function Final states Initial state blank

Configuration Instantaneous description:

Time 4 Time 5 A Move:

Time 4 Time 5 Time 6 Time 7

Equivalent notation:

Initial configuration: Input string

The Accepted Language For any Turing Machine Initial state Final state

Standard Turing Machine The machine we described is the standard: Deterministic Infinite tape in both directions Tape is the input/output file

Computing Functions with Turing Machines

A function has: Result Region: Domain:

A function may have many parameters: Example: Addition function

Integer Domain Decimal: 5 Binary: 101 We prefer unary representation: easier to manipulate with Turing machines Unary: 11111

Definition: A function is computable if there is a Turing Machine such that: Initial configuration Final configuration initial state final state For all Domain

In other words: A function is computable if there is a Turing Machine such that: Initial Configuration Final Configuration For all Domain

Example The function is computable are integers Turing Machine: Input string: unary Output string: unary

Start initial state The 0 is the delimiter that separates the two numbers

Start initial state Finish final state

The 0 helps when we use the result for other operations Finish final state

Turing machine for function

Execution Example: Time 0 (2) (2) Final Result

Time 0

Time 1

Time 2

Time 3

Time 4

Time 5

Time 6

Time 7

Time 8

Time 9

Time 10

Time 11

Time 12 HALT & accept

Another Example The function is computable is integer Turing Machine: Input string: unary Output string: unary

Start initial state Finish final state

Turing Machine Pseudocode for Replace every 1 with $ Repeat: Find rightmost $, replace it with 1 Go to right end, insert 1 Until no more $ remain

Turing Machine for

Example Start Finish

Simple TM Examples Turing Machine U+1: Given a string of 1s on a tape (followed by an infinite number of 0s), add one more 1 at the end of the string. #111100000000…….  #1111100000000………. A tape is denoted by #11110000…. Where # is the start of the tape.

Simple TM Examples TM: U+1 d(s0, 1) |-- (s0, 1, R) d(s0, 0) |-- (h, 1, STOP) #s0111100000…..  #1s011100000…..  #11s01100000…..  #111s0100000…..  #1111s000000…..  #11111h0000….. STOP TM computations are illustrated in the form #s11110000… which shows the TM to be in state s, and at the beginning of the tape.

Another Example if The function if is computable

Turing Machine for if if Input: Output: or

Turing Machine Pseudocode: Repeat Match a 1 from with a 1 from Until all of or is matched If a 1 from is not matched erase tape, write 1 else erase tape, write 0

Combining Turing Machines

Block Diagram Turing Machine input output

Example: if if Adder Comparer Eraser

Turing’s Thesis Any mathematical problem solving that can be described by a mechanical procedure (algorithm) can be modeled by a Turing machine. All computers today perform only mechanical problem solving. They are no more expressive than a Turing machine. A philosophical question: Do digital computers today perform only mechanical computations? What about our thinking? Do we think mechanically? Can we reduce our thought processes to an algorithm?

Turing’s Thesis Turing’s thesis is not a “theorem” there is no “proof” for the thesis. The theorem may be refuted by showing at least one task that is performed by a digital computer which cannot be performed by a Turing machine. Many contentions have been made to this end. However, till date there have not been any conclusive evidence to refute Turing’s thesis. Although Turing’s a-machine were the most popular, there are many more machines proposed by Turing. Basically they are meant to be more powerful than a-machines. These include the c-machines (choice machines), o-machines (oracle machines) and u-machines (unorganized machines). However, there have been no conclusive proofs about whether they are more expressive than a-machines.

Conclusions TMs are at a level that is much below the assembly language of any typical microprocessor. So in the practical world, TMs are more useful in what they cannot do rather than in what they can.

Lab2 Write some simpleTuring machine programs QUESTIONS?