Professional Documents
Culture Documents
Recursively Enumerable and Recursive Languages
Recursively Enumerable and Recursive Languages
Recursively Enumerable and Recursive Languages
Let
w:
then then
w L
w L
M M
Definition: A language is recursive if some Turing machine accepts it and halts on any input string
Let
be a recursive language
w:
then then
w L
w L
M M
We will prove: 1. There is a specific language which is not recursively enumerable (not accepted by any Turing Machine)
Recursively Enumerable
Recursive
{a}
10
{a}
M1, M 2 , M 3 , M 4 ,
11
L( M i ) = {a , a , a }
Alternative representation
a
L( M i )
12
a L ( M1 ) L( M 2 )
L( M 3 )
a 0 0 1 0
a 1 1
13
0 1 0 0
1 0 1 0
1 1
L( M 4 )
L = {a : a L( M i )}
a L ( M1 ) L( M 2 )
L( M 3 )
a 1
a 0 0 1 0
3 4
a 1 1
0 1 0 0
0 1 0
1 1
L( M 4 )
L = {a , a ,}
15
L = {a : a L( M i )} L = {a : a L( M i )}
L
consists of the 0s in the diagonal
16
a L ( M1 ) L( M 2 )
L( M 3 )
a 0 0 1 0
1 2
a 1 1
0 1 0 0
1 0 1 0
1 1
L( M 4 )
L = {a , a ,}
17
Theorem: Language
18
L is recursively enumerable
Mk
L( M k ) = L
19
a L ( M1 ) L( M 2 )
L( M 3 )
a 0 0 1 0
a 1 1
0 1 0 0
1 0 1 0
1 1
L( M 4 )
Question: M k = M1 ?
20
a L ( M1 ) L( M 2 )
L( M 3 )
a 0 0 1 0
a 1 1
0 1 0 0
1 0 1 0
1 1
1 1
L( M 4 )
Answer:
M k M1
a L( M k ) a L ( M1 )
21
a L ( M1 ) L( M 2 )
L( M 3 )
a 0 0 1 0
a 1 1
0 1 0 0
1 0 1 0
1 1
L( M 4 )
Question: M k = M 2 ?
22
a L ( M1 ) L( M 2 )
L( M 3 )
a 0 0 1 0
a 1 1
0 1 0 0
1 0 1 0
1 1
2 2
L( M 4 )
Answer:
Mk M2
a L( M k ) a L( M 2 )
23
a L ( M1 ) L( M 2 )
L( M 3 )
a 0 0 1 0
a 1 1
0 1 0 0
1 0 1 0
1 1
L( M 4 )
Question: M k = M 3 ?
24
a L ( M1 ) L( M 2 )
L( M 3 )
a 0 0 1 0
a 1 1
0 1 0 0
1 0 1 0
1 1
3 3
L( M 4 )
Answer:
Mk M3
a L( M k ) a L( M 3 )
25
Similarly:
Mk Mi
for any
Because either:
a L( M k ) a L( M i )
i
or
a L( M k ) a L( M i )
26
i i
M k cannot exist
End of Proof
27
28
L
Recursively Enumerable
Recursive
29
30
L = {a : a L( M i )}
Is recursively enumerable but not recursive
32
a L ( M1 ) L( M 2 )
L( M 3 )
a 1
a 0 0 1 0
3 4
a 1 1
0 1 0 0
0 1 0
1 1
L( M 4 )
L = {a , a ,}
33
L = {a : a L( M i )}
is recursively enumerable
34
35
w w=a Mi
i
Simulate If
M i on input a
End of Proof
L = {a : a L( M i )}
is not recursive
38
is recursive
Then
L is recursive:
M that accepts L
M M
Therefore:
L is recursive
But we know:
Therefore,
is not recursive
End of Proof
41
L
Recursively Enumerable
L
Recursive
42
43
(strong result)
45
~ M
Accepts
L
46
w w
to output
End of Proof
48
Example:
~ M
b ab bb aaa ......
b ab bb aaa ......
49
50
~ M
Accepts L
51
a b aa ab ba bb aaa aab
52
w to output ignore w
Problem:
If w L machine M
BETTER APPROACH
w1
w2 w1
54
w3
w2 w1
And so on............
55
w1
1 Step in string 2 3
w2
1 2 3
w3
1 2 3
w4
1 2 3
56
If for any string wi machine M halts in a final state then it prints wi on the output
End of Proof
57
58
Proof:
Input Tape
w
Machine that accepts L Enumerator for L
Compare
59
L w
60
We have proven: A language is recursively enumerable if and only if there is an enumeration procedure for it
61