Question: Let's construct a nondeterministic pushdown automaton M = ( , , Q , , q ) that accepts the set Lsube { 0 , 1

Let's construct a nondeterministic pushdown automaton M=(,,Q,,q) that accepts the set Lsube{0,1}** of all binary palindromes with an even length. Palindrome is a string that reads the same backward as forward, e.g.,"1001". So L={wwR|win{0,1}**}, where wR is the reverse of w.
We have tape alphabet ={0,1}, stack alphabet ={$,0,1}, and state set Q={q,q1}.
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 q1 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 q1 when we are at state q and read a symbol from the tape.
2/7
CS3240 Assignment 2
Yiming Zhao
When we are at state q1, 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.
q00qR00
q00q1R00
q01qR10
q01q1R10
q0$qR$0
q0$q1R$0
q10qR01
q10q1R01
q11qR11
q11q1R11
q1$qR$1
q1$q1R$1
q1qN1
q100q1Rlon
q101q1N1
q10$q1N$
q110q1N0
q11$q1N$
q10q1N0
q11q1N1
Let's construct a nondeterministic pushdown

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!