## Decidability-and-Undecidability

 Question 1
Consider the following problems. L(G) denotes the language generated by a grammar G. L(M) denotes the language accepted by a machine M.
(I) For an unrestricted grammar G and a string w, whether w∈L(G)
(II) Given a Turing machine M, whether L(M) is regular
(III) Given two grammar G1 and G2 whether L(G1) = L(G2)
(IV) Given an NFA N, whether there is a deterministic PDA P such that N and P accept the same language
Which one of the following statement is correct?
 A Only I and II are undecidable B Only III is undecidable C Only II and IV are undecidable D Only I, II and III are undecidable
Theory-of-Computation       Decidability-and-Undecidability       GATE 2018       Video-Explanation
Question 1 Explanation:
IV is trivial property, as every regular language is CFL also, so a language which has NFA must be regular and for every regular language we can have a deterministic PDA (as every regular language is DCFL).
I, II and III is undecidable.
 Question 2
Let L(R) be the language represented by regular expression R. Let L(G) be the language generated by a context free grammar G. Let L(M) be the language accepted by a Turing machine M.
Which of the following decision problems are undecidable?
I. Given a regular expression R and a string w, is w ∈ L(R)?
II. Given a context-free grammar G, is L(G) = ∅?
III. Given a context-free grammar G, is L(G) = Σ* for some alphabet Σ?
IV. Given a Turing machine M and a string w, is w ∈ L(M)?
 A I and IV only B II and III only C II, III and IV only D III and IV only
Theory-of-Computation       Decidability-and-Undecidability       GATE 2017 [Set-2]       Video-Explanation
Question 2 Explanation:
Since membership problem for regular language is decidable, so I is decidable.
Emptiness problem for Context free language is decidable, so II is decidable.
Completeness problem (i.e. L(G) = Σ* for a CFG G) is undecidable.
Membership problem for recursive enumerable language (as language of Turing Machine is recursive enumerable) is undecidable.
So IV is undecidable.
 Question 3
Which of the following decision problems are undecidable?
I. Given NFAs N1 and N2, is L(N1)∩L(N2)= Φ?
II. Given a CFG G = (N,Σ,P,S) and a string x ∈ Σ*, does x ∈ L(G)?
III. Given CFGs G and G2, is L(G1) = L(G2)?
IV. Given a TM M, is L(M) = Φ?
 A I and IV only B II and III only C III and IV only D II and IV only
Theory-of-Computation       Decidability-and-Undecidability       GATE 2016 [Set-1]       Video-Explanation
Question 3 Explanation:
Statement I is decidable, as we can make product automata by using N1 and N2 and can decide whether the resulting Product automata’s language is phi or not.
Statement II is decidable, as for CFG we have membership algorithm, hence it is decidable.
But for problems in statement III and IV, there doesn’t exist any algorithm which can decide it.
 Question 4

Consider the following statements:

I. The complement of every Turning decidable language is Turning decidable
II. There exists some language which is in NP but is not Turing decidable
III. If L is a language in NP, L is Turing decidable

Which of the above statements is/are True?

 A Only II B Only III C Only I and II D Only I and III
Theory-of-Computation       Decidability-and-Undecidability       GATE 2015 [Set-2]
Question 4 Explanation:
I. True.
Turing decidable language are recursive language which is closed under complementation.
II. False.
All language which is in NP are turing decidable.
III. True.
 Question 5

Let Σ be a finite non-empty alphabet and let 2Σ* be the power set of Σ*. Which one of the following is TRUE?

 A Both 2Σ* and Σ* are countable B 2Σ* is countable and Σ* is uncountable C 2Σ* is uncountable and Σ* is countable D Both 2Σ* and Σ* are uncountable
Theory-of-Computation       Decidability-and-Undecidability       GATE 2014 [Set-3]
Question 5 Explanation:
If = {0,1} then Σ* = {ϵ, 0, 1, 00, 01, 10, 11, 000, ...............}
Since we can enumerate all the strings of Σ*, hence Σ* is countable (countable infinite).
While 2Σ* is uncountable, it has been already proved by using Diagonalization method.
 Question 6

Which of the following problems are decidable?

1) Does a given program ever produce an output?

2) If L is a context-free language, then, is also context-free?

3) If L is a regular language, then, is also regular?

4) If L is a recursive language, then, is also recursive?

 A 1, 2, 3, 4 B 1, 2 C 2, 3, 4 D 3, 4
Theory-of-Computation       Decidability-and-Undecidability       GATE 2012
Question 6 Explanation:
The statement “Does a given program ever produce an output?” is same as the statement “Does a Turing Machine will halt for any arbitrary string?”, which is nothing but the “halting problem of Turing Machine”, hence statement 1 is undecidable.
Context free languages are not closed under complement operation, so compliment of CFL may or may not be CFL. Hence statement 2 is also undecidable.
Complement of Regular languages is also regular. Since a DFA that accepts the complement of L, i.e. ∑* – L, can be obtained by swapping its final states with its non-final states and vice-versa. Hence it is decidable and if L is a regular language, then, L must also be regular.
Recursive languages are closed under complement, so if L is a recursive language then L must also be recursive, hence it is decidable.
 Question 7

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
 A I and II B I and IV C II and III D II and IV
Theory-of-Computation       Decidability-and-Undecidability       GATE 2008
Question 7 Explanation:
The intersection of two regular languages is always a regular language (by closure property of regular language) and testing infiniteness of regular language is decidable. Hence statement I is decidable.
Statement IV is also decidable, we need to check that whether the given grammar satisfies the CFG rule (TYPE 2 grammar productions).
But statements II and III are undecidable, as there doesn’t exist any algorithm to check whether a given context-free language is regular and whether two push-down automata accept the same language.
There are 7 questions to complete.

Register Now