0% found this document useful (0 votes)
34 views38 pages

FAFL-Final-Lecture 33.1 TM INTRODUCTION

The document discusses Turing machines, including their structure with a tape and read/write head, how they work by reading, writing, and moving the head, and provides examples of Turing machines that accept or reject strings. It also discusses how Turing machines can be used to model computable functions.

Uploaded by

shruthi g
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views38 pages

FAFL-Final-Lecture 33.1 TM INTRODUCTION

The document discusses Turing machines, including their structure with a tape and read/write head, how they work by reading, writing, and moving the head, and provides examples of Turing machines that accept or reject strings. It also discusses how Turing machines can be used to model computable functions.

Uploaded by

shruthi g
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 38

Established as per the Section 2(f) of the UGC Act, 1956

Approved by AICTE, COA and BCI, New Delhi

Lecture 33.1
Turing Machine(TM)
S c h o o l o f C o m p u t i n g a n d I n f o r m a t i o n Te c h n o l o g y

D r. P a r t h a s a r a t h y G
P a r t h a s a r a t h y. g @ re v a . e d u . i n

AY:2020-2021
OUTLINE
Recap of Previous Lecture

Topic of the Lecture

Objective and Outcome of Lecture

Lecture Discussion

•TM Introduction
• Understanding Tape storage
• Simple Examples
Deterministic Push Down Automata
Recap of Previous Lecture
RECAP OF PREVIOUS LECTURE

Introduction to Push Down Automata

Course Description
• Push Down Automata to identify the language L={ WCW r |
W={a,b}*} that it accept or reject.

Compare NDPDA and DPDA

• Applications
• Summary
Turing Machine
To p i c o f t h e L e c t u r e
TOPIC OF THE LECTURE

• Introduction
Turing
Machine • Understanding TM
• Abstract Machine
Turing Machine
Objective and Outcome of Lecture
OBJECTIVE AND OUTCOME OF LECTURE

Lecture • Explain the structure and representation of


Objective Turing Machine with example.

Lecture • Make use of structure and representation to


Outcome solve different problems.
TURING MACHINE
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 transition (time step):

1. Reads a symbol
2. Writes a symbol
3. Moves Left or Right
Example:
Time 0
...... ......
a b a c

Time 1
...... ......
a b k c

1. Reads a
2. Writes k
3. Moves Left
Time 1
...... ......
a b k c

Time 2
...... ......
a f k c

1. Reads b
2. Writes f
3. Moves Right
THE INPUT STRING

Input string Blank symbol

...... ......
  a b a c   

head

Head starts at the leftmost position


of the input string
STATES & TRANSITIONS

Read Write
Move Left

q1 a  b, L q2

Move Right

q1 a  b, R q2
Example:

Time 1

...... ......
  a b a c   

q1
current state

q1 a  b, R q2
Example:
Time 1
...... ......
  a b a c   

q1

Time 2
...... ......
  a b b c   

q2

q1 a  b, L q2
HALTING

The machine halts in a state if there is


no transition to follow
Halting Example 1:

...... ......
  a b a c   

q1

q1 No transition from q1
HALT!!!
TURING MACHINE EXAMPLE

Input alphabet   {a , b }

Accepts the language: a*


a  a, R

  , L
q0 q1
Time 0   a a a  

q0

a  a, R

  , L
q0 q1
Time 1   a a a  

q0

a  a, R

  , L
q0 q1
Time 2   a a a  

q0

a  a, R

  , L
q0 q1
Time 3   a a a  

q0

a  a, R

  , L
q0 q1
Time 4   a a a  

q1

a  a, R Halt & Accept

  , L
q0 q1
Rejection Example

Time 0   a b a  

q0

a  a, R

  , L
q0 q1
Time 1   a b a  

q0
No possible Transition
Halt & Reject
a  a, R

  , L
q0 q1
A function may have many parameters:

Example: Addition function

f ( x, y )  x  y
Integer Domain

Decimal: 5

Binary: 101

Unary: 11111

We prefer unary representation:

easier to manipulate with Turing machines


Definition:

A function f is computable if
M
there is a Turing Machine such that:

Initial configuration Final configuration


B w B B f (w) B

q0 qf
initial state accept state

For all w D Domain


Example

The function f ( x, y )  x  y is computable

x, y are integers

Turing Machine:

Input string: x0 y unary

Output string: xy 0 unary


x y

Start B 1 1  1 0 1  1 B

q0
initial state

The 0 is the delimiter that


separates the two numbers
x y

Start B 1 1  1 0 1  1 B

q0 initial state

x y

Finish B 1 1  1 1 0 B

qf final state
Turing machine for function f ( x, y )  x  y

1  1, R 1  1, R 1  1, L

B  B, L
q0 0  1, R q1 q2 1  0, L q3
B→B,R

q4
35
Execution Example: Time 0
x y
x  11 (=2)
B 1 1 0 1 1 B

y  11 (=2) q0

Final Result
x y
B 1 1 1 1 0 B

q4
Block Diagram

Turing
input output
Machine
DISCUSSION
5 MINUTES

TM is Decidable?

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy