Consider the NPDA ?Q = {q0, q1, q2}, ? = {0, 1}, ? = {0, 1, ?}, ?, q0, ?, F = {q2}?, where (as per usual convention) Q is the set of states, ? is the input alphabet, ? is stack alphabet, ? is the state transition function, q0 is the initial state, ? is the initial stack symbol, and F is the set of accepting states, The state transition is as followingWhich one of the following sequences must follow the string 101100 so that the overall string is accepted by the automaton?
Correct Answer: B
In q0 state for '1', a '1' is pushed and for a '0' a '0' is pushed. In q1 state, for a '0' a '1' is popped and for a '1' a '0' is popped. So, the given PDA is accepting all strings of of the form x0x'r or x1x'r or xx'r, where x'r is the reverse of the 1's complement of x. The given string 101100 has 6 letters and we are given 5 letter strings. So, x0 is done, with x = 10110. So, x'r = (01001)r = 10010. Hence option B is correct.
Let LD be the set of all languages accepted by a PDA by final state and LF the set of all languages accepted by empty stack. Which of the following is true?