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 that accepts the set Lsube of all binary palindromes with an even length. Palindrome is a string that reads the same backward as forward, eg So where is the reverse of
We have tape alphabet stack alphabet $ and state set
Since we only care about binary palindromes with an even length, the idea is to maintain two states where the first state which is also the start state means we are scanning the first half of the input string and the second state 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 We use the nondeterminism to guess the middle of the input string. So we also switch to the other state when we are at state and read a symbol from the tape.
CS Assignment
Yiming Zhao
When we are at state 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.
$$
$$
$$
$$
$$
$$
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
