- 77 Views
- Uploaded on
- Presentation posted in: General

A Universal Machine

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

A universal Turing machine is designed to simulate the computations of an arbitrary Turing machine M.

Universal machine U

M halts with w

Accept

R(M)w

Loop

M does not halt with input w

R(M) represents a Turing machine M that accepts by halting.W represents the input string.

Universal machine U

M halts with w

Accept

R(M)w

Loop

M does not halt with input w

If M halts and accepts input w ===>U halts and accepts input W tooIf M does not halt with W ===>Neither does U.

q0

q1

q2

0/0 L

B/B R

1/1 R

1/1 L

Run JFLAP

en(qi)0en(x)0en(qj)0en(y)0en(d)

Input alphabet {0,1}, x and y belongs to {0,1,B}tape alphabet {0, 1, B}states q0, q1 ….move to left (L) or right (R)

Input alphabet {0,1}tape alphabet {0, 1, B}states q0, q1 ….

0/0 L

B/B R

1/1 R

q0

q1

q2

1/1 L

00010111011011101100110101010100….00….000

00010111011011101100110101010100….00….000

tape 1:

00010111011011101100110101010100….00….000

tape 1:

current / updated state

tape 2:

Put q0 as the start state

00010111011011101100110101010100….00….000

tape 1:

current / updated state

tape 2:

string w

tape 3:

00010111011011101100110101010100….00….000

tape 1:

current / updated state

tape 2:

string w

tape 3:

00010111011011101100110101010100….00….000

tape 1:

current / updated state

tape 2:

string w

tape 3:

00010111011011101100110101010100….00….000

tape 1:

current / updated state

tape 2:

string w

tape 3:

00010111011011101100110101010100….00….000

tape 1:

current / updated state

tape 2:

string w

tape 3:

00010111011011101100110101010100….00….000

tape 1:

current / updated state

tape 2:

string w

tape 3:

U halts accepting the input if there is no such transition!!

Good luck your finals

&

Enjoy your Winter break …