• retagged by
9,607 views
27 27 votes

Let $Q=\left( \left\{q_1,q_2 \right\}, \left\{a,b\right \}, \left\{a,b,\bot \right\}, \delta, \bot, \phi \right)$ be a pushdown automaton accepting by empty stack for the language which is the set of all nonempty even palindromes over the set $\left\{a,b\right\}$. Below is an incomplete specification of the transitions $\delta$. Complete the specification. The top of the stack is assumed to be at the right end of the string representing stack contents.

  1. $\delta(q_1,a,\bot) = \left\{(q_1, \bot a)\right\}$ 
  2. $\delta(q_1,b,\bot) = \left\{(q_1, \bot b)\right\}$ 
  3. $\delta(q_1,a,a) = \left\{(q_1, aa)\right\}$ 
  4. $\delta(q_1,b,a) = \left\{(q_1, ab)\right\}$ 
  5. $\delta(q_1,a,b) = \left\{(q_1, ba)\right\}$ 
  6. $\delta(q_1,b,b) = \left\{(q_1, bb)\right\}$ 
  7. $\delta(q_1,a,a) = \left\{(\dots, \dots)\right\}$ 
  8. $\delta(q_1,b,b) = \left\{(\dots, \dots)\right\}$ 
  9. $\delta(q_2,a,a) = \left\{(q_2, \epsilon)\right\}$ 
  10. $\delta(q_2,b,b) = \left\{(q_2, \epsilon)\right\}$ 
  11. $\delta(q_2,\epsilon,\bot) = \left\{(q_2, \epsilon)\right\}$ 

2 Answers

Best answer
40 40 votes
$\delta(q_1,a,b) = \left\{(q_2, ba)\right\}$ means from state $q_1$ on input $a$ with stack top being $b$, the PDA moves to state $q_2$ and pushes $a$ on top of stack.

So, here the missing transitions are at the middle of the input string:

$\delta(q_1,a,a) = \left\{(q_2, \epsilon)\right\}$
$\delta(q_1,b,b) = \left\{(q_2, \epsilon)\right\}$

Once middle is reached, now we should start popping. And so, we must go to state $q_2$ as well as pop the previous character on the stack. (The character before and after the middle must be same as the string is even length palindrome)

(This is a non-deterministic PDA)
• selected by
15 15 votes


This is NPDA

Position:
Show:

Related questions

52 52 votes
2 answers 2 answers
14.8k
14.8k views
Kathleen asked Oct 9, 2014
14,766 views
Given below are the transition diagrams for two finite state machines $M_1$ and $M_2$ recognizing languages $L_1$ and $L_2$ respectively.Display the transition diagram fo...
12 12 votes
1 answers 1 answer
4.2k
4.2k views
go_editor asked Feb 10, 2018
4,216 views
Consider the synchronous sequential circuit in the below figureGiven that the initial state of the circuit is $S_4,$ identify the set of states, which are not reachable.
25 25 votes
4 answers 4 answers
10.0k
10.0k views
Kathleen asked Oct 9, 2014
10,037 views
Consider the synchronous sequential circuit in the below figureDraw a state diagram, which is implemented by the circuit. Use the following names for the states correspon...
47 47 votes
3 answers 3 answers
15.5k
15.5k views
Kathleen asked Oct 9, 2014
15,474 views
A file system with a one-level directory structure is implemented on a disk with disk block size of $4K$ bytes. The disk is used as follows:$$\begin{array}{|l|}\hline \te...