# Undecidability

Question 1 |

3 only | |

3 and 4 only | |

1, 2 and 3 only | |

2 and 3 only |

**GATE CS 2013**

**Undecidability**

**Discuss it**

- 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 3 |

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 |

**GATE CS 2008**

**Undecidability**

**Discuss it**

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

Question 4 |

Membership problem for CFGs | |

Ambiguity problem for CFGs. | |

Finiteness problem for FSAs. | |

Equivalence problem for FSAs. |

**GATE-CS-2007**

**Undecidability**

**Discuss it**

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 |

decidable and recursively enumerable | |

undecidable but recursively enumerable | |

undecidable and not recursively enumerable | |

decidable but not recursively enumerable |

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

**Undecidability**

**Discuss it**

Question 6 |

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. |

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

**Undecidability**

**Discuss it**

**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 |

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 |

**GATE-CS-2005**

**Undecidability**

**Discuss it**

**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 if 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 |

**GATE-CS-2003**

**Undecidability**

**Discuss it**

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 |

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 |

**GATE-CS-2001**

**Undecidability**

**Discuss it**

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 strings

Which 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 |

**GATE-CS-2000**

**Undecidability**

**Discuss it**

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.