Unsolvable or Undecidable
•Any problem that cannot be solved by TM is
called unsolvable or undecidable
• The class of the problem which cannot be
answered as yes is said to undecidable
• A problem is called unsolvable or undecidable
if no algorithm exists that solves the problem
3.
• Divide theproblems that can be solved by TM
into two classes,
• Have an algorithm(TM halts whether or not it
accepts I/P) (Decidable)
• Have no algorithms (No matter how long TM
runs, cannot know whether the I/P is accepted
or not) (Undecidable)
4.
Some of theunsolvable problems are
• A non-recursive language and an Unsolvable
problems
• Reducing one problem to another(Halting
Problem)
• Unsolvable Problem involving CFL
• Each computablefunction f takes a fixed finite
number of natural numbers as arguments
• The computable function f returns an output for
some inputs
• For some inputs, it may not return an output.
• Due to this, a computable function is a partial
recursive function
• If the computable function is defined for all
possible arguments, it is called total computable
function or total recursive function
EXAMPLE f(x1, x2,……xk)
7.
Characteristics of acomputable function
• Must be exact instructions (a program, finite in
length)
• If the procedure is given a k tuple x in the
domain of f, then after a finite number of steps,
the procedure must terminate and produce f(x)
• If the procedure is given a k-tuple x which is
not in the domain of f, then the procedure must
never halt, or it may get stuck at some point
8.
Some examples forcomputable functions
• Each function with a finite domain.
eg. Any finite sequence of natural numbers
• Each constant function f :Nk
→N, f(n1, n2,
…..nk) = n
• Addition f(n1,n2) = n1 + n2
• The function which gives the list of prime
factors of a number
• The gcd of two numbers is a computable
function.
Primitive Recursive Functions
Afunction, f is called a primitive recursive function,
i) If it is one of the three basic functions, or,
ii) If it can be obtained by applying operations such
as composition and recursion to the set of basic
functions
The basic functions and operations are
Basic Functions
Zero function,
Successor function
Identity function
11.
Zero Function
Z(x) =0 is called Zero function.
Example:
Z(8) = 0
Successor Function
The successor function is S(x), defined as
S(x) = x+1
Thus the value of S(x) is the integer next in sequence to x.
Example
S(4) = 5
S(29) = 30
Operations
We can buildcomplicated functions from the above basic functions
by performing operations such as,
Composition
Primitive Recursion
Minimization
Composition
Let g(n) = n2
h(n) = n + 3
Find the composition of h with g.
The composition of h with g is,
f(n) = h[g(n)]
= h[n2
]
= n2
+ 3
14.
Primitive Recursion
Method ofdefining new function from old
function
• The factorial function,
• f(n) = n! is a primitive recursive function
Minimization
If g(x) is a function that computes the least x
then g is computable
X never gets terminated then it is called
unbounded minimization
15.
Class of recursivefunctions
PRIMITIVE RECURSIVE
FUNCTIONS
GENERAL RECURSIVE FUNCTIONS
PARTIAL RECURSIVE FUNCTION