Recursively Enumerable and Recursive Languages - PowerPoint PPT Presentation

About This Presentation
Title:

Recursively Enumerable and Recursive Languages

Description:

NO: ignore. End of Proof. 13. Example: Enumeration. Output. 14 ... NO: ignore. NAIVE APPROACH. Problem: If. machine may loop forever. 18. executes first step on ... – PowerPoint PPT presentation

Number of Views:592
Avg rating:3.0/5.0
Slides: 61
Provided by: costas
Learn more at: http://www.cs.rpi.edu
Category:

less

Transcript and Presenter's Notes

Title: Recursively Enumerable and Recursive Languages


1
Recursively Enumerable and RecursiveLanguages

2
Definition
A language is recursively enumerable if some
Turing machine accepts it
3
Let be a recursively enumerable language
and the Turing Machine that accepts it
For string
if
then halts in a final state
if
then halts in a non-final state
or loops forever
4
Definition
A language is recursive if some Turing machine
accepts it and halts on any input string
In other words A language is recursive if
there is a membership algorithm for it
5
Let be a recursive language
and the Turing Machine that accepts it
For string
if
then halts in a final state
if
then halts in a non-final state
6
We will prove
1. There is a specific language which is not
recursively enumerable (not accepted by any
Turing Machine)
2. There is a specific language which is
recursively enumerable but not recursive
7
Non Recursively Enumerable
Recursively Enumerable
Recursive
8
We will first prove
  • If a language is recursive then
  • there is an enumeration procedure for it
  • A language is recursively enumerable
  • if and only if
  • there is an enumeration procedure for it

9
Theorem
if a language is recursive then there is
an enumeration procedure for it
10
Proof
Enumeration Machine
Enumerates all strings of input alphabet
Accepts
11
If the alphabet is then can
enumerate strings as follows
12
Enumeration procedure
Repeat
generates a string
checks if
YES print to output
NO ignore
End of Proof
13
Example
Enumeration Output
14
Theorem
if language is recursively enumerable
then there is an enumeration procedure for it
15
Proof
Enumeration Machine
Enumerates all strings of input alphabet
Accepts
16
If the alphabet is then can
enumerate strings as follows
17
NAIVE APPROACH
Enumeration procedure
Repeat
generates a string
checks if
YES print to output
NO ignore
If machine may loop
forever
Problem
18
BETTER APPROACH
Generates first string
executes first step on
Generates second string
executes first step on
second step on
19
Generates third string
executes first step on
second step on
third step on
And so on............
20
1
1
1
1
Step in string
2
2
2
2
3
3
3
3
21
If for any string machine halts in
a final state then it prints on the output

End of Proof
22
Theorem
If for language there is an enumeration
procedure then is recursively enumerable
23
Proof
Input Tape
Machine that accepts
Enumerator for
Compare
24
Turing machine that accepts
For input string
Repeat
  • Using the enumerator,
  • generate the next string of
  • Compare generated string with

If same, accept and exit loop
End of Proof
25
We have proven
A language is recursively enumerable if and only
if there is an enumeration procedure for it
26
A Language which is notRecursively Enumerable

27
We want to find a language that is not
Recursively Enumerable
This language is not accepted by any Turing
Machine
28
Consider alphabet
Strings
29
Consider Turing Machines that accept languages
over alphabet
They are countable
30
Example language accepted by
Alternative representation
31
(No Transcript)
32
Consider the language
consists from the 1s in the diagonal
33
(No Transcript)
34
Consider the language
consists from the 0s in the diagonal
35
(No Transcript)
36
Theorem
Language is not recursively enumerable
37
Proof
Assume for contradiction that
is recursively enumerable
There must exist some machine that accepts
38
Question
39
Answer
40
Question
41
Answer
42
Question
43
Answer
44
for any
Similarly
Because either
or
45
Therefore, the machine cannot exist
Therefore, the language is not recursively
enumerable
End of Proof
46
Observation
There is no algorithm that describes
(otherwise would be accepted by some
Turing Machine)
47
Non Recursively Enumerable
Recursively Enumerable
Recursive
48
A Language which is Recursively Enumerableand
not Recursive

49
We want to find a language which
Is recursively enumerable
But not recursive
There is a Turing Machine that accepts the
language
The machine doesnt halt on some input
50
We will prove that the language
Is recursively enumerable but not recursive
51
(No Transcript)
52
Theorem
The language
is recursively enumerable
53
Proof
We will give a Turing Machine that accepts
54
Turing Machine that accepts
For any input string
  • Compute , for which
  • Find Turing machine

(using the enumeration procedure for Turing
Machines)
  • Simulate on input
  • If accepts, then accept

End of Proof
55
Observation
Recursively enumerable
Not recursively enumerable
(Thus, also not recursive)
56
Theorem
The language
is not recursive
57
Proof
Assume for contradiction that is recursive
Then is recursive
Take the Turing Machine that accepts
halts on any input
If accepts then reject If
rejects then accept
58
Therefore
is recursive
But we know
is not recursively enumerable
thus, not recursive
CONTRADICTION!!!!
59
Therefore, is not recursive
End of Proof
60
Non Recursively Enumerable
Recursively Enumerable
Recursive
Write a Comment
User Comments (0)
About PowerShow.com