0% found this document useful (0 votes)
13 views

Turing Machines 1

Uploaded by

kavya.jagtap04
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Turing Machines 1

Uploaded by

kavya.jagtap04
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

Turing Machines-

Introduction
-- Sakshi Surve
TM consists of ….
A head which can read or write a symbol or
move to Left or Right or may stay in the same
position.

An infinite tape on which the symbols can be


written.

Finite set of symbols

Finite set of states in one of which the


machine can reside at a time.
A Turing Machine :
Tape

...... ......

Read-Write head

Control Unit
A Turing Machine (TM) has finite-state control (like PDA), and an
infinite read-write tape.

• The tape serves as both input and unbounded storage device.

• The tape is divided into cells, and each cell holds one symbol
from the tape alphabet.

• There is a special blank symbol B.

• At any instant, all but finitely many cells hold B….and the
input string has B to its both sides

• Tape head sees only one cell at any instant.

• The contents of this cell and the current state determine the
next move of the TM.
The Input String :
Input string Blank symbol

...... ......
B B a b a c B B B

head

ead starts at the leftmost position of the input string


The Tape :
No boundaries -- infinite length

...... ......

Read-Write head

The head moves Left or Right or stays at the same position


...... ......

Read-Write head

he head at each transition (time step):

1. Reads a symbol
2. Writes a symbol
3. Moves Left or Right or stays at same place
Example: Time 0

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

q0
Time 1

...... ......
a b k c
1. Reads a
q0
2. Writes k
( q 0, k , L )

3. Moves Left
Time 1
...... ......
a b k c

q0

Time 2
...... ......
a O k c

1. Reads b q1

2. Writes O
( q1, k , R )

3. Moves Right
A Turing Machine performs following three
actions before the next interval begins :

Square being read is erased and is replaced by


another symbol

The internal state is changed

The head moves one square left, right or stays


at the same position
This can be summarized in a string of the form
(q0 , a)  (q1 , b , L)
Where,
q0 = Current state
a = Input symbol read in q0
q1 = Next state
b = symbol ‘a’ has to be replaced with
L = The direction of movement of the
tape head
Representation of a Turing Machine :

You might also like