# Undecidability

Please wait while the activity loads.

If this activity does not load, try refreshing your browser. Also, this page requires javascript. Please visit using a browser with javascript enabled.

If this activity does not load, try refreshing your browser. Also, this page requires javascript. Please visit using a browser with javascript enabled.

Question 1 |

3 only | |

3 and 4 only | |

1, 2 and 3 only | |

2 and 3 only |

**GATE CS 2013**

**Undecidability**

**Discuss it**

Question 1 Explanation:

- First is Emptiness for CFG; whether a CFG is empty or not, this problem is decidable.
- Second is everything for CFG; whether a CFG will generate all possible strings (completeness of CFG), this problem is undecidable.
- Third is Regularity for REC; whether language generated by TM is regular is undecidable.
- Fourth is equivalence for regular; whether language generated by DFA and NFA are same is decidable.

Question 2 |

1, 2, 3, 4 | |

1, 2 | |

2, 3, 4 | |

3, 4 |

**GATE CS 2012**

**Undecidability**

**Discuss it**

Question 2 Explanation:

See Question 3 of http://www.geeksforgeeks.org/automata-theory-set-2/

Question 3 |

Which of the following are decidable?

I. Whether the intersection of two regular languages is infinite II. Whether a given context-free language is regular III. Whether two push-down automata accept the same language IV. Whether a given grammar is context-free

I and II | |

I and IV | |

II and III | |

II and IV |

**Undecidability**

**GATE CS 2008**

**Discuss it**

Question 3 Explanation:

(A) Intersection of two regular languages is regular and checking if a regular language is infinite is decidable.
(B) Deciding regularity of a context free language is undecidable.
We check if L(CFG) contains any string with length between n and 2n−1 , where n is the pumping lemma constant. If so, L(CFG) is infinite otherwise it is finite.
(C) Equality problem is undecidable for all languages except in case of finite automata i.e. for regular languages.
(D) We have to check if the grammar obeys the rules of CFG. If, it obeys such rules then it is decidable.

**Thus, option (B) is correct.**Please comment below if you find anything wrong in the above post.Question 4 |

Which of the following problems is undecidable? [2007]

Membership problem for CFGs | |

Ambiguity problem for CFGs. | |

Finiteness problem for FSAs. | |

Equivalence problem for FSAs. |

**Undecidability**

**GATE-CS-2007**

**Discuss it**

Question 4 Explanation:

A set is closed under an operation means when we operate an element of that set with that operator we get an element from that set.

Here, CFG generates a CFL and set of all CFLs is the set. But ambiguity is not an operation and hence we can never say that CFG is closed under such operation.

Only ambiguity problem for CFGs are undecidable.

Thus, option (B) is correct.

Please comment below if you find anything wrong in the above post.

Question 5 |

Let <M> be the encoding of a Turing machine as a string over ∑= {0, 1}. Let L = { <M> |M is a Turing machine that accepts a string of length 2014 }. Then, L is

decidable and recursively enumerable | |

undecidable but recursively enumerable | |

undecidable and not recursively enumerable | |

decidable but not recursively enumerable |

**Undecidability**

**GATE-CS-2014-(Set-2)**

**Discuss it**

Question 5 Explanation:

There are finite number of strings of length ‘2014’. So, a turing machine will take the input string of length ‘2014’ and test it.
If, input string is present in the language then turing machine will halt in final state .
But, if turing machine is unable to accept the input string then it will halt in non-final state or go in an infinite loop and never halt.
Thus, ‘L’ is undecidable and recursively enumerable .
Please comment below if you find anything wrong in the above post.

Question 6 |

Which of the following problems is undecidable?

Deciding if a given context-free grammar is ambiguous. | |

Deciding if a given string is generated by a given context-free grammar. | |

Deciding if the language generated by a given context-free grammar is empty. | |

Deciding if the language generated by a given context-free grammar is finite. |

**Undecidability**

**GATE-CS-2014-(Set-3)**

**Discuss it**

Question 6 Explanation:

Context free grammar is

**not closed under ambiguity**.*A set is closed under an operation means when we operate an element of that set with that operator we get an element from that set.*Here, context free grammar generates a context free language and set of all context free languages is also a set.**But, ambiguity is not an operation and hence we can never say that CFG is closed under ambiguity.****Thus, problem mentioned in option (A) is undecidable.**Please comment below if you find anything wrong in the above post.Question 7 |

Consider three decision problems P1, P2 and P3. It is known that P1 is decidable and P2 is undecidable. Which one of the following is TRUE?

P3 is decidable if P1 is reducible to P3 | |

P3 is undecidable if P3 is reducible to P2 | |

P3 is undecidable if P2 is reducible to P3 | |

