rationality recognisability
play

Rationality & Recognisability An introduction to weighted - PowerPoint PPT Presentation

Rationality & Recognisability An introduction to weighted automata theory Tutorial given at post-WATA 2014 Workshop Jacques Sakarovitch CNRS / Telecom ParisTech Based on Chapter III Chapter 4 The presentation is also much inspired by


  1. The weighted automaton model a 2 a b C 1 ∈ N � � A ∗ � � C 1 p q b 2 b 1 b a b 1 − − → p − − → p − − → p − − → q − − → 1 b 2 a 2 b 1 − − → p − − → q − − − → q − − − → q − − → ◮ Weight of a path c : product of the weights of transitions in c ◮ Weight of a word w : sum of the weights of paths with label w . C 1 = b + ab + 2 b a + 3 b b + aab + 2 ab a + · · · + 5 b ab + · · ·

  2. The weighted automaton model (2) 0 a 1 a 0 0 L 1 ∈ Z min � � A ∗ � � L 1 p q 1 b 0 b 0 1 b 0 a 1 b 0 − − → p − − − → p − − − → p − − − → p − − → 0 0 b 1 a 0 b 0 − − → q − − − → q − − − → q − − − → q − − → ◮ Weight of a path c : product , that is, the sum, of the weights of transitions in c ◮ Weight of a word w : sum , that is, the min of the weights of paths with label w L 1 : A ∗ − b ab �− → min(1 + 0 + 1 , 0 + 1 + 0) = 1 → Z min

  3. The weighted automaton model (2) 0 a 1 a 0 0 L 1 ∈ Z min � � A ∗ � � L 1 p q 1 b 0 b 0 1 b 0 a 1 b 0 − − → p − − − → p − − − → p − − − → p − − → 0 0 b 1 a 0 b 0 − − → q − − − → q − − − → q − − − → q − − → ◮ Weight of a path c : product , that is, the sum, of the weights of transitions in c ◮ Weight of a word w : sum , that is, the min of the weights of paths with label w C 1 = 01 A ∗ + 0 a + 0 b + 1 ab + 1 b a + 0 b b + · · · + 1 b ab + · · ·

  4. The weighted automaton model (system theory mode) K ∋ k s w ∈ A ∗ s : A ∗ → K s ∈ K � � A ∗ � � The input belongs to a free monoid A ∗ The output belongs to a semiring K The function realised is a function from A ∗ to K : a series in K � � A ∗ � �

  5. The weighted automaton model (sytem theory mode) K ∋ k s ( u , v ) ∈ A ∗ × B ∗ s : A ∗ × B ∗ → K s ∈ K � � A ∗ × B ∗ � � The input belongs to a direct product of free monoids A ∗ × B ∗ The output belongs to a semiring K The function realised is a function from A ∗ × B ∗ to K : a series in K � � A ∗ × B ∗ � �

  6. Richness of the model of weighted automata ◮ B ‘classic’ automata ◮ N ‘usual’ counting ◮ Z , Q , R numerical multiplicity ◮ � Z ∪ + ∞ , min , + � Min-plus automata ◮ � Z , min , max � fuzzy automata ◮ P ( B ∗ ) = B � � B ∗ � � transducers ◮ N � � B ∗ � � weighted transducers ◮ P ( F ( B )) pushdown automata

  7. Series play the role of languages � A ∗ � � plays the role of P ( A ∗ ) K �

  8. Series play the role of relations � A ∗ × B ∗ � � plays the role of P ( A ∗ × B ∗ ) K �

  9. Weighted automata theory is the linear algebra of computer science

  10. Part II Rationality

  11. Outline of Part II ◮ Definition of rational series ◮ The Fundamental Theorem of Finite Automata What can be computed by a finite automaton is exactly what can be computed by the star operation (together with the algebra operations) ◮ Morphisms of weighted automata

  12. The semiring K � � A ∗ � � A ∗ free monoid K semiring s : A ∗ → K s ∈ K � � A ∗ � � s : w �− → � s , w � � � s , w � w s = w ∈ A ∗ Point-wise addition � s + t , w � = � s , w � + � t , w � � Cauchy product � s t , w � = � s , u �� t , v � u v = w { ( u , v ) | u v = w } finite ⇒ = Cauchy product well-defined � A ∗ � K � � is a semiring

  13. The semiring K � � M � � K semiring M monoid s ∈ K � � M � � s : M → K s : m �− → � s , m � � � s , m � m s = m ∈ M Point-wise addition � s + t , m � = � s , m � + � t , m � � Cauchy product � s t , m � = � s , x �� t , y � x y = m ∀ m { ( x , y ) | x y = m } finite ⇒ = Cauchy product well-defined

  14. The semiring K � � M � � Conditions for { ( x , y ) | x y = m } finite for all m Definition M is graded if M equipped with a length function ϕ ϕ : M → N ϕ ( mm ′ ) = ϕ ( m ) + ϕ ( m ′ ) M f.g. and graded = ⇒ K � � M � � is a semiring Examples M trace monoid, then K � � M � � is a semiring K � � A ∗ × B ∗ � � is a semiring F ( A ) , the free group on A , is not graded

  15. The algebra K � � M � � K semiring M f.g. graded monoid s ∈ K � � A ∗ � � s : M → K s : m �− → � s , m � � � s , m � m s = m ∈ M Point-wise addition � s + t , m � = � s , m � + � t , m � � Cauchy product � s t , m � = � s , x �� t , y � x y = m External multiplication � k s , m � = k � s , m � K � � M � � is an algebra

  16. The star operation � t ∗ = t n t ∈ K n ∈ N How to define infinite sums ? One possible solution Topology on K Definition of summable families and of their sum t ∗ defined { t n } n ∈ N summable if Other possible solutions axiomatic definition of star, equational definition of star

  17. The star operation � t ∗ = t n t ∈ K n ∈ N

  18. The star operation � t ∗ = t n t ∈ K n ∈ N (0 K ) ∗ = 1 K ◮ ∀ K x ∗ not defined. ◮ K = N ∀ x � = 0 x ∗ = ∞ . ◮ K = N = N ∪ { + ∞} ∀ x � = 0 2 ) ∗ = 2 with the natural topology, ( 1 ◮ K = Q 2 ) ∗ is undefined with the discrete topology. ( 1

  19. The star operation � t ∗ = t n t ∈ K n ∈ N In any case t ∗ = 1 K + t t ∗ Star has the same flavor as the inverse If K is a ring t ∗ (1 K − t ) = 1 K 1 K 1 K − t = 1 K + t + t 2 + · · · + t n + · · ·

  20. Star of series � When is s ∗ = s n defined ? s ∈ K � � A ∗ � � n ∈ N

  21. Star of series � When is s ∗ = s n defined ? s ∈ K � � A ∗ � � n ∈ N Topology on K yields topology on K � � A ∗ � �

  22. The simple convergence topology on K � � A ∗ � � Topology on K given by a distance c c : K × K → R +

  23. The simple convergence topology on K � � A ∗ � � Topology on K given by a distance c c : K × K → R + • symmetry: c ( x , y ) = c ( y , x ) • positivity: c ( x , y ) > 0 if x � = y and c ( x , x ) = 0 • triangular inequality: c ( x , y ) � c ( x , z ) + c ( y , z )

  24. The simple convergence topology on K � � A ∗ � � Topology on K given by a distance c c : K × K → R + • symmetry: c ( x , y ) = c ( y , x ) • positivity: c ( x , y ) > 0 if x � = y and c ( x , x ) = 0 • triangular inequality: c ( x , y ) � c ( x , z ) + c ( y , z ) A sequence { k n } n ∈ N of elements of K converges toward k k = lim n → + ∞ k n ∀ ε > 0 ∃ N ∈ N ∀ n � N c ( k n , k ) � ε

  25. The simple convergence topology on K � � A ∗ � � Topology on K given by a distance c c : K × K → R + • symmetry: c ( x , y ) = c ( y , x ) • positivity: c ( x , y ) > 0 if x � = y and c ( x , x ) = 0 • triangular inequality: c ( x , y ) � c ( x , z ) + c ( y , z ) A sequence { k n } n ∈ N of elements of K converges toward k k = lim n → + ∞ k n ∀ ε > 0 ∃ N ∈ N ∀ n � N c ( k n , k ) � ε Remark Always assume c ( x , y ) � 1

  26. The simple convergence topology on K � � A ∗ � � Topology on K given by a distance c c : K × K → R + • symmetry: c ( x , y ) = c ( y , x ) • positivity: c ( x , y ) > 0 if x � = y and c ( x , x ) = 0 • triangular inequality: c ( x , y ) � c ( x , z ) + c ( y , z ) A sequence { k n } n ∈ N of elements of K converges toward k k = lim n → + ∞ k n ∀ ε > 0 ∃ N ∈ N ∀ n � N c ( k n , k ) � ε Remark Always assume c ( x , y ) � 1 Remark Discrete topology x � = y ⇒ c ( x , y ) = 1 Converging sequences = stationnary sequences

  27. The simple convergence topology on K � � A ∗ � � ◮ B , N , Z , discrete topology ◮ M = � N , min , + � discrete topology ◮ Q , Q + , R , R + “natural distance”

  28. The simple convergence topology on K � � A ∗ � � Definition { s n } n ∈ N , s n ∈ K � � A ∗ � � , converges toward s iff ∀ w ∈ A ∗ � s n , w � converges toward � s , w � in K .

  29. The simple convergence topology on K � � A ∗ � � Definition { s n } n ∈ N , s n ∈ K � � A ∗ � � , converges toward s iff ∀ w ∈ A ∗ � s n , w � converges toward � s , w � in K . The simple convergence topology on K � � A ∗ � � is defined by a distance d :

  30. The simple convergence topology on K � � A ∗ � � Definition { s n } n ∈ N , s n ∈ K � � A ∗ � � , converges toward s iff ∀ w ∈ A ∗ � s n , w � converges toward � s , w � in K . The simple convergence topology on K � � A ∗ � � is defined by a distance d : If K is equipped with the discrete topology: e ( s , t ) = min { n ∈ N | ∃ w ∈ A ∗ | w | = n and � s , w � � = � t , w �} , d ( s , t ) = 2 − e ( s , t )

  31. The simple convergence topology on K � � A ∗ � � Definition { s n } n ∈ N , s n ∈ K � � A ∗ � � , converges toward s iff ∀ w ∈ A ∗ � s n , w � converges toward � s , w � in K . The simple convergence topology on K � � A ∗ � � is defined by a distance d : If K is equipped with the topology defined by the distance c : � 1 � d ( s , t ) = 1 � 2 n max { c ( � s , w � , � t , w � ) | | w | = n } . 2 n ∈ N

  32. The simple convergence topology on K � � A ∗ � � Proposition If K is a topological semiring, then K � � A ∗ � � , equipped with the simple convergence topology, is a topological semiring.

  33. The simple convergence topology on K � � A ∗ � � Proposition If K is a topological semiring, then K � � A ∗ � � , equipped with the simple convergence topology, is a topological semiring. Definition Summable family of series.

  34. The simple convergence topology on K � � A ∗ � � Proposition If K is a topological semiring, then K � � A ∗ � � , equipped with the simple convergence topology, is a topological semiring. Definition Summable family of series. Definition Locally finite family of series.

  35. The simple convergence topology on K � � A ∗ � � Proposition If K is a topological semiring, then K � � A ∗ � � , equipped with the simple convergence topology, is a topological semiring. Definition Summable family of series. Definition Locally finite family of series. Proposition A locally finite family of series is summable.

  36. Star of series � When is s ∗ = s n defined ? s ∈ K � � A ∗ � � n ∈ N Topology on K yields topology on K � � A ∗ � �

  37. Star of series � When is s ∗ = s n defined ? s ∈ K � � A ∗ � � n ∈ N Topology on K yields topology on K � � A ∗ � � s 0 = � s , 1 A ∗ � = 0 K s proper

  38. Star of series � When is s ∗ = s n defined ? s ∈ K � � A ∗ � � n ∈ N Topology on K yields topology on K � � A ∗ � � s 0 = � s , 1 A ∗ � = 0 K s proper s ∗ defined ⇒ s proper =

  39. Star of series � When is s ∗ = s n defined ? s ∈ K � � A ∗ � � n ∈ N Topology on K yields topology on K � � A ∗ � � s 0 = � s , 1 A ∗ � = 0 K s proper s ∗ defined ⇒ s proper = ∀ s ∈ K � � A ∗ � � s = s 0 + s p with s p proper

  40. Star of series � When is s ∗ = s n defined ? s ∈ K � � A ∗ � � n ∈ N Topology on K yields topology on K � � A ∗ � � s 0 = � s , 1 A ∗ � = 0 K s proper s ∗ defined ⇒ s proper = ∀ s ∈ K � � A ∗ � � s = s 0 + s p with s p proper Definition K strong product of two summable families summable.

  41. Star of series � When is s ∗ = s n defined ? s ∈ K � � A ∗ � � n ∈ N Topology on K yields topology on K � � A ∗ � � s 0 = � s , 1 A ∗ � = 0 K s proper s ∗ defined ⇒ s proper = ∀ s ∈ K � � A ∗ � � s = s 0 + s p with s p proper Definition K strong product of two summable families summable. Proposition s ∗ is defined iff s ∗ K strong, s ∈ K � � A ∗ � � 0 is defined s ∗ = ( s ∗ 0 s p ) ∗ s ∗ 0 = s ∗ 0 ( s p s ∗ 0 ) ∗

  42. Rational series K � A ∗ � ⊆ K � � A ∗ � � subalgebra of polynomials K Rat A ∗ closure of K � A ∗ � under ◮ sum ◮ product ◮ exterior multiplication ◮ and star K Rat A ∗ ⊆ K � � A ∗ � � subalgebra of rational series

  43. Fundamental theorem of finite automata Theorem s ∈ K Rat A ∗ ⇐ ⇒ ∃A ∈ K WA ( A ∗ ) s = | | |A| | |

  44. Fundamental theorem of finite automata Theorem s ∈ K Rat A ∗ ⇐ ⇒ ∃A ∈ K WA ( A ∗ ) s = | | |A| | | Kleene theorem ?

  45. Fundamental theorem of finite automata Theorem s ∈ K Rat A ∗ ⇐ ⇒ ∃A ∈ K WA ( A ∗ ) s = | | |A| | | Kleene theorem ? Theorem M finitely generated graded monoid s ∈ K Rat M ⇐ ⇒ ∃A ∈ K WA ( M ) s = | | |A| | |

  46. Fundamental theorem of finite automata standard K WA ( A ∗ ) K Rat A ∗ K RatE A ∗ elimination

  47. Standard automaton 6 a ∗ + 1 E 1 = ( 1 3 b ∗ ) ∗

  48. Standard automaton 6 a ∗ + 1 E 1 = ( 1 3 b ∗ ) ∗ 4 3 a 2 1 3 a 1 2 3 b 1 3 a 2 2 2 3 b 5 3 b

  49. Automata are matrices ◮ Automata are (essentially) matrices: A = � I , E , T � ◮ Computing the behaviour of an automaton boils down to solving a linear system X = E · X + T ( s ) ◮ Solving the linear system ( s ) amounts to invert the matrix ( Id − E ) (hence the name rational) ◮ The inversion of Id − E is realised by an infinite sum Id + E + E 2 + E 3 + · · · : the star of E

  50. Automata are matrices a 2 a b C 1 p q b 2 b �� � a + b � � 0 �� b � C 1 = � I 1 , E 1 , T 1 � = 1 0 . , , 0 2 a + 2 b 1

  51. Automata are matrices A = � I , E , T � E = incidence matrix

  52. Automata are matrices A = � I , E , T � E = incidence matrix Notation wl ( x ) = weighted label of x In our model, e transition ⇒ wl ( e ) = k a

  53. Automata are matrices A = � I , E , T � E = incidence matrix Notation wl ( x ) = weighted label of x In our model, e transition ⇒ wl ( e ) = k a � E p , q = { wl ( e ) | e transition from p to q }

  54. Automata are matrices A = � I , E , T � E = incidence matrix Notation wl ( x ) = weighted label of x In our model, e transition ⇒ wl ( e ) = k a � E p , q = { wl ( e ) | e transition from p to q } Lemma � En p , q = { wl ( c ) | c computation from p to q of length n }

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