Let $L = w_1w_2$ where $|w_1| = |w_2|$ and both $w_1$ and $w_2$ have odd number of $1$'s. What is the PDA for this language?
I wrote the CFG for this but still can't figure out how to draw the PDA.
$$\begin{align*} S&\to 0S0\mid 0X1\mid 1Y0\mid 1Z1\\ X&\to 0X0\mid 0S1\mid 1Z0\mid 1Y1\\ Y&\to 0Y0\mid 0Z1\mid 1S0\mid 1X1\\ Z&\to 0Z0\mid 0Y1\mid 1X0\mid 1S1\mid \epsilon \end{align*}$$
HINT: Make it nondeterministic. Use the stack to keep track of how many characters have been read, and use states to keep track of whether they include an odd or an even number of $1$s. At any point at which an odd number of $1$s have been read, give it the option of shifting into a ‘second half’ mode in which it pops the stack to see whether the remainder of the input is the same length as the part already read and keeps track of the parity of the number of $1$s in the remainder of the input. The idea is to let it try to break the string in two at any point at which it has read an odd number of $1$s; if the word is in $L$, one of those computational paths will succeed.