8

Question

Let $L$ be a regular language. Let's say we sort $L$ by length and then lexicographically; then let $L_p \subset L$ be every $p$th word in $L$ according to this sort. Is $L_p$ regular as well?

Example

For example, let's use $L = a^*b^* = \{\epsilon, a, b, aa, ab, bb, aaa, aab, abb, ...\}$. Then $L_2 = \{\epsilon, b, ab, aaa, abb, aaaa, aabb, bbbb, ...\}$, which is a regular language: $$L_2 = (aaaa)^*((\epsilon + b) + a(b + bb)+aa(bb+bbb)+aaa(bbb+\epsilon))(bbbb)^*$$

Put another way, $L_2 = \{a^mb^n \mid n = m \lor n = m+1 \mod 4\}$.

Jake
  • 378
  • 1
  • 9

1 Answers1

7

The answer is yes: Theorem 4 in "Numeration systems on a regular language" (Leconte and Rigo) shows that any arithmetic progression in a regular language is regular.

Jake
  • 378
  • 1
  • 9