0
$\begingroup$

I had been asked to show that $(aba)^{∗}$ is FO-definable over the signature $\{Q_a, Q_b, <, S\}$.
But I read that "A language is first-order expressible iff it is star-free."

But clearly the language I have been asked about contains "*" (star). What am I missing? Which FO-formula $\phi$ captures the language such that the set of words satisfying the formula give me the language $(aba)^{∗}$?

Can a formula like this be given as a valid formula for the collection of words?

$(Q_a(0) \land Q_a(2) \land Q_a(3) \land Q_a(5) \land ... \land Q_a(n-1)) \land (Q_b(1) \land Q_b(4) \land Q_b(7) \land Q_b(10) \land ... \land Q_b(n-2)) \land (n = |S|)$

  • 0
    The expression at the end of your answer isn't a first-order expression - it's really one first-order expression *for each $n$*, which isn't the same thing at all.2017-02-14

1 Answers 1

1

Remember that a language is $*$-free if it has some definition not using Kleene's $*$. So just because one definition uses the $*$, doesn't mean the language isn't $*$-free.

It might help to start with an easier example: the language $(ab)^*$. This is first-order definable: we can write a sentence which says:

  • The first element is $a$,

  • The last element is $b$,

  • Every $a$ is followed by a $b$, and

  • Every $b$ is preceded by an $a$.

And we can come up with a $*$-free description of $(ab)^*$ (exercise).

Now, do you see a similar way to get a first-order definition of your language?

  • 0
    First element is $a$; Last element is $a$; Every $b$ is followed by and preceded by an $a$; Every $a$ is either followed by or preceded by a $b$. Is this fine?2017-02-14
  • 0
    @ShraddheyaShendre Almost - there's one slight twist: what you've written doesn't rule out "$ababa$". Do you see how to fix it?2017-02-14
  • 0
    .....Every $a$ is either followed by or preceded by a $b$ and not both followed and preceded by a $b$?2017-02-14
  • 0
    @ShraddheyaShendre Bingo, that's it. Now, you've already solved the problem, but: knowing this, can you construct a $*$-free definition of this language?2017-02-14
  • 0
    That's what I did right now, right? Or do you mean to say that I should now write the individual conditions formally in terms of FO logic?2017-02-14
  • 0
    @ShraddheyaShendre No, I mean you should write down a regular expression-style definition, without using Kleene's star. Like, something like $(\emptyset^caa\emptyset^c)^c$ - you know that one *exists*, since you provided a first-order definition of the language, but *constructing* one is a good exercise.2017-02-14
  • 0
    I am sorry but what does the $^{c}$ mean? I presume that by $\emptyset$ you meant the empty set.2017-02-14
  • 0
    @ShraddheyaShendre $^c$ means complement (and yes, $\emptyset$ means the emptyset). The expression I wrote defines the language "all strings not containing "aa""; see [the wiki page](https://en.wikipedia.org/wiki/Star-free_language) for a concrete definition of what a $*$-free language is. My point is that coming up with a $*$-free definition of your language is a good exercise in regular expressions.2017-02-14
  • 0
    For $(ab)^{*}$, is $\emptyset \cup (ab)^{+}$ a star-free definition?2017-02-15
  • 0
    @ShraddheyaShendre I don't think so - "$^+$" isn't included in the allowed symbols (Boolean combinations including complement, and concatenation).2017-02-15
  • 0
    HINT: Describe the language by some "requirements" - what does a string in it have to avoid, or include in a certain way? Then try to give a definition of the language as the *intersection* of the languages satisfying these requirements, individually. *(A useful trick is that "$(\emptyset^c\sigma\emptyset^c)^c$" is a $*$-free description of the language avoiding $\sigma$, for $\sigma$ a string . . .)*2017-02-15
  • 0
    For $(ab)^{*}$ - $((\emptyset ^ {c} aa \emptyset ^ {c})^{c} \cap (\emptyset ^ {c} bb \emptyset ^ {c})^{c} \cap (a \emptyset ^ {c}) \cap (\emptyset ^ {c} b))$. Is this correct?2017-02-15
  • 0
    @ShraddheyaShendre Yup, that's what I had in mind! Although note that you can combine the last two terms as "$(a\emptyset^cb)$".2017-02-15
  • 0
    Oh yes, that's right. And thanks for patiently walking me through all this. You have taught me a lot. :D2017-02-15
  • 0
    @ShraddheyaShendre My pleasure! (ARGH, actually it just occurred to me that we both screwed something up - the language we described *doesn't include the empty string* because of that last term or last two terms, so the right answer is that, union $\{\epsilon\}$. But this is a really minor point.)2017-02-15
  • 0
    Oh yeah. That's a good minor correction. Gotta be more careful with such nitpicky things.2017-02-15