P3 is decidable if P3 is reducible to P2's complement |

**Undecidability**

**GATE-CS-2005**

**Discuss it**

Question 7 Explanation:

**Background:**In computational complexity theory, a decision problem has only two possible outputs yes or no. A decision problem is said to be decidable if there exists an effective method or algorithm that returns a correct yes/no answer to that problem. A decision problem is said to be undecidable if there does not exist a single algorithm that always lead to a correct yes/no solution. In terms of reducibility: A ≤

_{p}B denotes A is a decision problem that is reducible to B in polynomial time p. This simply means that A’s instance can be transformed into B’s instance and following the solution of B we can get a solution for the problem A. So here we can draw some conclusions:

1. If A ≤However the reverse is not true here as well i.e. if A ≤_{p}B and B is decidable then A is also decidable. This is because if there exists a specific algorithm for solving B and we can also reduce A to B then we can have a solution of A as well. Hence A is decidable. However the reverse is not true i.e. if A ≤_{p}B and A is decidable then B is also decidable because A can have an algorithm existing for its correct solution but might be the case that B does not. 2. If A ≤_{p}B and A is undecidable then B is also undecidable. This is because if A is undecidable even when it can be reduced to B that simply reflects even B cannot provide an algorithm by which we can solve B and hence A. So decision problem B is also undecidable.

_{p}B and B is undecidable then A is also undecidable because there might exist an algorithm for A that can provide a solution to A. Using the above stated conclusions we can say that option 1, 2 and 4 are false and option 3 is true.

Option 1: P1 ≤This explanation is contributed by_{p}P3 and given P1 is decidable gives no conclusion for P3. Option 2: P3 ≤_{p}P2 and given P2 is undecidable gives no conclusion for P3. Option 3: P2 ≤_{p}P3 and given P2 is undecidable gives conclusion for P3 to be undecidable. Option 4: P3 ≤_{p}P2’s complement and given P2 is undecidable therefore P2’s complement is also undecidable gives no conclusion for P3.

**Yashika Arora.**

**Visit the following articles to learn more:**undecidability-and-reducibility Wikipedia: Reduction_(Complexity)

Question 8 |

Consider two languages L1 and L2 each on the alphabet ∑. Let f : ∑ → ∑ be a polynomial time computable bijection such that (∀ x) [x ∈ L1 iff f(x) ∈ L2].
Further, let f

^{-1}be also polynomial time computable. Which of the following CANNOT be true?L1 ∈ P and L2 is finite | |

L1 ∈ NP and L2 ∈ P | |

L1 is undecidable and L2 is decidable | |

L1 is recursively enumerable and L2 is recursive |

**Undecidability**

**GATE-CS-2003**

**Discuss it**

Question 8 Explanation:

We have one to one mapping for all instances of L1 to L2.
L1 is given to be undecidable. Further L1 is polynomial time reducible to L2. (By given mapping). Now if L2 is decidable then there is algorithm to solve L2 in polytime. But then we can solve every instance of L1 in polytime, making L1 also decidable. Contradiction

Question 9 |

Consider the following problem X.

Given a Turing machine M over the input alphabet Σ, any state q of M And a word w∈Σ*, does the computation of M on w visit the state q?Which of the following statements about X is correct?

X is decidable | |

X is undecidable but partially decidable | |

X is undecidable and not even partially decidable | |

X is not a decision problem |

**Undecidability**

**GATE-CS-2001**

**Discuss it**

Question 9 Explanation:

This problem is a State Entry Problem. State entry problem can be reduced to halting problem.

We construct a turing machine M with final state ‘q’. We run a turing machine R (for state entry problem) with inputs : M, q, w .

We give ‘w’ as input to M.

If M halts in the final state ‘q’ then R accepts the input. So, the given problem is partially decidable. If M goes in an infinite loop then M can not output anything. So, R rejects the input. So, the given problem becomes undecidable.

Thus, option (B) is the answer.

Please comment below if you find anything wrong in the above post.

Question 10 |

Consider the following decision problems:

(P1) Does a given finite state machine accept a given string (P2) Does a given context free grammar generate an infinite number of stingsWhich of the following statements is true?

Both (P1) and (P2) are decidable | |

Neither (P1) nor (P2) are decidable
| |

Only (P1) is decidable | |

Only (P2) is decidable |

**Undecidability**

**GATE-CS-2000**

**Discuss it**

Question 10 Explanation:

- A finite state machine always halts in final or non-final state.Therefore, problem P1 is decidable.
- We check if the context free language generates any string of length between n and (2n – 1). If so, context free language is infinite else it is finite.Therefore, problem P2 is decidable.
**Thus, option (A) is correct.**Please comment below if you find anything wrong in the above post.

There are 20 questions to complete.