Büchi–Elgot–Trakhtenbrot theorem

From HandWiki
Short description: Formal language theorem

In formal language theory, the Büchi–Elgot–Trakhtenbrot theorem states that a language is regular if and only if it can be defined by a formula in monadic second-order logic (MSO). The theorem is due to Julius Richard Büchi,[1] Calvin Elgot,[2] and Boris Trakhtenbrot.[3][4]

Since a language is regular if and only if it can be defined as the accepted language of a finite-state automaton, a more precise statement of the theorem is that for every MSO formula defining a formal language, we can find a finite-state automaton defining the same language, and for every finite-state automaton, we can find an MSO formula defining the same language.

Examples

Regular languages are usually described by regular expressions. For instance, (ab)* represents the regular language of words where the pattern ab is repeated:

ϵ,ab,abab,ababab,abababab,…

The same language is represented by the following monadic second-order logic formula (in this case a first-order logic formula). The variables represent word indices (positions), and the predicate S(x,y) denotes the successor relation y=x+1.

(∃x∀y¬S(y,x)∧a(x))∧(∃x∀y¬S(x,y)∧b(x))∧(∀x∀y(S(x,y)∧a(x))→b(y))∧(∀x∀y(S(x,y)∧b(x))→a(y))

In words:

  • There is a position x which is the beginning of the word and has letter a.
  • There is a position x which is the end of the word and has letter b.
  • Any position following a letter a must have letter b.
  • Any position following a letter b must have letter a.

A second example is the regular expression (aa)*. This language cannot be expressed in first-order logic and needs the second-order quantification of MSO. We introduce an EVEN predicate that is exactly true on positions that are even. The following MSO formula says that all letters are a, that EVEN is true at every even index, and that EVEN is true at the ending position.

(∀xa(x))∧∃EVEN(∃x∀y¬S(y,x)∧¬EVEN(x))∧(∃x∀y¬S(x,y)∧EVEN(x))∧(∀x∀y(S(x,y)∧EVEN(x))→¬EVEN(y))∧(∀x∀y(S(x,y)∧¬EVEN(x))→EVEN(y))

Setup

Let Σ be a finite nonempty set, called the alphabet. A formal language is a subset of Σ*, the set of finite-length strings formed by elements of Σ. A language is regular if and only if it is accepted by a finite-state automaton.

In order to define languages using logical formulas, we need the following logical formalism. Other than the first-order logic symbols, it also has the following predicates:

  • The equality relation =.
  • One monadic relation Qa per letter a∈Σ, where Qa(x) means "location x contains letter a".
  • The successor relation S(x,y), meaning "location x is immediately followed by location y".
    • Since in MSO logic we can quantify over all monadic predicates, the successor relation can be used to define an ordering relation x<y as the transitive closure of S(x,y):¬x=y∧∀X(X(x)∧∀z,z′(X(z)∧S(z,z′)→X(z′))→X(y))This construction is similar to the induction principle in Peano arithmetic.

With this formalism, one can characterize a language by a single MSO formula σ. Specifically, σ defines the set Lσ:={w∈Σ*:Mw⊨σ}. In this definition, to each word w∈Σ*, we define a finite model Mw with the following conditions:

  • The universe of Mw is {1,2,…,|w|}.
  • For each n∈{1,2,…,|w|}, we have Mw⊨Qa(n) if and only if wn=a.
  • For each n,m∈{1,2,…,|w|}, we have Mw⊨S(n,m) if and only if m=n+1.

Any such language Lσ is said to be MSO-expressible.

Theorem statement

A language L⊆Σ* is regular iff it is MSO-expressible.

Proof overview

Regular implies MSO-expressible

Given a regular language L, it is specified by a finite-state automaton with k states. Then, one constructs a MSO formula of the form ∃X1,…,Xk,ϕ(X1,…,Xk). Here, each Xi is supposed to be interpreted as the set of locations at which the automaton is at state i. The formula ϕ(X1,…,Xk) then expresses the following:

  • Any location belongs to exactly one of X1,…,Xk, and
  • the state transition at each location follows the automaton's edge rules, and
  • the last location is in one of the accepting states.

More concretely, we can construct the formula as a conjunction of the following:

  • ∀x,⋁i:1≤i≤n(Xi(x)∧⋀j:j≠i,1≤j≤n¬Xj(x)).
  • ∀x,y,S(x,y)→⋁i:1≤i≤n,a∈ΣXi(x)∧Qa(x)∧XA(i,a)(y), where we use A(i,a) to mean: the state you arrive at, if you start at state i on the automaton and follow the edge for letter a.
    • In this part, we assume that the automaton is deterministic. This can be generalized easily to the nondeterministic case.
  • ∀x(¬∃yS(x,y))→⋁a∈accepting statesQa(x).

MSO-expressible implies regular

Conversely, to show that each MSO formula defines a language that is regular, it suffices to induct over the syntax of MSO formulas. This boils down to induction over ¬,∧, and existential quantification over monadic predicates. These correspond to complement, intersection, and projection (a restricted kind of homomorphism). The set of regular languages over Σ is closed under complement, intersection, and projection.[5]

See also

References

  1. ↑ Büchi, Julius Richard (1960). "Weak second order arithmetic and finite automata". Zeitschrift für Mathematische Logik und Grundlagen der Mathematik 6 (1–6): 66–92. doi:10.1002/malq.19600060105. 
  2. ↑ Elgot, Calvin C. (1961). "Decision problems of finite automata design and related arithmetics". Transactions of the American Mathematical Society 98: 21–52. doi:10.1090/S0002-9947-1961-0139530-9. 
  3. ↑ Trakhtenbrot, Boris A. (1962). "Конечные автоматы и логика одноместных предикатов" (in Russian). Siberian Mathematical Journal 3: 103–131. 
  4. ↑ Trakhtenbrot, Boris A. (1966). "Finite automata and the logic of one-place predicates". American Mathematical Society Translations. American Mathematical Society Translations: Series 2 59: 23–55. doi:10.1090/trans2/059/02. ISBN 9780821817599. 
  5. ↑ Thomas, Wolfgang (1997), "Languages, Automata, and Logic", in Rozenberg, Grzegorz; Salomaa, Arto (in en), Handbook of Formal Languages, Berlin, Heidelberg: Springer Berlin Heidelberg, pp. 389–455, doi:10.1007/978-3-642-59126-6_7, ISBN 978-3-642-63859-6, https://link.springer.com/10.1007/978-3-642-59126-6_7