0% found this document useful (0 votes)
8 views

Unsolvable Problems and Computable Functions

Uploaded by

Anusuya
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Unsolvable Problems and Computable Functions

Uploaded by

Anusuya
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Unsolvable Problems and

Computable Functions
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
• Divide the problems 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)
Some of the unsolvable problems are
• A non-recursive language and an Unsolvable
problems
• Reducing one problem to another(Halting
Problem)
• Unsolvable Problem involving CFL
Computable functions
Computable functions
are the functions that
can be calculated using
mechanical calculation device
• Each computable function 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)
Characteristics of a computable 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
Some examples for computable 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
Primitive Recursive Functions
A function, 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
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
Identity Function
Identity function designed to take any number of
arguments
Example
Id(x,y)=x
Id(x,y)=y
Operations
We can build complicated 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
Primitive Recursion
Method of defining 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
Class of recursive functions
PARTIAL RECURSIVE FUNCTION

GENERAL RECURSIVE FUNCTIONS

PRIMITIVE RECURSIVE
FUNCTIONS

You might also like