<p>Regular languages are closed under union, concatenation and star, so regular expressions under regular expressions describes regular languages. So, regex, that describe regex, that describe regex still describe family of regular languages, and you can continue that process as long, as you want.</p>

<p>Here, by «describe» I mean that first, you have just regex, like $(aa|b)^+ = R_0$  and regex $(a|bb)^+ = R_1$, than you describe regex level 1 like $(R_0R^*_1R_0)$, this regex describe languages  $(aa|b)^+(aa|b)^+$, $(aa|b)^+(a|bb)^+(aa|b)^+$, $(aa|b)^+(a|bb)^+(a|bb)^+(aa|b)^+$, …  and so on.</p>

<p>In other terms regex under regex can be described using composition operation. Let $L$ be a regular language under alphabet $\Sigma$ and $|\Sigma| = n$. Consider regular languages $L_{\sigma_1}, L_{\sigma_2}, \ldots, L_{\sigma_n}$  under some alphabet $\Delta$. So, for each word $w$ from $L$ we substitute letter $w[i] = \sigma_j$ by corresponding language $L_{\sigma_j}$, so $w = w[1]w[2]\ldots w[k] \to L_{w[1]}L_{w[2]}\ldots L_{w[k]} $  and union of all such languages, forms language $comp(L,L_1,\ldots,L_n)$. So, level of regex under regex is just number of composition operations, that were used. And regular languages are closed under composition-operation.</p>

<p>But there are some interesting results obtained by technique that's very closed to the one, that  you describe. I mean the $\delta-$operation. $\delta(L)$ is a such language, that every word from $\delta(L)$ yields by such tree, that every path in that tree lies in $L$. To learn more about it see the <a href="http://www.google.ru/url?sa=t&amp;rct=j&amp;q=delta%20operation%20regular%20languages%20indexed%20languages&amp;source=web&amp;cd=1&amp;ved=0CCEQFjAA&amp;url=http%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fdownload%3Bjsessionid%3D079DA590941B48E70C7B1132ACEF4816%3Fdoi%3D10.1.1.8.2989%26rep%3Drep1%26type%3Dps&amp;ei=qthxUP2GD8iC4gSIvIGwBQ&amp;usg=AFQjCNEe9bz0cGXoCa0QG6E_gwEsRhddog&amp;cad=rja" rel="nofollow">paper</a> .   </p>

CC BY-SA 3.0
2012-10-07T19:45:18.210Z
2012-10-07T19:45:18.210Z
Alexander Rubtsov
<p>I was reading about the <a href="http://en.wikipedia.org/wiki/Star_height_problem" rel="nofollow">Star Height Problem</a> and noticed that Eggan's family of regular expressions follows a simple pattern which can be described by a regular expression. My question is: are there any interesting results about regular expressions which describe families of regular expressions? Can this process be continued further, so you have a regex describing a family of regexes each of which in turn describes a family of regexes?
Just a thought.</p>

CC BY-SA 3.0
2012-10-08T15:04:33.570Z
What kind of description are you talking about? Both the Eggan and Dejean-Schützenberger families of REs have features that makes them non-regular (parentheses of unbounded depth; furthermore the indices in the Eggan case, and the growing a- and b-blocks in the D-S case).
Klaus Draeger
<fl.formal-languages><regular-language><regular-expressions>
Regular expressions of families of regular expressions
pseudosudo
# Regular expressions of families of regular expressions

(Asked by: username_0 on 2012-10-06)

I was reading about the [Star Height Problem](http://en.wikipedia.org/wiki/Star_height_problem) and noticed that Eggan's family of regular expressions follows a simple pattern which can be described by a regular expression. My question is: are there any interesting results about regular expressions which describe families of regular expressions? Can this process be continued further, so you have a regex describing a family of regexes each of which in turn describes a family of regexes?
Just a thought.

**Tags:** fl.formal-languages, regular-language, regular-expressions

> **Comments:**
> **username_1**: What kind of description are you talking about? Both the Eggan and Dejean-Schützenberger families of REs have features that makes them non-regular (parentheses of unbounded depth; furthermore the indices in the Eggan case, and the growing a- and b-blocks in the D-S case).  

---

## 1 answers

### Answer by username_2 on 2012-10-07. Score: 3

Regular languages are closed under union, concatenation and star, so regular expressions under regular expressions describes regular languages. So, regex, that describe regex, that describe regex still describe family of regular languages, and you can continue that process as long, as you want.

Here, by «describe» I mean that first, you have just regex, like $(aa|b)^+ = R\_0$ and regex $(a|bb)^+ = R\_1$, than you describe regex level 1 like $(R\_0R^\*\_1R\_0)$, this regex describe languages $(aa|b)^+(aa|b)^+$, $(aa|b)^+(a|bb)^+(aa|b)^+$, $(aa|b)^+(a|bb)^+(a|bb)^+(aa|b)^+$, … and so on.

In other terms regex under regex can be described using composition operation. Let $L$ be a regular language under alphabet $\Sigma$ and $|\Sigma| = n$. Consider regular languages $L\_{\sigma\_1}, L\_{\sigma\_2}, \ldots, L\_{\sigma\_n}$ under some alphabet $\Delta$. So, for each word $w$ from $L$ we substitute letter $w[i] = \sigma\_j$ by corresponding language $L\_{\sigma\_j}$, so $w = w[1]w[2]\ldots w[k] \to L\_{w[1]}L\_{w[2]}\ldots L\_{w[k]} $ and union of all such languages, forms language $comp(L,L\_1,\ldots,L\_n)$. So, level of regex under regex is just number of composition operations, that were used. And regular languages are closed under composition-operation.

But there are some interesting results obtained by technique that's very closed to the one, that you describe. I mean the $\delta-$operation. $\delta(L)$ is a such language, that every word from $\delta(L)$ yields by such tree, that every path in that tree lies in $L$. To learn more about it see the [paper](http://www.google.ru/url?sa=t&rct=j&q=delta%20operation%20regular%20languages%20indexed%20languages&source=web&cd=1&ved=0CCEQFjAA&url=http%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fdownload%3Bjsessionid%3D079DA590941B48E70C7B1132ACEF4816%3Fdoi%3D10.1.1.8.2989%26rep%3Drep1%26type%3Dps&ei=qthxUP2GD8iC4gSIvIGwBQ&usg=AFQjCNEe9bz0cGXoCa0QG6E_gwEsRhddog&cad=rja) .


---

