Академический Документы
Профессиональный Документы
Культура Документы
Let and
For string if if
w:
then then
w L
w L
Definition: A language is recursive if some Turing machine accepts it and halts on any input string
Let and
For string if if
w:
then then
w L w L
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
. .
12
L( M i ) 0
a
L ( M1 ) L( M 2 )
a
0 0
a 1 1
. . . . .
13
1
0
1
0 0
L( M 3 )
L( M 4 )
1
0
1
0
1 1
L ! {a : a L( M i )}
a
L ( M1 )
a 1
a 0
0
a 1 1
. . . . .
L( M 2 )
L( M 3 ) L( M 4 )
1 0 0
0 1 0
3
1 0
4
1 1
L ! {a , a ,- }
Courtesy Costas Busch - RPI 15
L ! {a : a L( M i )} L ! {a : a L( M i )}
L
consists of the 0s in the diagonal
Courtesy Costas Busch - RPI 16
a
L ( M1 )
a 0
0
a 1 1
. . . . .
1
0
L( M 2 )
L( M 3 ) L( M 4 )
1 0 0
1 0
1
1 0
2
1 1
L ! {a , a ,- }
Courtesy Costas Busch - RPI 17
Theorem: Language
18
L is recursively enumerable
Mk
L( M k ) ! L
Courtesy Costas Busch - RPI 19
a
L ( M1 ) L( M 2 )
a
0 0
a 1 1
. . . . .
0 1
0 0
1
0
L( M 3 )
L( M 4 )
1
0
1
0
1 1
Question: M k ! M1 ?
Courtesy Costas Busch - RPI 20
a
L ( M1 ) L( M 2 )
a
0 0
a 1 1
. . . . .
0 1
0 0
1
0
L( M 3 )
L( M 4 )
Answer:
1
0
1
0
1 1
1 1
M k { M1
a L( M k ) a L ( M1 )
21
a
L ( M1 ) L( M 2 )
a
0 0
a 1 1
. . . . .
0 1
0 0
1
0
L( M 3 )
L( M 4 )
1
0
1
0
1 1
Question: M k ! M 2 ?
Courtesy Costas Busch - RPI 22
a
L ( M1 ) L( M 2 )
a
0 0
a 1 1
. . . . .
0 1
0 0
1
0
L( M 3 )
L( M 4 )
Answer:
1
0
1
0
2 2
1 1
Mk { M2
a L( M k ) a L( M 2 )
23
a
L ( M1 ) L( M 2 )
a
0 0
a 1 1
. . . . .
0 1
0 0
1
0
L( M 3 )
L( M 4 )
1
0
1
0
1 1
Question: M k ! M 3 ?
Courtesy Costas Busch - RPI 24
a
L ( M1 ) L( M 2 )
a
0 0
a 1 1
. . . . .
0 1
0 0
1
0
L( M 3 )
L( M 4 )
Answer:
1
0
1
0
3 3
1 1
M k { 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 )
i
26
M k cannot exist
End of Proof
Courtesy Costas Busch - RPI 27
28
L
Recursively Enumerable
Recursive
29
30
L ! {a : a L( M i )}
Is recursively enumerable but not recursive
32
a
L ( M1 )
a 1
a 0
0
a 1 1
. . . . .
L( M 2 )
L( M 3 ) L( M 4 )
1 0 0
0 1 0
3
1 0
4
1 1
L ! {a , a ,- }
Courtesy Costas Busch - RPI 33
L ! {a : a L( M i )}
is recursively enumerable
34
35
w
i
Simulate If
M i on input a
End of Proof
Courtesy Costas Busch - RPI
L ! {a : a L( M i )}
is not recursive
38
L is recursive
Then
Therefore:
L is recursive
But we know:
Therefore,
is not recursive
End of Proof
Courtesy Costas Busch - RPI 41
L
Recursively Enumerable
L
Recursive
42
43
We will prove:
(weak result)
(strong result)
45
~ M
Accepts
L
46
w to output w
End of Proof
Courtesy Costas Busch - RPI 48
Example:
~ M
b ab bb aaa ......
Courtesy Costas Busch - RPI
b ab bb aaa ......
49
50
~ M
Accepts L
51
a b aa ab ba bb aaa aab
Courtesy Costas Busch - RPI 52
w to output w
Problem: If w L machine M
BETTER APPROACH
~ Generates first string w M 1 M executes first step on w1 ~ Generates second string w M 2 M executes first step on w2
second step on
Courtesy Costas Busch - RPI
w1
54
w2 w1
55
w1
1 Step in string 2 3
w2
1 2 3
w3
1 2 3
w4
1 2 3
.
Courtesy Costas Busch - RPI 56
If for any string wi machine M halts in a final state then it prints wi on the output
End of Proof
Courtesy Costas Busch - RPI 57
58
Proof:
Input Tape
w
Machine that accepts L
Enumerator for L
Compare
59
60
We have proven: A language is recursively enumerable if and only if there is an enumeration procedure for it
61