GATE | Gate IT 2005 | Question 38

Let P be a non-deterministic push-down automaton (NPDA) with exactly one state, q, and exactly one symbol, Z, in its stack alphabet. State q is both the starting as well as the accepting state of the PDA. The stack is initialized with one Z before the start of the operation of the PDA. Let the input alphabet of the PDA be Σ. Let L(P) be the language accepted by the PDA by reading a string and reaching its accepting state. Let N(P) be the language accepted by the PDA by reading a string and emptying its stack.
Which of the following statements is TRUE?

 
(A) L(P) is necessarily Σ* but N(P) is not necessarily Σ*
(B) N(P) is necessarily Σ* but L(P) is not necessarily Σ*
(C) Both L(P) and N(P) are necessarily Σ*
(D) Neither L(P) nor N(P) are necessarily Σ*


Answer: (D)

Explanation: The language L(P) accepted by the Push Down Automata (PDA) by reading string and reaching
its accepting state and the language N(P) accepted by the PDA by reading
a string and emptying a stack but it may be the case that the string has
a dead configuration over the transitions of the PDA i.e. PDA does not have
a transition for a particular alphabet or string. Hence it does not accept
all the strings over Σ*.

For example- Transitions for the PDA are as follows:
1. (q, a, Z) -> (q, aZ)
2. (q, b, Z) -> (q, bZ)
3. (q, a, a) -> (q, aa)
4. (q, a, b) -> (q, ab)
5. (q, b, a) -> (q, ba)
6. (q, null, Z) -> (q, Z)
7. (q, null ,a) -> (q, null)
8. (q, null, b) -> (q, null)

Here q is the initial and accepting state, Z is the initial stack symbol
and a and b are the input alphabets.Here {null, a, b, ab, aab………..} are
accepted in both the cases but in case of “bb” the PDA enters into a dead
configuration as no such transition is present. Hence neither L(P) nor N(P)
be necessarily Σ*.



This explanation has been contributed by Yashika Arora.

Quiz of this Question



My Personal Notes arrow_drop_up


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.