## Exercise ‹4›:

Context-free description for $\{ \mathtt{intercal}(w_1,w_2) \mid w_1,w_2\in\{a,b\}^*\;\wedge\;|w_1|=|w_2|\;\wedge\;w_1=w_1^R\;\wedge\;|w_2|_{aa}=0 \}$,
where $\mathtt{intercal}(a_1w_1,\ldots,a_nw_n)=a_1\ldots a_n\mathtt{intercal}(w_1,\ldots,w_n)$ and $\mathtt{intercal}(\lambda,\ldots,\lambda)=\lambda$
Give a context-free description for the set of words obtained by intercaling two words $w_1,w_2$ over $\{a,b\}$ with the same length, where $w_1$ is palindromic and with no occurrences of $aa$ in $w_2$.

Intercaling $n$ words $w_1,\ldots,w_n$ over $\{a,b\}$ and with the same length gives as result a word whose sequence of symbols is: the first symbol of $w_1$, the first symbol of $w_2$, …, the first symbol of $w_n$, the second symbol of $w_1$, the second symbol of $w_2$, …, the second symbol of $w_n$, the third symbol of $w_1$, and so on.
Authors: Guillem Godoy / Documentation:
 main { // Write here your context-free description... } To be able to submit you need to either log in, register, or become a guest.