In: Advanced Math
Show that {xx^R | x,y ∈ {0,1}*} is a context-free language.
Note that x^R is the reversal of x.
Show all work.
Question is for Discrete Math Structures
Note:
A push-down automaton for the non-regular language L = { wwR | w ∈ {0, 1} * }. The input alphabet is {0, 1}.
It is convenient to use a and b as stack symbols as well. So ∆ = {0, 1}
In the initial state, a string is read and put on the stack. At some point the PDA guesses to be half-way the input, right after the string w and before the string w^R. Therefore, the PDA can switch non-deterministically to the second state, where the stack items will be compared with the input one by one. Note that the stack will be read in reversed order now as a stack is last-in first-out. Termination takes place when the stack is empty again.
The PDA is drawn for Equation: