Which of the following correctly resembles the given state diagram?

Which of the following correctly resembles the given state diagram?
A. {ww$^{r}$|w=(a+b)*}
B. ε is called the initial stack symbol
C. All of the mentioned
D. None of the mentioned
 
Answer: A
Explanation: Initially we put a special symbol ‘#’ into the empty stack. At state q1, the w is being read. In state q2, each 0 or 1 is popped when it matches the input. If any other input is given, the PDA will go to a dead state. When we reach that special symbol ‘#’, we go to the accepting state q3.
 

Tìm kiếm

Back
Top