An Algebraic Generalization of the Chomsky-Sch¨ utzenberger-Theorem Hans Leiß leiss@cis.uni-muenchen.de extending work by/joint with Mark Hopkins 2017 retired from: Universit¨ at M¨ unchen Centrum f¨ ur Informations- und Sprachverarbeitung Oberseminar Theoretische Informatik, LMU, 10.5. 2019 Oberseminar Mathematische Logik, LMU, 22.5. 2019 1 / 57
Plan ◮ Algebraic generalization of formal language theory: itempotent semirings D with sums � U of suitable subsets U ⊆ D : R D = regular subsets , C D = context-free subsets , etc. ◮ The Chomsky-Sch¨ utzenberger-Theorem: how to obtain C X ∗ from R ( X ∪ ∆) ∗ and a single language Dyck ∈ C ( X ∪ ∆) ∗ ◮ Quotients and tensor products: R M ⊗ R R ∆ ∗ /ρ ◮ A generalization of the CST for arbitrary monoids C M = Q ( R M ) = Z 2 ( R M ⊗ R R ∆ ∗ /ρ ) i.e. C M is an algebraic function of R M . ◮ Useful to name L ∈ C X ∗ by regular expressions over X ∪ ∆. 2 / 57
Reminder: Formal Language Theory for free monoid X ∗ language family set X Construction Automaton recognizing { w ∈ X ∗ | w ∈ L } of L ⊆ X ∗ by finite F X ∗ ∅ , { x } , ∪ , · Finite finite dir.acyclic graph R X ∗ ∅ , { x } , ∪ , · , ∗ Regular finite automaton C X ∗ ∅ , { x } , ∪ , · , µ Context-free push-down automaton S X ∗ Context-sensitive . . . linearly bounded TM T X ∗ Rec. enumerable . . . Turing machine (TM) P X ∗ Arbitrary languages . . . — Construction more precisely: ◮ elementwise product: A · B = { a · b | a ∈ A , b ∈ B } ◮ iteration: A ∗ = � { A n | n ∈ N } , A 0 = { 1 } , A n +1 = A · A n z ] and ¯ z ) ∈ X ∗ [ y , ¯ A ∈ ( C X ∗ ) m , ◮ recursion: for polynomial p ( y , ¯ A ) in P X ∗ is in C X ∗ the least solution µ yp (¯ A ) of y ⊇ p ( y , ¯ Chomsky-hierarchy: F X ∗ ⊂ R X ∗ ⊂ C X ∗ ⊂ S X ∗ ⊂ T X ∗ ⊂ P X ∗ 3 / 57
Algebraization of Formal Language Theory We work with the category of monoids ( M , · , 1) and homomorphisms, M the category of dioids ( D , + , · , 0 , 1) (= idempotent semirings) D and semiring homomorphisms. the category of partially ordered monoids ( M , · , 1 , ≤ ) and M ≤ monotone homomorphisms. Each dioid D implicitly has a partial order ≤ defined by d ≤ d ′ ⇐ ⇒ d + d ′ = d ′ . The power-set functor P : M → D assigns to a monoid M a dioid P M = ( |P M | , ∪ , · , ∅ , { 1 } ) , where A · B := { a · b | a ∈ A , b ∈ B } , and to each homomorphism f : M → N a dioid-homomorphism P f = λ A { f ( a ) | a ∈ A } : P M → P N . 4 / 57
A monadic opertor A (Hopkins 2008) is a subfunctor of the power-set functor P : M → D that satisfies, for each monoid M , A 0 A M is a set of subsets of M : A M ⊆ P M , A 1 A M contains each finite subset of M : F M ⊆ A M , A 2 A M is closed under product (hence a monoid), A 3 A M is closed under union of sets from AA M (hence a dioid), A 4 A preserves homomorphisms: if f : M → N is a homo- morphism, so is A f := λ U { f ( u ) | u ∈ U } : A M → A N . We say A ≤ A ′ iff A M ⊆ A ′ M for each monoid M . Theorem (Hopkins 2008) F ≤ R ≤ C ≤ T ≤ P are monadic operators. ( S is not: A 4 ) 5 / 57
Remark A monadic operator A is the left adjoint of an adjunction ( A , � A , η, ǫ ) : M → D A between M and a category D A ⊆ D , where � A : D A → M is the forgetful functor, and if M ∈ M , D ∈ D A , ◮ ◮ η M : M → A M is m �→ { m } , ǫ D : A D → D is U �→ � U . This adjunction gives rise to a monad T A = ( � A ◦ A , η, µ ) in M , an endofunctor T = � A ◦ A : M → M , where ◮ the unit η : I → T maps m ∈ M to { m } ∈ A M , ◮ the product µ : TT → T maps U ∈ AA M to � U ∈ A M . � A is called a monadic functor in category theory. D A ≃ M T , the Eilenberg-Moore category of T -algebras ( D , � D ). 6 / 57
The category D A ⊆ D of A -dioids For a partial order M , by x > X means x is an upper bound of X . A map f : M → N between partially ordered monoids M , N is A -continuous, if for all U ∈ A M and n > ( A f )( U ) there is some m > U with n ≥ f ( m ). An A -morphism is an A -continuous monotone homomorphism. An A -dioid is a partially ordered monoid M = ( M , · , 1 , ≤ ) which is ◮ A -complete: every U ∈ A M has a supremum � U ∈ M , and ◮ A -distributive: for all U , V ∈ A M , � ( UV ) = ( � U )( � V ). Let D A be the category of A -dioids with A -morphisms. • D F is the category D of dioids ( a + b := � { a , b } , 0 := � ∅ ). • D P is the category of (unital) quantales. 7 / 57
Since every A -dioid ( M , · , 1 , ≤ ) is a ( F -) dioid via � � { a , b } , ∅ , a + b := 0 := we often write A -dioids in the dioid-signature: D = ( D , + , · , 0 , 1). A X ∗ is the free A -dioid generated by the set X . Prop. A M is the free A -dioid extension of the monoid M . Prop. (i) For f : M → N between A -dioids M , N : � � f is A -continuous iff for all U ∈ A M : f ( U ) = ( A f )( U ) (ii) An A -complete po-monoid ( M , · , 1 , ≤ ) is A -distributive iff � � forall a , b ∈ M , U ∈ A M : a ( U ) b = aUb . 8 / 57
Theorem D R is the category of ∗ -continuous Kleene algebras. Hopkins 2008: D C is the category of µ -continuous Chomsky algebras. HL 2018: Kleene-Algebra (Kozen 1990): right/left-linearly closed dioid x ≥ ax + b and x ≥ xa + b have least solutions a ∗ b resp. ba ∗ , for all values a , b. ∗ -continuity: a · c ∗ · b = � { a · c n · b | n ∈ N } , for all a , b , c ∈ M . Chomsky-Algebra (Grathwohl e.a. 2015): algebraically closed dioid every polynomial system x 1 ≥ p 1 (¯ x , ¯ y ) , . . . , x n ≥ p n (¯ x , ¯ y ) has a least solution in ¯ x = x 1 , . . . x n , for each value of ¯ y. µ -continuity: a · µ xp · b = � { a · p n (0) · b | n ∈ N } , all p ∈ M [ x ]. 9 / 57
Theorem (Hopkins 2008) For all monadic operators A ≤ B there is an adjunction Q B A : D A ⇄ D B : Q A B where Q B A ( K ) is a completion of K by order-ideals of B -subsets of B is the forgetful functor (resp. restriction of � ). K, and Q A For monoids M , C M = Q C R ( R M ) is the algebraic closure of R M . Problem Can we provide an algebraic construction of Q C R ? Intended advantage: algebraic expressions for context-free languages, instead of µ -terms. 10 / 57
The classical CST for free monoids X ∗ ( X ∗ , · , 1) the free monoid generated by the fin.set X = M [∆] = the free extension of the monoid M by the set ∆ all interleaved sequences of elements of M and ∆ ∗ = Theorem (Chomsky/Sch¨ utzenberger 1963) Let ◮ ∆ = { b , d , p , q } consist of two pairs b , d and p , q of brackets, ◮ h : X ∗ [∆] → X ∗ be the “bracket-erasing” homomorphism, ◮ D ∈ C ( X ∗ [∆]) be the Dyck-language, the least S ⊆ X ∗ [∆] s.t. S ≥ 1 + X + bSd + pSq + SS C X ∗ = { h ( R ∩ D ) | R ∈ R ( X ∗ [∆]) } . Then: This is not yet C X ∗ = Q C R ( R X ∗ ), but a first step towards our goal. 11 / 57
The polycyclic monoid P ′ n and R -dioid C ′ n We are looking for an algebra in which h ( R ∩ D ) can be performed. An inverse semigroup is a semigroup ( M , · ) where each element p has a “generalized inverse” p − 1 , i.e. a q such that p = pqp and q = qpq . Example: partial bijections p ⊆ X × X of X under composition. Let ∆ n = P n ˙ ∪ Q n , for P n = { p 0 , . . . , p n − 1 } , Q n = { q 0 , . . . , q n − 1 } , and (∆ ∗ n ) 0 the extension of ∆ ∗ n by an annihilating element 0. The polycyclic monoid P ′ n is the inverse monoid (∆ ∗ n ) 0 /ρ n where ρ n = { p i q i = 1 | i < n } ∪ { p i q j = 0 | i , j < n , i � = j } . Here, p i and q i are generalized inverses of each other, as p i q i = 1. Note: the Dyck-language over ∆ n is D n = { w ∈ ∆ ∗ n | w /ρ n = 1 } . 12 / 57
The Cayley-graph of P ′ n p 0 q n − 1 The Cayley-graph of P ′ n is the graph ( P ′ − → , . . . , − → ) with n , p i q i u /ρ n − → up i /ρ n , u /ρ n − → uq i /ρ n . We have ∆ ∗ ∆ ∗ n P n Q n ∆ ∗ Q ∗ n P ∗ ˙ = ∪ n . n n Hence every w ∈ ∆ ∗ n has a normal form nf ρ n ( w ) in { 0 } ∪ Q ∗ n P ∗ n . w The normal forms represent the elements of P ′ n , and 1 − → nf ρ n ( w ). n ∪ { 0 } , · ′ , 1) with u · ′ v = nf ρ n ( uv ) is the The monoid P ′ n ≃ ( Q ∗ n P ∗ n if u · ′ v = 0 is read as “ u · ′ v is undefined”. partial monoid Q ∗ n P ∗ 13 / 57
The Cayley-graph of P ′ 2 (without 0 and edges related to 0): q 0 q 1 � ✒ � ❅ ■ ✒ � ❅ ❅ ■ ✻ ✻ � � ❅ � ❅ ❅ p 0 � ❅ q 0 q 1 � ❅ q 1 � ❅ p 1 q 1 p 0 q 0 � � q 0 ❅ � p 1 ❅ ❅ � � ❅ � ❅ ❅ � ✠ � ❅ � ❘ ❅ ❅ ❄ ❄ q 0 p 0 p 0 q 1 = 0 q 0 p 1 1 q 1 p 0 q 1 p 1 ■ ❅ � � ✒ ❅ ❅ ■ ✻ ❅ � � ❅ ❅ p 0 � ❅ q 1 � ❅ ❅ q 1 . . . p 1 q 1 . . . ❅ � � q 0 p 1 ❅ ❅ ❅ � � ❅ ❅ ❅ ✠ � � ❘ ❅ ❅ ❄ q 0 p 0 p 1 p 0 p 1 � � ✒ ❅ ❅ ■ � � ❅ ❅ p 0 � ❅ q 1 � ❅ . . . D 2 = � � q 0 p 1 ❅ ❅ � � ❅ ❅ ✠ � � ❘ ❅ ❅ w p 0 p 0 p 0 p 1 { w | 1 − → 1 } q j p i → to P ∗ 2 ⊆ P ′ If we could restrict − → , − 2 , we had a stack! 14 / 57
Recommend
More recommend