introduction to turing machine

21
Welcome!! Siraj Munir – CS@DSU

Upload: muhammad-siraj-munir

Post on 14-Apr-2017

363 views

Category:

Education


30 download

TRANSCRIPT

Page 1: Introduction to Turing Machine

Welcome!!

Siraj Munir – CS@DSU

Page 2: Introduction to Turing Machine

Introduction To Turing Machine

Siraj Munir – CS@DSU

Page 3: Introduction to Turing Machine

Tip of The Day

discourager.ignore();

(Courtesy: Syed Hammad Ahmed – CS@DSU)

Page 4: Introduction to Turing Machine

Background

Siraj Munir – CS@DSU

Page 5: Introduction to Turing Machine

Background• Finite Automata accepts regular languages only.

For example: {anbn : n = 0, 1, …} is not regular, but it is context free language.

• Pushdown Automata accepts context-free languages only.For example: {anbncn : w *} is not context-free.

What to do??

Siraj Munir – CS@DSU

Page 6: Introduction to Turing Machine

Turing Machines

Page 7: Introduction to Turing Machine

About:

• Introduced by Alan Turing in 1936.

• A simple mathematical model of a computer.

• Models the computing capability of a computer.

Siraj Munir – CS@DSU

Page 8: Introduction to Turing Machine

Siraj Munir – CS@DSU

a1 a2 ….

Control

head

Tape

Informal Description

The head:• Reads the symbol from the cell it is pointing to, • Either:

• Writes a new symbol in the cell, or• Moves one cell to the left or right.

Page 9: Introduction to Turing Machine

Siraj Munir – CS@DSU

Informal Description (II)

• New cells can be added to the right of the tape as needed (similar to RAM memory)

• These new cells contain the blank symbol, ♢

1q 2qRba ,

............ ca

Time 1

1qcurrent state

Page 10: Introduction to Turing Machine

Siraj Munir – CS@DSU

• Transitions can be described by (Case I):

((s,a),(q;b;R)) If the machine is in state s and the current cell has an a then jump to state q and write b in the current cell and moves head to right.

Formal Description

• Transitions can be described by (Case II):

((s,a),(q;b;L)) If the machine is in state s and the current cell has an a then jump to state q and write b in the current cell and moves head to left.

Page 11: Introduction to Turing Machine

A TM can be formally described as a 7-tuple (Q, X, ∑, δ, q0, ♢, F) where,Q is a finite set of statesX is the tape alphabet∑ is the input alphabetδ is a transition function; δ : Q × X → Q × X × {Left_shift, Right_shift}.q0 is the initial state♢  is the blank symbolF is the set of final states

Formal Definition

Page 12: Introduction to Turing Machine

Siraj Munir – CS@DSU

Comparison with Previous Models

Page 13: Introduction to Turing Machine

Machine Data Structure Deterministic?

Finite Automata N.A Yes

Pushdown Automata

Turing Machine

Siraj Munir – CS@DSU

Page 14: Introduction to Turing Machine

Machine Data Structure Deterministic?

Finite Automata N.A Yes

Pushdown Automata Stack (LIFO) No

Turing Machine

Siraj Munir – CS@DSU

Page 15: Introduction to Turing Machine

Machine Data Structure Deterministic?

Finite Automata N.A Yes

Pushdown Automata Stack (LIFO) No

Turing Machine Infinite Tape Yes

Siraj Munir – CS@DSU

Page 16: Introduction to Turing Machine

Siraj Munir – CS@DSU

Comparison with Previous ModelsDevice Type of Grammar String/Language

Finite Automata Regular an

Page 17: Introduction to Turing Machine

Siraj Munir – CS@DSU

Comparison with Previous ModelsDevice Type of Grammar String/Language

Finite Automata Regular an

Push Down Automata Context Free anbn

Page 18: Introduction to Turing Machine

Siraj Munir – CS@DSU

Comparison with Previous ModelsDevice Type of Grammar String/Language

Finite Automata Regular an

Push Down Automata Context Free anbn

Turing Machine Unrestricted anbncn

Page 19: Introduction to Turing Machine

Siraj Munir – CS@DSU

Questions??

Page 20: Introduction to Turing Machine

Siraj Munir – CS@DSU

Reference:

http://www.slideshare.net/abhishiv77/push-down-automata-vs-turing-machine

http://www.slideshare.net/AyAnKhAn5/turing-machine-34338253

http://www.slideshare.net/dkalita3/turing-machine-bydeep

http://www.slideshare.net/lavishka_anuj/turing-machines-12176328

https://en.wikipedia.org/wiki/Turing_machine

Page 21: Introduction to Turing Machine

Siraj Munir – CS@DSU

Thankyou!