1
$\begingroup$

$$(ab^*a)^*$$ (a) Define this language in MSO
(b) Decide if this language is definable in first order logic

(b) It seems to be simple. We know that we can't distinguish in $n$ rounds (wit $n$ quantifiers) two linear order with length $2^{n}+1$ and $2^{n}+2$. These two order can be encoded to two words: $a^{2^{n}+1}$ and $2^{2^{n}+2}$. Then we use formula for words to distinguish these two words (becase exactly one of them belongs to langugage).

(a)I know that it may be said:

  • first consistent block of $a$ has odd length
  • last consistent block of $a$ has odd length
  • for each symbol $b$ there are exists two $a$ on the left and on the right
  • if between two consistent block of $b$ there are exists some symbol $a$ then there is even number of $a$ in this block

However, writing this as formula MSO is hard for me. Can you help me ?

2 Answers 2

0

You can use the following big hammers:

(1) MSO captures exactly the regular languages (Büchi).

(2) FO captures exactly the star-free languages (McNaughton). See also the more detailed page Langage sans étoile.

(3) A regular language is star-free if and only if its syntactic monoid is aperiodic (Schützenberger). Again, for the syntactic monoid, you can also look at the French version Monoïde syntaxique.

For your language $L = (ab^*a)^*$, the transitions of the minimal automaton are \begin{array} & &1 &2\\ a &2 &1\\ b &0 &2 \end{array} and the initial and unique final state is $1$. Its syntactic monoid has 7 elements: $M = \{1, a, b, ab, ba, aba, bab, 0\}$ and is presented by the relations $a^2 = 1$, $b^2 = b$, $bab = 0$. The fact that $a^2 = 1$ shows immediately that $M$ is not aperiodic, and hence $L$ is not $FO$-expressible.

To get a MSO-formula for $L$, you need to specify the properties of the set $X_q$ of positions of the word in which you are in state $q$ ($q = 1, 2$). The formula should be something like this, where of course, $\min$, $\max$ and $x+1$ should be rewritten with FO-formulas: \begin{align} \exists X_1 \ \exists X_2\ \ &X_1 \cap X_2 = \emptyset \wedge \forall x\ (x \in X_1 \vee x \in X_2)\\ &(\min \in X_1) \wedge (\max \in X_1) \wedge {}\\ &(x \in X_1 \wedge \mathbf{a}x) \to (x+1 \in X_2) \wedge {}\\ &(x \in X_2 \wedge \mathbf{a}x) \to (x+1 \in X_1) \wedge {} \\ &(x \in X_2 \wedge \mathbf{b}x) \to (x+1 \in X_2) \end{align}

  • 0
    I am going to parse your solution in a next hour and give you a sign about effect, but at this moment: What about my approach to (b) ? And what does it mean star free ? totally zero number of stars? When it comes to Buchi theorem I know it, @J.-E. Pin2017-02-18
  • 0
    See the links I provided for the definition of star-free.2017-02-18
  • 0
    Ahh ok, so only at this moment try to overthrow my approach to (b) please, however I am going to overthrow your solution!2017-02-18
  • 1
    I have some problems with "for each symbol $b$ there are exists two $a$ on the left and on the right". What about $abbba$?2017-02-18
  • 0
    But I ask for checking part (b)2017-02-18
  • 1
    Sorry. You can indeed show that the language is not first-order definable by using game-theoretic arguments.2017-02-18
  • 0
    So my argument works (for (b))?2017-02-18
  • 0
    So does it mean that general method is: find automat, translate it to MSO (for example - number of states = number of subsets, rules ~= transitions), yeah ? The question is: Is it importan to consider syntatic monoid to only translate regular expression to MSO2017-02-19
  • 0
    Can you help me here ? http://math.stackexchange.com/questions/2152224/write-formula-in-mso-expressing-that-graph-is-grid-many-variants Very important for me before exam (today :) )2017-02-20
0

Hint. Guess a subset of the $\mathtt a$s that you pretend are $\mathtt c$s instead, and recognize $(\mathtt a \mathtt b^* \mathtt c)^*$.

  • 0
    $(ab^*c)^*$ can be recognized in first order logic: $\forall_x [(a(x) \to b(x+1) \vee c(x+1)) \wedge (b(x)\to (b(x+1) \vee c(x+1)) \wedge (c(x) \to (a(x+1) \vee (\forall_y y\le x)))]$. $+1$ denotes next position. It means be expressed in first order logic using $\le$ (successor)2017-02-18
  • 0
    What about (b) ?2017-02-18
  • 0
    Indeed, the hint does not really help...2017-02-18
  • 0
    @J.-E.Pin Am I right that this language can be recognized by First order logic ? After all, it contains star!2017-02-18
  • 0
    @haskell-fun You are right, and this language is star-free, but is not so easy to give a star-free expression for it.2017-02-18
  • 0
    Ahh, ok in last years I did some things as flattening nested stars in regular expressions:)2017-02-18
  • 0
    This is a bit different for star-free expressions, since complementation is allowed.2017-02-18