






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This lecture was delivered by Sufi Tabsum Gul at Pakistan Institute of Engineering and Applied Sciences, Islamabad (PIEAS) for Theory of Automata course. it includes: Recursively, Enumerable, Languages, Machine, Theorem, Proof, Observation, Turing
Typology: Slides
1 / 10
This page cannot be seen from the preview
Don't miss anything!







1
Based on slides by Costas Busch [http://csc.lsu.edu/~busch]
Recursive Languages
Definition:
A recursive language L is a formal language for which there
exists a TM that will halt and accept an input string in L, and
halt and reject, otherwise.
EExample: l
The decision problem of determining whether a natural
number is a perfect square (represented by using the string
an) is decidable.
2
Recursive Languages
Let L be a recursive language and M the Turing Machine
that accepts it
For string :
If then halts in a final state
If then halts in a non-final state
Costas Busch - RPI 3
Recursively Enumerable Languages
Definition:
A language is recursively enumerable if some Turing
machine accepts it
Let L be a recursively enumerable language and M the
TTuring Machine that accepts it i M hi th t t it
For string :
If then halts in a final state
If then halts in a non-final state and loops
forever
Costas Busch - RPI 4
Non Recursively Enumerable
We will prove:
enumerable (not accepted by any Turing Machine)
enumerable but not recursivebl b t t i
Costas Busch - RPI 5
Type-0 Languages
(Recursively Enum.)
Recursive
Languages
T 1
Technical Note:
Type-1 languages explicitly
exclude the null string.
All other language
families permit the null
string as a member.
(The Venn diagram is
in slight error because
of this technicality.)
Context-Free Languages
6
Type-
(Context-sensitive)
Languages
Type-
(Context-free)
Languages
Type-
(Regular)
Languages
Linear
(Context-free)
Languages
Recursively Enumerable
Non Recursively Enumerable
7
Recursive
A Language which
is not
Recursively Enumerable
Costas Busch - RPI 8
Recursively Enumerable
Non Recursively Enumerable
Enumerable
Costas Busch - RPI 9
Non Recursively Enumerable
Consider alphabet
1
2
3
4
Costas Busch - RPI 10
Consider Turing Machines
They are countable:
1 2 3 4
Non Recursively Enumerable
Example language accepted by
i
2 4 6
i
i
Costas Busch - RPI 11
Alternative representation
1
a
2
a
3
a
4
a
5
a
6
a
7
a
i
Non Recursively Enumerable
1
a
2
a
3
a
4
a
1
Costas Busch - RPI 12
2
3
4
1
a
2
a
3
a
4
a
1
2
Costas Busch - RPI 19
3
4
Question:?
1
k
1
a
2
a
3
a
4
a
1
2
Costas Busch - RPI 20
3
4
Answer:
1
k
1
1
1
a L M
a LM
k
1
a
2
a
3
a
4
a
1
2
Costas Busch - RPI 21
3
4
Question:
2
k
1
a
2
a
3
a
4
a
1
2
Costas Busch - RPI 22
3
4
Answer:
2
k
2
2
2
a L M
a LM
k
1
a
2
a
3
a
4
a
1
2
Costas Busch - RPI 23
3
4
Question:?
3
k
1
a
2
a
3
a
4
a
1
2
Costas Busch - RPI 24
3
4
Answer:
3
k
3
3
3
a L M
a LM
k
Non Recursively Enumerable
Similarly:
k i
Because either:
Costas Busch - RPI 25
i
i
k
i
i
i
k
i
or
Non Recursively Enumerable
Therefore, the machine cannot exist. Therefore, the
language is not recursively enumerable
Observation:
There is no algorithm that describes (otherwise
ld b t d b T i M hi )
k
would be accepted by some Turing Machine)
Costas Busch - RPI 26
Recursively Enumerable
Non Recursively Enumerable
27
Recursive
A Language which is
Recursively Enumerable
and not Recursive
Costas Busch - RPI 28
and not Recursive
We want to find a language which
Is recursively
enumerable
But not
recursive
Costas Busch - RPI 29
There is a Turing
Machine that accepts
the language
The machine
doesn’t halt
on some input
We will prove that the language
i
i i
Is recursively enumerable but not recursive
Costas Busch - RPI 30
Therefore:
L is recursive
But we know:
Costas Busch - RPI 37
is not recursively enumerable
thus, not recursive
CONTRADICTION!!!!
Therefore, is not recursive
Recursively Enumerable
Non Recursively Enumerable
38
Recursive
Turing acceptable languages
and
Enumeration Procedures
Costas Busch - RPI 39
Enumeration Procedures
We will prove:
If a language is recursive then there is an
enumeration procedure for it
(weak result)
Costas Busch - RPI 40
A language is recursively enumerable if and only if
there is an enumeration procedure for it
(strong result)
Theorem:
If a language is recursive then there is an
enumeration procedure for it
Costas Busch - RPI 41
Proof:
Enumeration Machine
Costas Busch - RPI 42
Accepts
Enumerates all
strings of input alphabet
If the alphabet is then can enumerate
strings as follows:
Costas Busch - RPI 43
Enumeration procedure
Repeat:
generates a string
Costas Busch - RPI 44
NO: ignore
End of Proof
Example:
Enumeration
Output
Costas Busch - RPI 45
Theorem:
If language is recursively enumerable then
there is an enumeration procedure for it
Costas Busch - RPI 46
Proof:
Enumeration Machine
Costas Busch - RPI 47
Accepts L
Enumerates all
strings of input alphabet
If the alphabet is then can enumerate
strings as follows:
Costas Busch - RPI 48
Proof:
Input Tape
Machine that
Costas Busch - RPI 55
Enumerator
Compare
Turing machine that accepts L
Repeat:
Using the enumerator,
Costas Busch - RPI 56
generate the next string of
If same, accept and exit loop
End of Proof
We have proven:
A language is recursively enumerable if and only if
there is an enumeration procedure for it
Costas Busch - RPI 57
Technical Note:
Type-1 languages explicitly
exclude the null string.
All other language
families permit the null
string as a member.
(The Venn diagram is
in slight error because
of this technicality.)
Context-Free Languages
Type-0 Languages
(Recursively Enum.)
Recursive
Languages
T 1
Non Recursively Enumerator)
58
Type-
(Regular)
Languages
Type-
(Context-sensitive)
Languages
Type-
(Context-free)
Languages
Linear
(Context-free)
Languages