TOC Assignment
TOC Assignment
Submitted By
Name: Md. Mohtasim Hossain
ID: 2022200000163
Semester: Fall 2024
Dept. of Computer Science and Engineering, SEU.
Submitted To
Name: Mr. Nahid Hasan
Designation: LECTURER
Dept. of Computer Science and Engineering, SEU.
Decidable languages
A decidable language is a language for which there is an algorithm that can
determine if a given word is in the language. Decidable languages are also
called recursive languages.
Explanation
A Turing machine can be used to determine if a word belongs to a
decidable language.
The Turing machine halts on all inputs and provides a yes or no answer.
Decidable languages are important in theoretical computer science
because they show the limits of what can be solved using computational
models.
Properties of decidable languages
Decidable languages are closed under union, intersection, and
complementation.
A language is decidable if both the language and its complement are
recognizable.
A language L is said to be decidable if there exists a Turing machine that can
always decide whether any given string belongs to L or not. In simpler terms, if
we pass a string to this Turing machine, it will always halt, giving a clear
answer: either it will accept the string (if the string is in the language) or reject
it (if the string is not in the language).
Language Decidability
A language is called Decidable or Recursive if there is a Turing machine which
accepts and halts on every input string w. Every decidable language is Turing-
Acceptable.
For a decidable language, for each input string, the TM halts either at the
accept or the reject state as depicted in the following diagram −
Undecidable Languages
4
Diagonalization
6
Reduction
The Ladner’s Theorem deals with the complexity classes: P, NP, and NPC (NP-
complete). The theorem addresses a fundamental question in computer
science: if P is not equal to NP, then are there problems in NP that are neither
in P nor NP-complete? The Ladner’s Theorem answers this question by proving
that there are indeed such problems, known as NP-intermediate problems.
Understanding the Basics: P, NP, and NP-Complete
Before understanding the Ladner’s Theorem, it is important to get the basics of
P, NP, and NP-complete problems.
P (Polynomial Time) − In simple term, this class consists of problems that
can be solved by an algorithm in polynomial time. In other words, if a
problem is in P, there is an efficient algorithm that can solve it in a
certain amount of time as the input size grows.
NP (Nondeterministic Polynomial Time) − This class includes problems
for which a solution, once found, can be verified in polynomial time.
However, it is not known whether these problems can be solved in
polynomial time or not.
NP-Complete − The most complex class is the NP-Complete. If any NP-
complete problem can be solved in polynomial time, then every problem
in NP can also be solved in polynomial time, implying P = NP. Conversely,
if P ≠ NP, then NP-complete problems cannot be solved in polynomial
time.
9
The P vs NP Question
One of the most famous problem in computer science is whether P = NP or not.
If P were equal to NP, every problem that can be verified quickly could also be
solved quickly. However, if P ≠ NP, then there are problems in NP that cannot
be solved as efficiently as they can be verified.
NP-Intermediate Problems
Now it comes to the Ladner's Theorem. It introduces the concept of NP-
intermediate problems. These are problems that belong to NP but are neither
in P nor NP-complete. They sit in between the two classes, having an
intermediate complexity.
We can define this formally in this way, a language L ∈ NP is NP-intermediate
iff L ∉ P and L ∉ NP-complete.
In simpler terms, if P ≠ NP, then NP contains problems that are too difficult to
be in P but not as hard as NP-complete problems.
Ladner’s Theorem
The Statement: Ladner's Theorem states: If P ≠ NP, then there is a language L
which is an NP-intermediate language. This means that if it turns out P is not
equal to NP, then NP must contain problems that are neither easy enough to be
solved in polynomial time (P) nor hard enough to be NP-complete.
10
END