Question: Let s construct a nondeterministic pushdown automaton M = ( , , Q , , q ) that accepts the set L { 0 ,
Lets construct a nondeterministic pushdown automaton M Q q that accepts the set L of all binary palindromes with an even length. Palindrome is a string that reads the same backward as forward, eg So L wwRw in where wR is the reverse of w
We have the tape alphabet stack alphabet $ and the state set Q q q
Since we only care about binary palindromes with an even length, the idea is to maintain two states where the first state q which is also the start state means we are scanning the first half of the input string and the second state q means we are scanning the second half of the input string. We push every symbol read from the tape into the stack when we are at state q We use the nondeterminism to guess the middle of the input string. So we also switch to the other state q when we are at state q and read a symbol from the tape.
When we are at state q we check whether the current symbol read from the tape is the same as the symbol on the top of the stack. If so we keep moving the tape head and pop up the top element of the stack. Otherwise, we have a mismatch and reject the input.
The transition function is specified by the following instructions. But some instructions are missing. Please complete this machine by adding those missing transitions. Please just use the notation defined above.
q q R
q q R
q q R
q q R
q $ q R$
q $ q R$
q q R
q q R
q q R
q q R
q $ q R$
q $ q R$
q q N
q q R
q q N
q$ q N$
q q N
q$ q N$
q q N
q q N
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
