theory of computation chapter 7 regular languages
play

THEORY OF COMPUTATION Chapter 7 Regular Languages (Automata as - PowerPoint PPT Presentation

THEORY OF COMPUTATION (Automata as Algebras) THEORY OF COMPUTATION Chapter 7 Regular Languages (Automata as Algebras) A. Daneshgar (Slides prepared by Z. Ghafouri) Department of Mathematical Sciences Sharif University of Technology 2020,


  1. THEORY OF COMPUTATION (Automata as Algebras) THEORY OF COMPUTATION Chapter 7 Regular Languages (Automata as Algebras) A. Daneshgar (Slides prepared by Z. Ghafouri) Department of Mathematical Sciences Sharif University of Technology 2020, March, 1st (1998, Esfand, 10) THEORY OF COMPUTATION (Automata as Algebras), A. Daneshgar , (Slides prepared by Z. Ghafouri)

  2. THEORY OF COMPUTATION (Automata as Algebras) An algebra Definition: An algebra is a pair A = ( A , O ) where A is a set and O is a set of operations on A . ◮ An n − ary operation τ on A is a function that takes n elements of A and returns a single element of A ; i.e. τ : A × . . . × A → A , � �� � n ◮ A 0 − ary operation (nullary operation) is simply an element of A , or a constant, ◮ A 1 − ary operation (unary operation) is simply a function from A to A , ◮ A 2 − ary operation (binary operation) is simply a function from A × A to A . THEORY OF COMPUTATION (Automata as Algebras), A. Daneshgar , (Slides prepared by Z. Ghafouri)

  3. THEORY OF COMPUTATION (Automata as Algebras) A pre-automaton Definition: A pre-automaton � � A = Q , q 0 ∈ Q , { τ i : Q → Q } i ∈ Σ with input symbols Σ of n elements, is an algebra with one nullary and n unary operations on a set of states A . THEORY OF COMPUTATION (Automata as Algebras), A. Daneshgar , (Slides prepared by Z. Ghafouri)

  4. THEORY OF COMPUTATION (Automata as Algebras) Homomorphisms � � A = Q , q 0 ∈ Q , { τ i : Q → Q } i ∈ Σ Q ′ , q 0 ′ ∈ Q ′ , { τ i ′ : Q ′ → Q ′ } i ∈ Σ � � B = A B σ ( x ) x σ : Q → Q ′ τ i τ ′ i y σ ( y ) τ ′ ∀ i i ◦ σ = σ ◦ τ i σ ( q 0 ) = q ′ 0 THEORY OF COMPUTATION (Automata as Algebras), A. Daneshgar , (Slides prepared by Z. Ghafouri)

  5. THEORY OF COMPUTATION (Automata as Algebras) Isomorphisms Definition: Two algebras � � A = Q , q 0 ∈ Q , { τ i : Q → Q } i ∈ Σ and Q ′ , q 0 ′ ∈ Q ′ , { τ i ′ : Q ′ → Q ′ } i ∈ Σ � � B = are said to be isomorphic if there exists a bijective homomorphism σ : A → B such that its inverse, σ − 1 : B → A , is also a bijective homomorphism. THEORY OF COMPUTATION (Automata as Algebras), A. Daneshgar , (Slides prepared by Z. Ghafouri)

  6. THEORY OF COMPUTATION (Automata as Algebras) Subalgebras ◮ Let A = ( A , O ) be an algebra and let τ ∈ O be an n − ary operation of A . A subset B of A is τ − closed if a 0 , . . . , a n − 1 ∈ B imply τ ( a 0 , . . . , a n − 1 ) ∈ B . ◮ B is a closed subset of A if B is τ − closed for each operation τ of A . ◮ A subalgebra of the algebra A = ( A , O ) is an algebra B = ( B , O B ), where B ⊆ A is a closed subset of A and O B = { τ | B n : τ ∈ O is an n − ary operation } . In other words, a subalgebra is a subset of an algebra which is closed under all its operations and carrying the induced operations. ◮ A reduced algebra is an algebra whose only subalgebras are the empty set and itself. THEORY OF COMPUTATION (Automata as Algebras), A. Daneshgar , (Slides prepared by Z. Ghafouri)

  7. THEORY OF COMPUTATION (Automata as Algebras) Reduced pre-automata A reduced pre-automaton � � A = Q , q 0 ∈ Q , { τ i : Q → Q } i ∈ Σ is a pre-automaton which is reduced as an algebra. Note that this is equivalent to the condition that each state of Q is reachable from the initial state q 0 . THEORY OF COMPUTATION (Automata as Algebras), A. Daneshgar , (Slides prepared by Z. Ghafouri)

  8. THEORY OF COMPUTATION (Automata as Algebras) Equivalence relations ◮ An equivalence relation on X is a binary relation ∼ on X such that ◮ ∀ x ∈ X ( x ∼ x ) (reflexivity), ◮ ∀ x , y ∈ X ( x ∼ y → y ∼ x ) (simmetry), ◮ ∀ x , y , z ∈ X ( x ∼ y ∧ y ∼ z → x ∼ z ) (transitivity). ◮ The equivalence class of an element x in X with respect to the equivalence relation ∼ , denoted by [ x ] ∼ , is the set of all elements of X which are equivalent to x , i.e. [ x ] ∼ = { y ∈ X | x ∼ y } . THEORY OF COMPUTATION (Automata as Algebras), A. Daneshgar , (Slides prepared by Z. Ghafouri)

  9. THEORY OF COMPUTATION (Automata as Algebras) ◮ Every two equivalence classes [ x ] ∼ and [ y ] ∼ are either equal or disjoint, so the set of equivalence classes is a partition of X. ◮ The set of all equivalence classes of X by ∼ , denoted by X / ∼ , is called the quotient set of X . ◮ For any partition P of a set X , the relation ∼ on X defined by x ∼ y if and only if x and y belong to the same element of P , is an equivalence relation on X . Hence, talking about equivalence relations on a set is essentially the same as talking about partitions of a set: An equivalence relation determines a partition (in which the subsets are the equivalence classes), and a partition determines an equivalence relation (in which being equivalent means belonging to the same subset). THEORY OF COMPUTATION (Automata as Algebras), A. Daneshgar , (Slides prepared by Z. Ghafouri)

  10. THEORY OF COMPUTATION (Automata as Algebras) Equivalence coming from an onto-map Any onto-map σ : A onto − → B gives rise to an equivalence relation on A according to which a 1 ∼ σ a 2 ⇔ σ ( a 1 ) = σ ( a 1 ) . Hence, the collection of all σ − inverse images of the elements of B forms a partition of A . THEORY OF COMPUTATION (Automata as Algebras), A. Daneshgar , (Slides prepared by Z. Ghafouri)

  11. THEORY OF COMPUTATION (Automata as Algebras) Congruence relations Definition: Let A = ( A , O ) be an algebra. A congruence relation is an equivalence relation on A which is compatible with the algebra operations. In the case of a pre-automaton where each operation is either nullary or unary, it means that for every x and y in A and each unary operation τ i : [ x ] = [ y ] ⇔ [ τ i ( x )] = [ τ i ( y )] . THEORY OF COMPUTATION (Automata as Algebras), A. Daneshgar , (Slides prepared by Z. Ghafouri)

  12. THEORY OF COMPUTATION (Automata as Algebras) The quotient pre-automaton � � Definition: Let A = Q , q 0 ∈ Q , { τ i : Q → Q } i ∈ Σ be a pre-automaton and ∼ be a congruence relation on A . The quotient pre-automaton of A by ∼ is � � A / ∼ = Q / ∼ , [ q 0 ] , { ˜ τ i : Q / ∼ → Q / ∼} i ∈ I where ˜ τ i ([ x ]) = [ τ i ( x )]. THEORY OF COMPUTATION (Automata as Algebras), A. Daneshgar , (Slides prepared by Z. Ghafouri)

  13. THEORY OF COMPUTATION (Automata as Algebras) The canonical homomorphism Consider the map σ : A → A / ∼ defined as σ ( x ) = [ x ] ; then σ is called the natural or the canonical map. Obviously σ is a homomorphism, or equivalently: σ x σ ( x ) = [ x ] τ i τ i ˜ σ τ i ( x ) [ τ i ( x )] = ˜ τ i ([ x ]) def ˜ τ i In other words σ ( τ i ( x )) = [ τ i ( x )] = ˜ τ i ( σ ( x )) . and σ ( q 0 ) = [ q 0 ] . THEORY OF COMPUTATION (Automata as Algebras), A. Daneshgar , (Slides prepared by Z. Ghafouri)

  14. THEORY OF COMPUTATION (Automata as Algebras) Let � � A = Q , q 0 ∈ Q , { τ i : Q → Q } i ∈ Σ and Q ′ , q 0 ′ ∈ Q ′ , { τ i ′ : Q ′ → Q ′ } i ∈ Σ � � B = be two pre-automata and σ : A → B be an onto homomorphism. Since σ maps A onto B , the collection of all σ − inverse images of the elements of B forms a partiotion of A . Let ∼ σ be the equivalence relation corresponding to this partition. Since σ is a homomorphism, ∼ σ is a congruence relation on A : [ x ] ∼ σ = [ y ] ∼ σ ⇔ σ ( x ) = σ ( y ) ⇔ τ i ′ ( σ ( x )) = τ i ′ ( σ ( y )) ⇔ σ ( τ i ( x )) = σ ( τ i ( y )) ⇔ [ τ i ( x )] ∼ σ = [ τ i ( y )] ∼ σ ⇔ τ i ([ x ] ∼ σ ) = ˜ ˜ τ i ([ x ] ∼ σ ) . THEORY OF COMPUTATION (Automata as Algebras), A. Daneshgar , (Slides prepared by Z. Ghafouri)

  15. THEORY OF COMPUTATION (Automata as Algebras) Hence, having an onto homomorphism σ : A → B , one can make the quotient pre-automaton A by ∼ σ � � A / ∼ σ = Q / ∼ σ , [ q 0 ] , { ˜ τ i : Q / ∼ σ → Q / ∼ σ } i ∈ Σ where ˜ τ i ([ x ]) = [ τ i ( x )]. Question: σ A B onto hom canonical ? hom A / ∼ σ THEORY OF COMPUTATION (Automata as Algebras), A. Daneshgar , (Slides prepared by Z. Ghafouri)

  16. THEORY OF COMPUTATION (Automata as Algebras) Consider the bijective map σ : A / ∼ σ − ˜ → B [ x ] �→ σ ( x ) [ q 0 ] �→ σ ( q 0 ) = q 0 ′ Then ˜ σ is a homomorphism: σ ˜ [ x ] σ ( x ) τ i ˜ τ i ′ σ ˜ [ τ i ( x )] σ ( τ i ( x )) = τ i ′ ( σ ( x )) σ : hom Consequently, A / ∼ σ ≃ B . THEORY OF COMPUTATION (Automata as Algebras), A. Daneshgar , (Slides prepared by Z. Ghafouri)

  17. THEORY OF COMPUTATION (Automata as Algebras) Without loss of genelarity, assume that all pre-automata are defined on { 0 , 1 } . So a pre-automaton is an algebra of type (0,1,1). Consider the following fixed pre-automaton: { 0 , 1 } ∗ , λ ∈ { 0 , 1 } ∗ , { r i : { 0 , 1 } ∗ → { 0 , 1 } ∗ } i =0 , 1 � � U r = where r i ( w 1 . . . w n ) = w 1 . . . w n i . Claim: For any reduced pre-automaton � � B = P , p 0 ∈ P , { τ i : P → P } i =0 , 1 onto there exists an onto homomorphism σ B : U r − → B such that σ B ( w ) = B ( w ). In other words σ B ( w 1 . . . w n ) = τ w n ◦ . . . ◦ τ w 2 ◦ τ w 1 ( p 0 ) . THEORY OF COMPUTATION (Automata as Algebras), A. Daneshgar , (Slides prepared by Z. Ghafouri)

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend