turing machine introduction

15
Turing Machine BY: ARAM RAFEQ GROUP –A-

Upload: aram-rafeq

Post on 16-Jul-2015

126 views

Category:

Engineering


7 download

TRANSCRIPT

Page 1: Turing machine Introduction

Turing MachineBY: ARAM RAFEQ GROUP –A-

Page 2: Turing machine Introduction

What is Turing Machine

So what is Turing Machine ?

Is it some physical machine ?

Or some sort of imaginary machine ?

Page 3: Turing machine Introduction

The answer

The answer is it’s both logical and physical device!!!

The Turing machine can be logical device then we convert it

to physical device one example we can create a TM that

reverse a string

Page 4: Turing machine Introduction

A physical Turing Machine

Here I will show you an actual Turing machine

Page 5: Turing machine Introduction

Lets get started

Every machine have an input and an output between the input and output

there is process

The input to any TM is just a String

The Output is also a string

The process here we will create it according to our need later we will see

how to design it

Page 6: Turing machine Introduction

Our goal ?

Our goal in designing any Turing machine is to implement our idea in term of states and

transitions so we need to know about our recourses but before that

Transitions

State State

Page 7: Turing machine Introduction

Our recourses

The only recourse that we have is long tape its exactly like an array

But how we can use this tape ?

For every game we have set of rules here also just like a game

I tells you , you can use this tape so design this for me

Page 8: Turing machine Introduction

The rules

Here is what you can do with this tape

1- you can read cell by cell

2- you can change the content of the cell

3- you can move to the right or to the left

4- you can use as much as you want from the tape its like infinite storage store

as elements as you wish

Page 9: Turing machine Introduction

You cannot do this

You can not do this things in our game

1- you cannot jump form a cell to a far cell just cells next to each other

2- we will give you set of thing you can use them only as input to our

machine

Page 10: Turing machine Introduction

Structure of Turing Machine

Read/Write headWe can read or write any symbol that we like

The Tape

Finite state

control

Page 11: Turing machine Introduction

Formal Definition of Turing Machine

TM= {Q,┌,b, ∑,δ ,𝑞0,𝐹}

Q : is a finite, non-empty set of states

┌ : is a finite, non-empty set of the tape alphabet/symbols

B : is the blank symbol (the only symbol allowed to occur on the tape infinitely often at

any step during the computation)

∑ : is the set of input symbols

𝑞0 : is the initial state

F : is the set of final or accepting states.δ : called the transition function, where L is left shift, R is right shift.

Page 12: Turing machine Introduction

Some Examples

Ex1 : Design a Turing Machine that multiply a binary number by 2

Solution :

Page 13: Turing machine Introduction

Some Examples

Ex2 : Design a Turing Machine that 2’s complement for a binary

number

Solution :

Page 14: Turing machine Introduction

Some Examples

Ex3 : Design a Turing Machine that accepts word form this

language L (G) = { 1𝑛0𝑧 / n≥1, z ≥0}

Solution :

Page 15: Turing machine Introduction

Thanks for your Attention