Title: Undecidability Lecture 5
1UndecidabilityLecture 5
- Srinath Srinivasa
- International Institute of Information
Technology, Bangalore - sri_at_iiitb.ac.in
2Objectives
- To familiarize ourselves with recursive and
recursively enumerable class of languages - To get acquainted with the idea of countably
infinite and uncountably infinite sets.
3r. and r.e. Classes
A language L over an alphabet T (L ? T) is
said to be recursive if there exists a TM that
can decide for all w ? T whether or not it
belongs to L. A language L over an alphabet T
(L ? T) is said to be recursively enumerable
if there exists a TM that can recognize all w ?
L.
4 r and r.e. classes
- A language L ? T is recursive if for any w ? T
there exists a TM that can decide whether w ? L. - A language L ? T is recursive, if there exists a
TM which can recognize all w ? L. - Note In a language L that is r.e. for any w ? L,
there is no guarantee about the behaviour of the
TM. The TM may decide (reject the input) or may
go into an infinite loop without giving any
answer. - Note that a TM halts when it reaches an end
state not when it reaches the end of input like
a DFA.
5Formalizing problem solving
- Problem solving can be seen as a function from a
problem space to a solution space - f P ? S
- Example Compute the square of a number compute
the annual dividend compute the location given
speed acceleration and initial location, etc.
6Formalizing problem solving
- Functions into arbitrary ranges can be reduced to
the decision problem - f P ? S
- can be reduced as
- f P x S ? yes, no
- The language of a problem f is simply all w ? P
x S which map to yes - A problem (language) is said to be decidable if
it is possible to build a TM that can take any w
? P x S and answer yes or no.
7Chomsky Language Hierarchy
r.e.
Recursive
CFL
Regular
8Countable and Uncountable Sets
A set K is countable if either it is finite or it
has the same size as N, the set of natural
numbers. A set K is uncountable if the set is an
infinite set and there exists no correspondence
with N.
9Infinities
N
0 1 2 3 4 5 6 7
?
Z
- ? -3 -2 -1 0 1 2 3
?
R
- ? -3 -2 -1 0 1 2 3
?
?
10Countably and uncountably infinite
An infinite set S is said to be countably
infinite if there is a one-to-one correspondence
between the elements of S, and the set of
natural numbers N. If such a correspondence
does not exist, then S is said to be uncountably
infinite. Countable sets are also called
enumerable sets.
11Some Countable Sets
6 4 2 0 1 3 5
Z
- ? -3 -2 -1 0 1 2
3 ?
0 1 2 3 4
Q
1 2 3
0/1 1/1 2/1 3/1 4/1 0/2
1/2 2/2 3/2 4/2 0/3 1/3
2/3 3/3 4/3
12Some Countable Sets
Consider alphabet set A 0,1 Set of all
strings A l,0,1,00,01,10,11,000,.. l
represents string of length 0 0,1 represent
string of length 1 00,01,10,11 represent string
of length 2 and so on This way we can easily
see that the Kleene closure of a finite alphabet
is a countably infinite set.
13Some Uncountable Sets
The set of all real numbers R is an uncountable
set. If S is a countably infinite set, then
its power set 2S is uncountable.. But, dont
accept anything without a proof
14The TM is a Number
TM S,S0,H,T,d Earlier, we saw that, a TM
can be represented as a number. Let S n.
Number states of S 1, 2, , n. Let T m.
Number each symbol of T n1,n2, ,nm Let 0
denote the blank symbol. Let L nm1, R
nm2
15The Set of All Turing Machines is Countably
Infinite
For every Turing machine T (S,S0,H,T,d), we can
assign a unique binary number n(T) If we can
make this assignment, then we have an
enumeration. i.e. T, the set of all Turing
machines can be mapped onto N, the set of all
natural numbers. Thus the set of all Turing
machines is countably infinite.
16Philosophical Question
Are all languages recursive / recursively
enumerable? Or does there exist languages that
are not recursively enumerable? Do there
exist some problems which cannot be solved by
Turing machines (computers)?
17There Do Indeed
Any language L is defined over an alphabet T.
L ? T The set of
all languages possible over T is then
LT 2T We know that T is
countably infinite. But what about 2T ?
18There Do Indeed
The set of all languages possible is an
uncountable set while the set of TMs is a
countable set. Proof in the next class. There
exist some mathematical problems which cannot
be computed! Example General software program
verification is not solvable by computer.
19Conclusions
- Many seemingly easy mathematical problems are
actually uncomputable! - Set of all Turing Machines is countably infinite
20Countable and Uncountable Sets
- Teacher How many numbers are there?
- Student Infinity of course!
- Teacher How many infinities are there?
- Student Duhhh???