turing machine introduction

Post on 16-Jul-2015

128 Views

Category:

Engineering

7 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Turing MachineBY: ARAM RAFEQ GROUP –A-

What is Turing Machine

So what is Turing Machine ?

Is it some physical machine ?

Or some sort of imaginary machine ?

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

A physical Turing Machine

Here I will show you an actual Turing machine

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

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

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

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

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

Structure of Turing Machine

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

The Tape

Finite state

control

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.

Some Examples

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

Solution :

Some Examples

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

number

Solution :

Some Examples

Ex3 : Design a Turing Machine that accepts word form this

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

Solution :

Thanks for your Attention

top related