HiveBrain v1.2.0
Get Started
← Back to all entries
patternModerate

Is the language given by the regex (ab)* star-free?

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
thestarfreelanguageregexgiven

Problem

I was reading about star-free languages recently and a common example of a non-star free language is the one given by (aa)*.
I was wondering if (ab)* would also work (for an alphabet of two symbols let's say).

Solution

No. $L=(ab)^*$ is star-free. A word is in $L$ iff

  • It starts with $a$ (or is empty)



  • It ends with $b$ (or is empty)



  • It does not contain any consecutive $a$'s



  • It does not contain any consecutive $b$'s



Each of those conditions can be represented by a star-free language. Indeed, condition 3 is the first example given on Wikipedia of a star-free language. Here are star-free regular expressions for each of those:

  • $(b\emptyset^c)^c$



  • $(\emptyset^c a)^c$



  • $(\emptyset^c aa \emptyset^c)^c$



  • $(\emptyset^c bb \emptyset^c)^c$



where $S^c$ denotes the complement of $S$.

Consequently,

$$L = (b\emptyset^c)^c \cap (\emptyset^c a)^c \cap (\emptyset^c aa \emptyset^c)^c \cap (\emptyset^c bb \emptyset^c)^c,$$

which is a star-free representation for $L$. Another equivalent representation is

$$L = (b\emptyset^c | \emptyset^c a | \emptyset^c aa \emptyset^c | \emptyset^c bb \emptyset^c)^c.$$

Context

StackExchange Computer Science Q#161967, answer score: 11

Revisions (0)

No revisions yet.