A Universal Machine A universal Turing machine is

  • Slides: 15
Download presentation
A Universal Machine A universal Turing machine is designed to simulate the computations of

A Universal Machine A universal Turing machine is designed to simulate the computations of an arbitrary Turing machine M. M halts with w R(M)w Universal machine U Accept 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 M halts with w R(M)w Universal machine U Accept Loop M

A Universal Machine M halts with w R(M)w Universal machine U Accept Loop M does not halt with input w If M halts and accepts input w ===> U halts and accepts input W too If M does not halt with W ===> Neither does U.

Turing Machine Example with Halts 0/0 L q 0 B/B R q 1 1/1

Turing Machine Example with Halts 0/0 L q 0 B/B R q 1 1/1 R q 2 1/1 L Run JFLAP

Transition Function en(qi)0 en(x)0 en(qj)0 en(y)0 en(d) Input alphabet {0, 1}, x and y

Transition Function en(qi)0 en(x)0 en(qj)0 en(y)0 en(d) Input alphabet {0, 1}, x and y belongs to {0, 1, B} tape alphabet {0, 1, B} states q 0, q 1 …. move to left (L) or right (R)

Symbol -- Encoding Input alphabet {0, 1} 0 1 1 11 tape alphabet {0,

Symbol -- Encoding Input alphabet {0, 1} 0 1 1 11 tape alphabet {0, 1, B} B 111 q 0 1 q 1 11 states q 0, q 1 …. … qn 1 n+1 L 1 R 11

Universal Machine Example 0/0 L q 0 B/B R q 1 1/1 R q

Universal Machine Example 0/0 L q 0 B/B R q 1 1/1 R q 2 1/1 L 000101110110011010100…. 000

Three-tape Deterministic Universal Machine 000101110110011010100…. 000 tape 1: 0001011101. . .

Three-tape Deterministic Universal Machine 000101110110011010100…. 000 tape 1: 0001011101. . .

Three-tape Deterministic Universal Machine 000101110110011010100…. 000 tape 1: 0001011101. . . tape 2: 1

Three-tape Deterministic Universal Machine 000101110110011010100…. 000 tape 1: 0001011101. . . tape 2: 1 B Put q 0 as the start state current / updated state

Three-tape Deterministic Universal Machine 000101110110011010100…. 000 tape 1: 0001011101. . . tape 2: 1

Three-tape Deterministic Universal Machine 000101110110011010100…. 000 tape 1: 0001011101. . . tape 2: 1 tape 3: current / updated state B B 1 0 1 1 B string w

Three-tape Deterministic Universal Machine 000101110110011010100…. 000 tape 1: 0001011101. . . tape 2: 1

Three-tape Deterministic Universal Machine 000101110110011010100…. 000 tape 1: 0001011101. . . tape 2: 1 tape 3: current / updated state B B 1 0 1 1 B string w

Three-tape Deterministic Universal Machine 000101110110011010100…. 000 tape 1: 0 0 0 1 1 1

Three-tape Deterministic Universal Machine 000101110110011010100…. 000 tape 1: 0 0 0 1 1 1 0 0 tape 2: 1 tape 3: 1 B B 1 0 current / updated state 1 1 B string w

Three-tape Deterministic Universal Machine 000101110110011010100…. 000 tape 1: . . . 11011011. . tape

Three-tape Deterministic Universal Machine 000101110110011010100…. 000 tape 1: . . . 11011011. . tape 2: 1 1 B tape 3: B 1 0 current / updated state 1 1 B string w

Three-tape Deterministic Universal Machine 000101110110011010100…. 000 tape 1: . . . 11011011. . tape

Three-tape Deterministic Universal Machine 000101110110011010100…. 000 tape 1: . . . 11011011. . tape 2: 1 1 1 B tape 3: B 1 0 1 current / updated state 1 B string w

Three-tape Deterministic Universal Machine 000101110110011010100…. 000 tape 1: . . . 11011011. . tape

Three-tape Deterministic Universal Machine 000101110110011010100…. 000 tape 1: . . . 11011011. . tape 2: 1 1 1 B tape 3: B 1 0 1 current / updated state 1 B string w U halts accepting the input if there is no such transition!!

CSE 355 An Introduction to the Theory of Computer Science Good luck your finals

CSE 355 An Introduction to the Theory of Computer Science Good luck your finals & Enjoy your Winter break …