Take the 2-minute tour ×
Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. It's 100% free, no registration required.

I am struggling with this question for a very long time and just can't find the flaw. So I am given a false Theorem:

The language ${awwa \mid w \in {a,b}^* }% is regular.

Well, that part is obvious, we can prove it using the pumping lemma.

The question I am asked is to find the flaw in the "proof" for this theorem:

Let

$\qquad L_1 = \{ aw \mid w \in \{a,b\}^* \}$

$\qquad L_1^R = \{ aw \mid w \in \{a,b\}^* \}$

Let $L_2 = L_1 L_1^R = \{ awwa \mid w \in \{a,b\}^*\}$ be even-length palindromes that begin and end with an $a$. Since $L_1$ is regular, and the class of regular languages is closed under reversal and concatenation, we conclude $L_2$ is also regular.

Can you find the flaw? I could build a DFA for $L_1$ and $L_1^R$, so I know they are regular. And regular languages are closed under reversal and concatenation.

But, however, $L_2$ is still not regular, so where is the mistake in the "proof"?

share|improve this question
    
Try writing down some words from $L_1 \cdot L_1^R$ -- you'll notice quickly what's wrong. (Note that you can use LaTeX here to typeset mathematics in a more readable way. See here for a short introduction.) –  Raphael Feb 21 at 11:50

2 Answers 2

The concatenation of $L_1$ and $L_1^{\mathrm{R}}$ is not $\{awwa\mid w\in\{a,b\}^*\}$.

share|improve this answer
    
it's not? How come? –  user14896 Feb 21 at 1:42
1  
@user14896 What is the definition of the concatenation of two languages? –  David Richerby Feb 21 at 1:43

Remember that for some languages $L_1$, $L_2$, $LL = \{uv \;\colon\; u \in L_1,\;v \in L_2\}$. Back to your question, is it the case that for every $au \in L_1$ and $va \in L_1^R$ that $auva$ is an even length palindrome that begins and ends with $a$?

share|improve this answer
    
Ohhhh...I see! Thank you so much!!! –  user14896 Feb 21 at 2:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.