Design a context free grammar and PDA for the following language.
$$\Sigma = \{0,1\},\qquad L = \left\{uv \mid u \in \sum^{*} \;v\in \sum^{*}1\sum^{*} \text{ with }|u| \geq |v| \right\}$$
I'm not sure how to approach this problem, especially the CFG part. Can anyone tell me how to solve it?
I will give my intuition of the problem. A formal proof is not much harder to produce.
Since we want $|u| \ge |v|$, we can always push the first $\Sigma^*$ part of $v$ into $u$. This does not alter $uv$, but it increases $|u|$ and decreases $|v|$, making $|u| - |v|$ greater. This simplifies the language a little bit:
$$ L = \left\{uv \mid u \in \Sigma^*, v \in 1\Sigma^*, |u| \ge |v|\right\} $$
So, you can start with $01$ or $11$, which are the only two shortest strings of $L$. Then you build it up by adding things to the front and to the back, but you retain the inequality $|u| \ge |v|$ by not adding anything to the back ($v$) if nothing is added to the front ($u$). This gives the following CFG:
\begin{align} L & \to 01 \\ L & \to 11 \\ L & \to 0L \\ L & \to 1L \\ L & \to 0L0 \\ L & \to 0L1 \\ L & \to 1L0 \\ L & \to 1L1 \\ \end{align}