Table of contents
1.
Introduction
2.
1. Decidable Problems
2.1.
Examples of Decidable Problems
3.
2. Undecidable Problems
3.1.
Example of an Undecidable Problem
4.
Difference Between Decidable and Undecidable Problems in TOC
5.
Frequently Asked Questions
5.1.
What is Decidability and Undecidability?
5.2.
What is the Decidability of a Language?
5.3.
What is the Undecidability of a Language?
5.4.
Can undecidable problems be solved by an algorithm?
5.5.
Why is Decidability important?
6.
Conclusion
Last Updated: Mar 10, 2025
Medium

Decidability and Undecidability Problems

Author Anant Dhakad
0 upvote
Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

This blog will discuss Decidability and Undecidability problems. A common question in GATE is whether a language (or a problem*) is decidable, undecidable, or partially decidable. This question becomes easier to answer if you have the proper knowledge and experience.

Decidability and Undecidability Problems

The theory of computing (TOC) consists of two primary sorts of languages, which are as follows:

  • Decidable
  • Undecidable

1. Decidable Problems

In computer science and mathematics, a language is a set of strings made up of symbols from an alphabet. A language is called decidable if an algorithm can determine whether a given string is a member of that language. In other words, a language is decidable if there is a definite and effective way to determine whether a string is valid within that language or not. This concept is fundamental in the theory of computation and has practical applications in fields such as programming languages, database systems, and natural language processing. The study of decidable languages is an important area of research in computer science and plays a critical role in developing algorithms and computational systems.

A recursive language is a type of formal language that can be generated by the recursive grammar. In simpler terms, it is a language where the rules for generating strings in the language refer back to the language itself. This makes it possible to generate infinite sets of strings. Recursive languages are important in computer science and mathematics, as they are closely related to the concept of computability and the ability of a computer to solve certain types of problems.

Examples of Decidable Problems

Here are some examples of decidable problems:

• Given a mathematical statement, determine whether it is true or false.

• Checking whether a given string is a palindrome.

• Determining whether a number is even or odd.

• Checking whether a given graph is connected.

• Verifying whether a given regular expression matches a string.

• Checking whether a given number is prime.

• Determining whether a given Turing machine halts on a given input.

2. Undecidable Problems

An undecidable language is a type of language that cannot be decided by any algorithm or computer program. In other words, we can say there is no way to construct a program that can determine whether a given input string is a member of the language or not. This is because undecidable languages are inherently complex and may require infinite steps to determine membership.
One classic example of an undecidable language is the Halting problem, which asks whether a given Turing machine will halt onto a  given input. Another example is the Post Correspondence Problem, which asks whether a list of pairs of strings can be arranged in a certain way.
Undecidable languages are an important concept in computer science, as they show that some problems cannot be solved by algorithms or computer programs, no matter how sophisticated they are.

A recursively enumerable language is a formal language that can be generated by an algorithm or a Turing machine. The language may be infinite, and not all strings can be verified to belong in the language.

Example of an Undecidable Problem

Here are some examples of undecidable problems:

  • Given a positive integer n, determine whether n is a prime number.
  • Given a regular language L and a string s, determine whether s belongs to L.
  • Given a context-free grammar G and a string s, determine whether s can be derived from G.
  • Given a finite automaton A and a string s, determine whether A accepts s.
  • Given two finite sets, A and B, determine whether A is a subset of B.
  • Given a graph G and two vertices s and t, determine whether there exists a path from s to t in G.

Difference Between Decidable and Undecidable Problems in TOC

ParameterDecidable ProblemsUndecidable Problems
DefinitionProblems for which an algorithm exists that can always provide a correct yes/no answer in finite time.Problems for which no algorithm can determine a correct yes/no answer for all possible inputs.
SolvabilityCan be solved by a Turing machine that always halts.Cannot be solved by any Turing machine; the machine may loop indefinitely.
Algorithm ExistenceThere exists an algorithm that correctly decides the problem in a finite number of steps.No algorithm exists that can determine the answer in general cases.
Examples- Checking if a string belongs to a regular language
- Checking if a context-free grammar is ambiguous.
- Halting Problem (Determining if a given Turing machine halts for an input). 
- Post Correspondence Problem (PCP).
Closure PropertiesDecidable problems are closed under union, intersection, and complement operations.Undecidable problems are not necessarily closed under these operations.
ComputabilityCan be computed effectively using an algorithm.Not computable, as no general algorithm exists for all cases.
Halting BehaviorThe algorithm always terminates with an answer.The algorithm may never terminate or go into an infinite loop.

Frequently Asked Questions

What is Decidability and Undecidability?

Decidability refers to problems that can be solved by an algorithm in finite time, while undecidability refers to problems for which no such algorithm exists.

What is the Decidability of a Language?

A language is decidable if a Turing machine exists that always halts and correctly determines whether a given string belongs to the language.

What is the Undecidability of a Language?

A language is undecidable if no Turing machine can always determine, in finite time, whether a given string belongs to the language.

Can undecidable problems be solved by an algorithm?

Undecidable problems cannot be solved by any algorithm because they lack a well-defined solution that can be computed using a finite sequence of steps. These problems are typically too complex or exhibit fundamental limitations in computation.

Why is Decidability important?

Decidability is important because it allows us to determine whether a problem can be solved algorithmically, providing insight into the nature of computation and helping us to identify the limits of what can be computed.

Conclusion

Cheers if you reached here!! 

In this article, we discussed Decidability and Undecidability problems. We saw an example of a decidable problem. 

Recommended Readings:

Live masterclass