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

TOC Unit 6 Part

Unit 6

Uploaded by

akash.rd.1548
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

TOC Unit 6 Part

Unit 6

Uploaded by

akash.rd.1548
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

In computational complexity theory, problems are often classified as either solvable or

unsolvable, based on whether there exists an algorithm that can solve the problem or not.
Solvable: A problem is said to be solvable if there exists an (solution) algorithm that can solve
it in a finite amount of time, i.e., for any input of the problem, the algorithm can produce the
correct output in a finite number of steps, or you can prove that the problem cannot be solved
(there is no algorithm (solution) available to solve the given problem).

Unsolvable Problem - On the other hand, a problem is said to be unsolvable if there does not
exist any algorithm that can solve it in a finite amount of time. One well-known example of an
unsolvable problem is the Halting problem, which asks whether a given program will
eventually halt or run forever. It has been proven that there is no algorithm that can solve the
Halting problem for all possible inputs.

Decidable and Undecidable Problems


In computational complexity theory, solvable problems are also often classified as decidable
or undecidable, based on whether there exists an algorithm that can decide the problem or not.

a) Decidable Problem - A problem is said to be decidable if there exists an algorithm that


can determine whether an instance of the problem is a "yes" instance or a "no" instance
in a finite amount of time. In other words, the algorithm will always halt and return the
correct answer, either "yes" or "no". For example, the problem of determining whether
a given number is prime is decidable, since there exists an algorithm that can determine
the primality of a number in a finite amount of time.
Now talking about Decidability in terms of a Turing machine, a problem is said to be a
Decidable problem if there exist a corresponding Turing machine which halts on every
input with an answer- yes or no. It is also important to know that these problems are
termed as Turing Decidable since a Turing machine always halts on every input,
accepting or rejecting it.

b) Semi- Decidable Problems – Semi-Decidable problems are those for which a Turing
machine halts on the input accepted by it but it can either halt or loop forever on the
input which is rejected by the Turing Machine. Such problems are termed as Turing
Recognisable problems.
Examples – We will now consider few important Decidable problems:
• Are two regular languages L and M equivalent?
We can easily check this by using Set Difference operation. L-M =Null and M-L =Null.
Hence (L-M) U (M-L) = Null, then L,M are equivalent.
• Membership of a CFL?
We can always find whether a string exist in a given CFL by using on algorithm based
on dynamic programming.
• Emptiness of a CFL
By checking the production rules of the CFL we can easily state whether the language
generates any strings or not.

c) Undecidable Problem - On the other hand, a problem is said to be undecidable if there


is no algorithm that can determine whether an instance of the problem is a "yes"
instance or a "no" instance in a finite amount of time. The classic example of an
undecidable problem is the Halting problem, which asks whether a given program will
eventually halt or run forever. It has been proven that there is no algorithm that can
solve the Halting problem for all possible inputs.
These problems may be partially decidable but they will never be decidable. That is
there will always be a condition that will lead the Turing Machine into an infinite loop
without providing an answer at all.
We can understand Undecidable Problems intuitively by considering Fermat’s
Theorem, a popular Undecidable Problem which states that no three positive integers
a, b and c for any n>=2 can ever satisfy the equation: a^n + b^n = c^n.

If we feed this problem to a Turing machine to find such a solution which gives a
contradiction then a Turing Machine might run forever, to find the suitable values of n,
a, b and c. But we are always unsure whether a contradiction exists or not and hence
we term this problem as an Undecidable Problem.
Examples – These are few important Undecidable Problems:
• Whether a CFG generates all the strings or not?
As a CFG generates infinite strings ,we can’t ever reach up to the last string and hence
it is Undecidable.
• Whether two CFG L and M equal?
Since we cannot determine all the strings of any CFG , we can predict that two CFG
are equal or not.
• Ambiguity of CFG?
There exist no algorithm which can check whether for the ambiguity of a CFL. We can
only check if any particular string of the CFL generates two different parse trees then
the CFL is ambiguous.
• Is it possible to convert a given ambiguous CFG into corresponding non-ambiguous
CFL?
It is also an Undecidable Problem as there doesn’t exist any algorithm for the
conversion of an ambiguous CFL to non-ambiguous CFL.
• Is a language Learning which is a CFL, regular?
This is an Undecidable Problem as we can not find from the production rules of the
CFL whether it is regular or not.

Some more Undecidable Problems related to Turing machine:


• Membership problem of a Turing Machine?
• Finiteness of a Turing Machine?
• Emptiness of a Turing Machine?
• Whether the language accepted by Turing Machine is regular or CFL?

Recursive and Recursively Enumerable languages

Remember that there are three possible outcomes of executing a Turing machine over a given
input. The Turing machine may
• Halt and accept the input;
• Halt and reject the input; or
• Never halt.
A language is recursive if there exists a Turing machine that accepts every string of the
language and rejects every string (over the same alphabet) that is not in the language.
A language is recursively enumerable if there exists a Turing machine that accepts every string
of the language, and does not accept strings that are not in the language. (Strings that are not
in the language may be rejected or may cause the Turing machine to go into an infinite loop.)

Recursively Enumerable Language

Recursive Language

Clearly, every recursive language is also recursively enumerable. It is not obvious whether
every recursively enumerable language is also recursive.
Recursive Enumerable language, A language is said to be recursively enumerable if there
exists a Turing machine which will accept and halt for all the input strings which are in L. But,
It may halt or may not halt for all the input strings which are not in L.
Important Note:
1. Recursive Language (TM will always halt) = Decidable Language (vice-versa)
2. Recursively Enumerable Language (TM will halt sometime & sometime may not)
= Partially Decidable Language
3. If no Turing machine exists for Language then language is undecidable

Church’s Turing thesis

In 1936, A method named as lambda-calculus was created by Alonzo Church in which the
Church numerals are well defined, i.e. the encoding of natural numbers. Also in 1936, Turing
machines (earlier called theoretical model for machines) was created by Alan Turing, that is
used for manipulating the symbols of string with the help of tape.

It is a Hypothesis that can be stated as: “The assumption that the intuitive notion of
computable functions can be identified with partial recursive functions.”
Or in simple words we can say that “Every computation that can be carried out in the
real world can be effectively performed by a Turing Machine.”
In 1930, this statement was first formulated by Alonzo Church and is usually referred to as
Church’s thesis, or the Church-Turing thesis. However, this hypothesis cannot be proved.
The recursive functions can be computable after taking following assumptions:
1. Each and every function must be computable.
2. Let ‘F’ be the computable function and after performing some elementary
operations to ‘F’, it will transform a new function ‘G’ then this function ‘G’
automatically becomes the computable function.
3. If any functions that follow above two assumptions must be states as computable
function.

Turing Reducibility

In computability theory, a Turing reduction from a problem A to a problem B, is a reduction


which solves A, assuming the solution to B is already known (Rogers 1967, Soare 1987). It
can be understood as an algorithm that could be used to solve A if it had available to it a
subroutine for solving B. More formally, a Turing reduction is a function computable by an
oracle machine with an oracle for B. Turing reductions can be applied to both decision
problems and function problems.

H accepts w if R accepts f(w) if f(w) ∈ B if w ∈ A


Reduction Theorem :
A reduction from A to B is a function
• Every w ∈ A maps to some f(w) ∈ B.
• Every w ∉ A maps to some f(w) ∉ B.
• f does not have to be injective or surjective.
A simple undecidable problem
Post Correspondence Problem (PCP):

You might also like