What is language of repeat(L) = {ww | w ∊ L} ?

My try:

I know it {ww | w ∊ (a,b)*} is context sensitive language. Here , what is meant by "repeat(L)" ? Can you explain it ? It is not a homework question.

  • 2
    $\begingroup$ The notation "repeat(L)" is defined in your question. $\endgroup$ Commented Aug 29, 2015 at 9:55
  • $\begingroup$ It's hard to tell from your question what your particular confusion is. I suggest that you edit the question to explain what you don't understand. You already wrote a definition of repeat(L); what about it is confusing? Do you know what the notation means? What are your thoughts -- if you had to guess what it means, what would your guess be? What possible meanings have you considered? What self-study have you done? You can find more tips about how to ask a good question here: cs.stackexchange.com/help/how-to-ask $\endgroup$
    – D.W.
    Commented Aug 30, 2015 at 4:03

1 Answer 1


$repeat(\cdot)$ is an operator on languages. It takes as an input a language $L$, and outputs a language defined by $\{ xx \mid x \in L\}$. That is, for any word $x\in L$ the string $xx$ will be in the output language $repeat(L)$.

A Few examples:

$L=\{ 0,00, 11\}$ => $repeat(L) = \{ 00,0000,1111\}$

$L=\{ \}$ => $repeat(L) = \{ \}$

$L=\Sigma^*=\{\epsilon,0,1,00,01,10,11,...\}$ => $repeat(L)= \{\epsilon, 00,11,0000,0101,1010,1111,...\}$


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