my-server
← Wiki

Cyclic language

In computer science, more particularly in formal language theory, a cyclic language is a set of strings that is closed with respect to repetition, root, and cyclic shift.

Definition

If A is a set of symbols, and A<sup>*</sup> is the set of all strings built from symbols in A, then a string set L ⊆ A<sup>*</sup> is called a formal language over the alphabet A. The language L is called cyclic if

  1. ∀w∈A<sup>*</sup>. ∀n>0. w ∈ L ⇔ w<sup>n</sup> ∈ L, and
  2. ∀v,w∈A<sup>*</sup>. vw ∈ L ⇔ wv ∈ L,

where w<sup>n</sup> denotes the n-fold repetition of the string w, and vw denotes the concatenation of the strings v and w.

Examples

For example, using the alphabet A = {a, b }, the language

is cyclic, but not regular. However, L is context-free, since M = { a<sup>n<sub>1</sub></sup>b<sup>n<sub>1</sub></sup> a<sup>n<sub>2</sub></sup>b<sup>n<sub>2</sub></sup> ... a<sup>n<sub>k</sub></sup> b<sup>n<sub>k</sub></sup> : n<sub>i</sub> ≥ 0 } is, and context-free languages are closed under circular shift; L is obtained as circular shift of M.

References