Skip to content
Related Articles

Related Articles

GATE | GATE IT 2006 | Question 31
  • Last Updated : 02 May, 2016

Which of the following languages is accepted by a non-deterministic pushdown automaton (PDA) but NOT by a deterministic PDA?
(A) {anbncn ∣ n≥0}
(B) {albmcn ∣ l≠m or m≠n}
(C) {anbn ∣ n≥0}
(D) {ambn∣ m,n≥0}


Answer: (B)

Explanation:  

1. L = {a n b n c n |n >= 0} this is not a CFL, as there is no PDA that can derive this language.
Same can be proved using pumping lemma, as can be seen intuitively as well. [INCORRECT]

2. L = {a l b m c n |l! = m or m! = n} is union of two CFLs L1 = {a l b m c n |l! = m} and L2 =
{a l b m c n |m! = n} both having DPDA. Hence L is sure a CFL, thus it will have a DFA,
though not necessarily a deterministic one. L = {a n b n c n } and DPDA are closed under
complementation – thus if L is a DPDA then its complement should be a DPDA as well,
which is not true. Hence, L is accepted by a NPDA. [CORRECT]

3. L = {a n b n |n ≥ 0} can be derived from a deterministic PDA – push if current alphabet is a
and pop if it is b. Accept if stack is empty on the end of the string and reject otherwise. [INCORRECT]

4. L = {a n b m |n, m ≥ 0} is a regular language of the form a ∗ b ∗ , hence it has a DPDA. [INCORRECT]



 

Reference :

https://cs.wmich.edu/elise/courses/cs6800/DCFL.pptx

This solution is contributed by vineet purswani.

Quiz of this Question

sudo-gate-course

My Personal Notes arrow_drop_up
Recommended Articles
Page :