Recursively Enumerable and Recursive Languages - PowerPoint PPT Presentation

1 / 55
About This Presentation
Title:

Recursively Enumerable and Recursive Languages

Description:

Let be an enumerator that prints. all strings from input alphabet in proper order ... Using the enumerator of , generate the next string of. For any input string ... – PowerPoint PPT presentation

Number of Views:29
Avg rating:3.0/5.0
Slides: 56
Provided by: imsUnist
Category:

less

Transcript and Presenter's Notes

Title: Recursively Enumerable and Recursive Languages


1
  • Recursively Enumerable and Recursive Languages
  • Slides based on RPI CSCI 2400
  • Thanks to Costas Busch

2
Definition
A language is recursively enumerable if there is
a Turing machine that accepts it
Also known as Turing Recognizable languages
or Turing Acceptable languages
3
Let be a recursively enumerable language
and the Turing Machine that accepts it
For any string
if
then halts in an accept state
then halts in a non-accept state
if
or loops forever
4
Definition
A language is recursive if there is a Turing
machine accepts it and the machine halts on
every input string
Also known as decidable languages
5
Let be a recursive language
Then there is a Turing machine
that accepts such that
For any string
if
then halts in an accept state
if
Then M halts in a non-accept 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
A Language which is notRecursively Enumerable

9
Consider alphabet
Strings
10
Consider Turing Machines that accept languages
over alphabet
They are countable
(There is an enumeration procedure that
generates them)
11
Each machine accepts some language over
Note that it is possible to have
for
Since, a language could be accepted by more than
one Turing machine
12
Example language accepted by
Binary representation
13
Example of binary representations
14
Consider the language
consists of the 1s in the diagonal
15
(No Transcript)
16
Consider the language
consists of the 0s in the diagonal
17
(No Transcript)
18
Theorem
Language is not recursively enumerable
Proof
Assume for contradiction that
is recursively enumerable
There must exist some machine that accepts
19
Question
20
Answer
21
Question
22
Answer
23
Question
24
Answer
25
for any
Similarly
Because either
or
the machine cannot exist
is not recursively enumerable
End of Proof
End of Proof
26
Non Recursively Enumerable
Recursively Enumerable
Recursive
27
A Language which is Recursively Enumerableand
not Recursive

28
We will prove that the language
Is recursively enumerable
But not recursive
There is a Turing Machine that accepts
Every machine that accepts doesnt halt on some
input string
29
(No Transcript)
30
The language
Theorem
is recursively enumerable
Proof
We will give a Turing Machine that accepts
31
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
32
Observation
Recursively enumerable
Not recursively enumerable
(Thus, is not recursive either)
33
Theorem
If a language is recursive, then its
complement is recursive too
Proof
Build a Turing machine that accepts
and halts on every input
34
(accepts and halts on every input string)
Turing Machine
On any input string do
1. Let be the Turing machine that accepts
and halts on every input string
2. Run with input string
If accepts then reject If rejects
then accept
35
For all tape symbols not read in the other
transitions of
Transform to
END OF PROOF
36
Theorem
is not a recursive language
Proof
If is recursive
The complement of a recursive language is
recursive
Then is recursive
However, is not Turing acceptable!
Contradiction!!!!
37
Non Recursively Enumerable
Recursively Enumerable
Recursive
38
Turing acceptable languages and Enumeration
Procedures
39
We will prove
(weak result)
  • If a language is recursive then
  • there is an enumeration procedure for it

(strong result)
  • A language is recursively enumerable
  • if and only if
  • there is an enumeration procedure for it

40
Theorem
if a language is recursive then there is
an enumeration procedure for it
Proof
Let be the Turing machine that accepts and
halts on every input
Use to build the enumeration procedure for
41
Let be an enumerator that prints all
strings from input alphabet in proper order
Example alphabet is
(proper order)
42
Enumeration procedure for
Repeat
generates a string
checks if
YES print to output
NO ignore
This part terminates, because is recursive
43
Enumeration Machine for
Give me next string
Enumerates all strings of input alphabet
output
If accepts then print to output
string
All strings of
Generates all Strings in alphabet
Tests each string if it is accepted by
44
Example
Enumeration Output
reject
accept
reject
accept
reject
accept
accept
reject
END OF PROOF
45
Theorem
if language is recursively enumerable
then there is an enumeration procedure for it
Proof
Let be the Turing machine that accepts
Use to build the enumeration procedure for
46
Enumeration Machine for
Enumerates all strings of input alphabet in
proper order
Accepts
47
NAIVE APPROACH
Enumeration procedure for
Repeat
generates a string
checks if
YES print to output
NO ignore
If machine may loop
forever
Problem
48
BETTER APPROACH
Generates first string
executes first step on
Generates second string
executes first step on
second step on
49
Generates third string
executes first step on
second step on
third step on
And so on............
50
String
1
1
1
1
Step in computation of string
2
2
2
2
3
3
3
3
4
4
4
4
51
If for any string machine halts in
an accepting state then it prints on the
output
End of Proof
52
Theorem
If for language there is an enumeration
procedure then is recursively enumerable
Proof
Using the enumerator for we will build a Turing
machine that accepts
53
Input Tape
Turing Machine that accepts
Compare
Enumerator for
If same, Accept and Halt
Give me the next string in the enumeration
sequence
54
Turing machine that accepts
For any input string
Loop
  • Using the enumerator of ,
  • generate the next string of
  • Compare generated string with

If same, accept and exit loop
End of Proof
55
By Combining the last two theorems, we have
proven
A language is recursively enumerable if and only
if there is an enumeration procedure for it
Write a Comment
User Comments (0)
About PowerShow.com