Enumerator & Theorem 3.21
Jae Hoon Kim Contents
Theorem 3.21) A language is Turing-recognizable if and only if some enumerator enumerates it
1. What is Turing-recognizable 2. What is enumerator
5. Exercise 3.4 4. Multitape Turing Machine
3. Turing Machine Turing-recognizable
Definition 3.5) Call a language Turing-recognizable if some Turing machine recognizes it Turing- recognizable
recognize Turing Machine Language Enumerator
An enumerator is a Turing machine with an attached printer? Turing Machine
δ(q1, b)=(q2, c, R)
b -> c, R q1 q2
uabv uacv Multitape Turing Machine
Turing Machine
Multitape Turing Machine
δ(q1, d, f, 7)=(q2, x, y, 4, L, R, L)
d, f, 7 -> x, y, 4, L, R, L q1 q2
a b c d a b c x e f g h e y g h 9 8 7 6 9 8 4 6 Exercise 3.4
Give a formal definition of an enumerator. Consider it to be a type of two-tape Turing machine that uses its second tape as the printer. Include a definition of the enumerated language.
- First tape is an ordinary tape in Turing machine - Second tape is a printer - It starts with empty tape - It can only print(write) symbols - When it prints symbol, it moves head to the right Exercise 3.4
δ(q1, d)=(q2, x, r, L) δ(q2, c)=(q3, y, h, L) d -> x, r, L c -> y, h, L q1 q2 q2 q3 a b c d a b c x a b c x a b y x - - - - r - - - r - - - r h - - Theorem 3.21
Theorem 3.21) A language is Turing-recognizable if and only if some enumerator enumerates it
1. A enumerator enumerates a language => The language is Turing-recognizable
2. A language is Turing-recognizable => some enumerator enumerates the language Theorem 3.21 Part 1) A enumerator enumerates a language => The language is Turing-recognizable
1) Construct the Turing machine M by using enumerator E Let E be the given enumerator and M be the Turing machine. M = “On input w: 1. Run E. Every time that E outputs a string, compare it with w 2. If w ever appears in the output of E, accept”
2) Using Definition 3.5 We found the Turing machine which recognizes the language By definition 3.5 the language is Turing-recognizable
Recall Definition 3.5) Call a language Turing-recognizable if some Turing machine recognizes it Theorem 3.21 Part 2) A language is Turing-recognizable => some enumerator enumerates the language
1) Turing machine M A language is Turing-recognizable => There is Turing machine M such that it recognizes the language (Definition 3.5)
2) Construct Enumerator E by using Turing machine M Let E be the enumerator, and s1, s2, s3, … be a list of all possible strings in Σ* E=“Ignore the input. 1. Repeat the following for i=1, 2, 3, … 2. Run M for i steps on each input, s1, s2, …, si 3. If any computations accept, print out the corresponding sj” Theorem 3.21 Part 2) A language is Turing-recognizable => some enumerator enumerates the language for i=1, 2, 3, … Printer for j=1, 2, 3, …, i (i, j) s Run M with sj for i step (3, 2) s2 if M accepts sj, print sj (4, 1) s1 (4, 2) s2 i j s 1 2 3 4 5 6 7 (5, 1) s1 1 s1 A A A A (5, 2) s2 2 s2 A A A A A (5, 3) s3 3 s3 A A A (6, 1) s1 4 s4 5 s5 A A (6, 2) s2 6 s6 … … 7 s7 Question