Docsity

Finite Automata - Turing, Study notes of Theory of Automata

Partial preview of the text

Download Finite Automata - Turing and more Study notes Theory of Automata in PDF only on Docsity!

Turing Machines

The Language Hierarchy

a *

Regular Languages

Context-Free Languages

n n

a b

R

ww

n n n

a b c

ww

a *b *

A Turing Machine

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

Tape

Read-Write head

Control Unit

The Tape

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

Read-Write head

No boundaries -- infinite length

The head moves Left or Right

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

Example:

Time 0

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

Time 1

  1. Reads
  2. Writes

a (^) b a c

a (^) b (^) k c

a

k

  1. Moves Left

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

Time 1

a (^) b (^) k c

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

Time 2

a f k c

  1. Reads
  2. Writes

b

f

  1. Moves Right

...... ......    

Blank symbo

head

a (^) b a c 

Input string

Remark: the input string is never empty

States & Transitions

1

q 2

q

a b,L

Read

Write Move Left

1

q 2

q

a b,R

Move Right

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

Time 1

1

q 2

q

a b,R

...... ......   a^ b (^) b c   

Time 2

1

q

2

q

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

Time 1

1

q 2

q

a b,L

...... ......   a^ b (^) b c   

Time 2

1

q

2

q

Example:

Determinism

1

q

2

a b,R q

Allowed Not^ Allowed

3

q b  d,L

1

q

2

a b,R q

3

q a  d,L

No epsilon transitions allowed

Turing Machines are deterministic

Partial Transition Function

1

q

2

a b,R q

3

q b  d,L

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

1

q

Example:

No transition

for input symbolc

Allowed:

Example:

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

1

q

1

q

2

a b,R q

3

q b  d,L

No possible transition

HALT!!!

Final States

1

q 2

q (^) Allowed

1

q 2

q (^) Not Allowed

  • (^) Final states have no outgoing transitions
  • (^) In a final state the machine halts