- Related Questions & Answers
- Explain the Decidable and undecidable problems
- What are the most common teenage problems?
- What are the 5 most common teenage problems? what are the solutions?
- What are the fundamental concepts of TOC?
- What are the Turing machine variations in TOC?
- What are the problems created due to excess calcium?
- What are the basic properties of products in TOC?
- What are the properties of Regular expressions in TOC?
- What are the problems faced by rural women in India today?
- What are the different operations performed on strings in TOC?
- What are the P class and NP class in TOC?
- Why the NP-complete problems are significant?
- What is the decision problem in TOC?
- What is the Halting Problem in TOC?
- What are different pointer operations and problems with pointers in C language?

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

The problems for which we can’t construct an algorithm that can answer the problem correctly in the infinite time are termed as Undecidable Problems in the theory of computation (TOC).

A problem is undecidable if there is no Turing machine that will always halt an infinite amount of time to answer as ‘yes’ or ‘no’.

**Examples**

The examples of undecidable problems are explained below. Here, CFG refers to Context Free Grammar.

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.

Given a context-free language, there is no Turing machine (TM) that will always halt an infinite amount of time and give an answer to whether language is ambiguous or not.

Given two context-free languages, there is no Turing machine that will always halt an infinite amount of time and give an answer whether two context-free languages are equal or not.

Whether CFG will generate all possible strings of the input alphabet (∑*) is undecidable.

**Halting Problem**

The Halting problem is the most famous of the undecidable problems.

Consider the code

num=1; while(num=0) { num=num+1; }

It counts up forever since it will never equal 0. This is an example of the halting problem.

**Note:** Every context-free language is decidable.

Some of the other undecidable problems are:

**Totality problem** − It decide whether an arbitrary TM halts on all inputs. This is equivalent to the problem of whether a program can ever enter an infinite loop, for any input. It differs from the halting problem, which asks whether it enters an infinite loop for a particular input.

**Equivalence problem** − It decide whether two TMs accept the same language. This is equivalent to the problem of whether two programs compute the same output for every input.

Advertisements