180 likes | 509 Views
A Universal Machine. 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.
E N D
A Universal Machine 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.
A Universal Machine 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 Turing Machine Example with Halts 0/0 L B/B R 1/1 R 1/1 L Run JFLAP
Transition Function 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)
Symbol -- Encoding 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 Universal Machine Example 00010111011011101100110101010100….00….000
Three-tape Deterministic Universal Machine 00010111011011101100110101010100….00….000 tape 1:
Three-tape Deterministic Universal Machine 00010111011011101100110101010100….00….000 tape 1: current / updated state tape 2: Put q0 as the start state
Three-tape Deterministic Universal Machine 00010111011011101100110101010100….00….000 tape 1: current / updated state tape 2: string w tape 3:
Three-tape Deterministic Universal Machine 00010111011011101100110101010100….00….000 tape 1: current / updated state tape 2: string w tape 3:
Three-tape Deterministic Universal Machine 00010111011011101100110101010100….00….000 tape 1: current / updated state tape 2: string w tape 3:
Three-tape Deterministic Universal Machine 00010111011011101100110101010100….00….000 tape 1: current / updated state tape 2: string w tape 3:
Three-tape Deterministic Universal Machine 00010111011011101100110101010100….00….000 tape 1: current / updated state tape 2: string w tape 3:
Three-tape Deterministic Universal Machine 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!!
CSE355An Introduction to the Theory of Computer Science Good luck your finals & Enjoy your Winter break …