Consider the language L = {$w^R w$ | $w \in \{a,b\}^* $} - why is this not regular?
I'm very new to the idea of formal languages and computer science, so I've likely missed something basic. However, my thoughts on this are as follows - I recently learned two things relevant to my question: 1) that the concatenation of two regular expressions is also regular 2) That if a language is regular, the reverse of its strings is also regular.
Now, granted $w^R$ nor $w$ are not regular expressions, but since each on their own would be a regular language (given that $\{w\}$ is regular, and so through 2 so is $\{w^R\}$), each can be written as a reg expression. Concatenating these two expressions together then, as the two terms in L are concatenated together, yields a new regular expression.
If a regular expression can be generated for L, why is L not regular?
I know that you can show via e.g. the pumping lemma how L is non regular, but could you show me where I've gone wrong in my reasoning above (probably many places), as my goal is to properly understand the concepts?
Many thanks, indeed! Really appreciate it.
Hint. Suppose that $L$ is regular. Since regular languages are closed under intersection, then $L \cap a^*bba^* = \{a^nbba^n \mid n \geqslant 0 \}$ should be regular.