3
$\begingroup$

Wikipedia says, the context-free languages are closed under

the cyclic shift of $L$ (the language $\{vu : uv \in L \}$)

So I am looking for the definition of the cyclic shift operation on formal languages.

From the quote, what are required on $u$ and $v$? Are they in $L$, or in $alphabet(L)^*$? Thanks.

$\endgroup$
1
  • $\begingroup$ Also called cycle or conjugation. On cs.stackexchange the closure has been discussed for regular and for context-free languages. $\endgroup$ May 30, 2014 at 6:55

1 Answer 1

5
$\begingroup$

The cyclic shift of a language $L$ consists of all cyclic shifts of the words in $L$. Instead of defining the cyclic shift formally, let me give an example. The following are all cyclic shifts of the word monkey:

monkey onkeym nkeymo keymon eymonk ymonke

To see the connection with the definition, consider nkeymo. If we write monkey as mo concatenated with nkey and then switch both parts, we get nkeymo. This corresponds to setting u=mo and v=nkey in the definition above.

To answer your concrete question, $u,v \in \Sigma^*$. (The alphabet is usually denoted by $\Sigma$.)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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