a probabilistic kleene theorem
play

A probabilistic Kleene Theorem Benjamin Monmege LSV, ENS Cachan, - PowerPoint PPT Presentation

A probabilistic Kleene Theorem Benjamin Monmege LSV, ENS Cachan, CNRS, France MOVEP 2012, Marseille Part of works published at ATVA12 with Benedikt Bollig, Paul Gastin and Marc Zeitoun Kleenes Theorem a b b Finite State Automata 2


  1. A probabilistic Kleene Theorem Benjamin Monmege LSV, ENS Cachan, CNRS, France MOVEP 2012, Marseille Part of works published at ATVA’12 with Benedikt Bollig, Paul Gastin and Marc Zeitoun

  2. Kleene’s Theorem a b b Finite State Automata 2 1 3 a a a same expressivity Regular Expressions E ::= a | E+E | E · E | E *

  3. Motivations • Theoretically: relate denotational and computational models • Practically: easier to write specifications using regular expressions vs. easier to check properties (emptiness, inclusion...) with automata • Goal: translate expressions to automata, as efficiently as possible

  4. Kleene’s Theorem a a b b b b Finite State Automata 2 2 1 1 3 3 a a a a a a same expressivity Regular Expressions E ::= a | E+E | E · E | E *

  5. Kleene’s Theorem a, 1 a, 1 2 2 b, 1 b, 1 b, 1 b, 1 d e 1 1 2 2 t 1 1 h g Finite State Automata 2 2 i e 2 2 1 1 3 3 W a, 1 a, 1 a, 1 a, 1 6 6 3 3 a, 1 a, 1 2 2 same expressivity Regular Expressions E ::= a | E+E | E · E | E *

  6. Kleene’s Theorem a, 1 a, 1 b, 1 b, 1 b, 1 b, 1 d e 1 1 t h g Finite State Automata i 2 2 1 1 3 3 e W a, 1 a, 1 a, 1 a, 1 6 6 3 3 a, 1 a, 1 2 2 same expressivity Regular Expressions E ::= a | E+E | E · E | E *

  7. Kleene’s Theorem a, 1 a, 1 b, 1 b, 1 b, 1 b, 1 d e 1 1 t h g Finite State Automata i 2 2 1 1 3 3 e W a, 1 a, 1 a, 1 a, 1 6 6 3 3 a, 1 a, 1 2 2 Σ * → ℝ same expressivity Regular Expressions E ::= a | E+E | E · E | E *

  8. Kleene’s Theorem a, 1 a, 1 b, 1 b, 1 b, 1 b, 1 d e 1 1 t h g Finite State Automata i 2 2 1 1 3 3 e W a, 1 a, 1 a, 1 a, 1 6 6 3 3 a, 1 a, 1 2 2 Σ * → ℝ a a b same expressivity two runs: 1 → 2 → 1 → 3 of weight 1/6x1x1x1=1/6 and 1 → 1 → 1 → 3 of weight 1/2x1/2x1x1=1/4 Regular Expressions E ::= a | E+E | E · E | E *

  9. Kleene’s Theorem a, 1 a, 1 b, 1 b, 1 b, 1 b, 1 d e 1 1 t h g Finite State Automata i 2 2 1 1 3 3 e W a, 1 a, 1 a, 1 a, 1 6 6 3 3 a, 1 a, 1 2 2 Σ * → ℝ a a b same expressivity two runs: 1 → 2 → 1 → 3 of weight 1/6x1x1x1=1/6 and 1 → 1 → 1 → 3 of weight 1/2x1/2x1x1=1/4 hence, a a b recognized with weight 1/6+1/4=5/12 Regular Expressions E ::= a | E+E | E · E | E *

  10. Kleene’s Theorem a, 1 a, 1 b, 1 b, 1 b, 1 b, 1 d e 1 1 t h g Finite State Automata i 2 2 1 1 3 3 e W a, 1 a, 1 a, 1 a, 1 6 6 3 3 a, 1 a, 1 2 2 Σ * → ℝ a a b same expressivity two runs: 1 → 2 → 1 → 3 of weight 1/6x1x1x1=1/6 and 1 → 1 → 1 → 3 of weight 1/2x1/2x1x1=1/4 hence, a a b recognized with weight 1/6+1/4=5/12 d e t h g Regular Expressions i e W r e p o E ::= a | E+E | E · E | E * p | r p E

  11. r e g r e b n Kleene’s Theorem e z t ü h c S a, 1 a, 1 b, 1 b, 1 b, 1 b, 1 d e 1 1 t h g Finite State Automata i 2 2 1 1 3 3 e W a, 1 a, 1 a, 1 a, 1 6 6 3 3 a, 1 a, 1 2 2 Σ * → ℝ a a b same expressivity two runs: 1 → 2 → 1 → 3 of weight 1/6x1x1x1=1/6 and 1 → 1 → 1 → 3 of weight 1/2x1/2x1x1=1/4 hence, a a b recognized with weight 1/6+1/4=5/12 d e t h g Regular Expressions i e W r e p o E ::= a | E+E | E · E | E * p | r p E [1] S. Kleene (1956). Representation of events in nerve nets and finite automata. [2] M.-P . Schützenberger (1961). On the Definition of a Family of Automata. Information and Control. For an overview about Weighted Automata, see, e.g., Handbook of Weighted Automata. Editors: Manfred Droste, Werner Kuich, and Heiko Vogler. EATCS Monographs in Theoretical Computer Science. Springer, 2009.

  12. Probabilistic case? a, 1 b, 1 b, 1 1 2 1 3 a, 1 a, 1 6 3 a, 1 2 A = ( Q, ι , Acc , P ) P : Q × Σ × Q → [0 , 1] X P ( q , a , q 0 ) ≤ 1 for all ( q , a ) ∈ Q × A Acc ( q ) + q 0 2 Q

  13. Probabilistic case? a, 1 c i t s i l i b b, 1 b, 1 a b o r P 1 a e t v a i m t c o a 2 1 3 e t u R A e t i n i a, 1 a, 1 F 6 3 a, 1 2 A = ( Q, ι , Acc , P ) P : Q × Σ × Q → [0 , 1] X P ( q , a , q 0 ) ≤ 1 for all ( q , a ) ∈ Q × A Acc ( q ) + q 0 2 Q

  14. Probabilistic case? a, 1 c i t s i l i b b, 1 b, 1 a b o r P 1 a e t v a i m t c o a 2 1 3 e t u R A e t i n i a, 1 a, 1 F 6 3 a, 1 2 A = ( Q, ι , Acc , P ) Applying Schützenberger’s Theorem P : Q × Σ × Q → [0 , 1] over these special Weighted Automata, X P ( q , a , q 0 ) ≤ 1 for all ( q , a ) ∈ Q × A Acc ( q ) + we obtain regular expressions (proper) q 0 2 Q ( 1 6 a ( a + b ) + 1 2 a ) ∗ ( 1 3 a + b )

  15. What kind of expressions? a, 1 b, 1 b, 1 1 2 1 3 a, 1 a, 1 6 3 a, 1 2

  16. What kind of expressions? ( 1 6 a ( a + b ) + 1 2 a ) ∗ ( 1 3 a + b ) a, 1 b, 1 b, 1 1 2 1 3 a, 1 a, 1 6 3 a, 1 2

  17. What kind of expressions? ( 1 6 a ( a + b ) + 1 2 a ) ∗ ( 1 3 a + b ) a, 1 b, 1 b, 1 1 2 1 3 a, 1 a, 1 6 3 a, 1 2

  18. What kind of expressions? ( 1 6 a ( a + b ) + 1 2 a ) ∗ ( 1 3 a + b ) ( 1 6 a ( a + b ) + 1 2 a ) ∗ ( a + b ) a, 1 b, 1 b, 1 1 2 1 3 a, 1 a, 1 6 3 a, 1 2

  19. What kind of expressions? ( 1 6 a ( a + b ) + 1 2 a ) ∗ ( 1 3 a + b ) ( 1 6 a ( a + b ) + 1 2 a ) ∗ ( a + b ) a, 1 b, 1 b, 1 1 2 1 3 a, 1 a, 1 6 3 a, 1 2

  20. What kind of expressions? ( 1 6 a ( a + b ) + 1 2 a ) ∗ ( 1 3 a + b ) ( 1 6 a ( a + b ) + 1 2 a ) ∗ ( a + b ) ( 1 6 a ( a + b ) + 1 2 a ) ∗ ( 1 3 a + 1 2 b ) a, 1 b, 1 b, 1 1 2 1 3 a, 1 a, 1 6 3 a, 1 2

  21. What kind of expressions? ( 1 6 a ( a + b ) + 1 2 a ) ∗ ( 1 3 a + b ) ( 1 6 a ( a + b ) + 1 2 a ) ∗ ( a + b ) ( 1 6 a ( a + b ) + 1 2 a ) ∗ ( 1 3 a + 1 2 b ) a, 1 b, 1 b, 1 1 2 1 3 a, 1 a, 1 6 3 a, 1 2

  22. What kind of expressions? ( 1 6 a ( a + b ) + 1 2 a ) ∗ ( 1 3 a + b ) ( 1 6 a ( a + b ) + 1 2 a ) ∗ ( a + b ) ( 1 6 a ( a + b ) + 1 2 a ) ∗ ( 1 3 a + 1 2 b ) Searching for a natural fragment a, 1 of weighted regular expressions b, 1 b, 1 1 representing probabilistic behaviors 2 1 3 a, 1 a, 1 6 3 a, 1 2

  23. Constructing Probabilistic Expressions How to iterate? a, 1 b, 1 1 2 5 a, 1 6 a, 1 1 2 1 3 a, 1 3 b, 1 1 4

  24. Constructing Probabilistic Expressions How to iterate? a, 1 b, 1 1 2 5 a, 1 6 a, 1 1 2 1 3 a, 1 3 b, 1 1 4 6 a ( a + b ) + 1 1 2 a + ( 1 3 a + b )

  25. Constructing Probabilistic Expressions How to iterate? a, 1 b, 1 1 2 5 a, 1 6 a, 1 1 2 1 3 a, 1 3 b, 1 1 4 6 a ( a + b ) + 1 1 2 a + ( 1 3 a + b )

  26. Constructing Probabilistic Expressions How to iterate? a, 1 b, 1 1 � 1 � ∗ 6 a ( a + b ) + 1 2 a + ( 1 3 a + b ) 2 5 a, 1 a, 1 6 1 b, 1 a, 1 a, 1 1 3 2 1 2 b, 1 1 3 a, 1 6 a, 1 a, 1 3 2 b, 1 1 4 6 a ( a + b ) + 1 1 2 a + ( 1 3 a + b )

  27. Constructing Probabilistic Expressions How to iterate? a, 1 b, 1 1 � 1 � ∗ 6 a ( a + b ) + 1 2 a + ( 1 3 a + b ) 2 5 a, 1 a, 1 6 1 b, 1 a, 1 a, 1 1 3 2 1 2 b, 1 1 3 a, 1 6 a, 1 a, 1 3 2 b, 1 1 Not a valid Probabilistic 4 Automaton anymore (acceptance condition 6 a ( a + b ) + 1 1 2 a + ( 1 3 a + b ) not fulfilled)

  28. Constructing Probabilistic Expressions How to iterate? a, 1 b, 1 1 2 5 a, 1 6 a, 1 1 2 1 3 a, 1 3 b, 1 1 4 6 a ( a + b ) + 1 1 2 a + ( 1 3 a + b )

  29. Constructing Probabilistic Expressions How to iterate? a, 1 b, 1 1 2 5 a, 1 6 a, 1 1 2 1 3 a, 1 3 b, 1 1 4 6 a ( a + b ) + 1 1 2 a + ( 1 3 a + b )

  30. Constructing Probabilistic Expressions How to iterate? a, 1 ( 1 6 a ( a + b ) + 1 2 a ) ∗ ( 1 3 a + b ) b, 1 1 2 5 a, 1 a, 1 6 b, 1 b, 1 1 a, 1 1 2 1 3 2 1 3 a, 1 a, 1 6 3 a, 1 2 a, 1 3 b, 1 1 4 6 a ( a + b ) + 1 1 2 a + ( 1 3 a + b )

  31. Constructing Probabilistic Expressions How to iterate? a, 1 ( 1 6 a ( a + b ) + 1 2 a ) ∗ ( 1 3 a + b ) b, 1 1 2 5 a, 1 a, 1 6 b, 1 b, 1 1 a, 1 1 2 1 3 2 1 3 a, 1 a, 1 6 3 a, 1 2 a, 1 3 Keep some branch for b, 1 1 4 termination of the Probabilistic Automaton 6 a ( a + b ) + 1 1 2 a + ( 1 3 a + b )

  32. Probabilistic Expressions

  33. Probabilistic Expressions • a ∈ A and p ∈ [0, 1 ] are PREs

  34. Probabilistic Expressions E • a a ∈ A and p ∈ [0, 1 ] are PREs • if (E a ) a ∈ A are PREs, then ∑ a ∈ A a · E a is a PRE F b

  35. Probabilistic Expressions E • a a ∈ A and p ∈ [0, 1 ] are PREs • if (E a ) a ∈ A are PREs, then ∑ a ∈ A a · E a is a PRE F b • E if E and F are PREs, then p · E + ( 1 - p ) · F is a PRE p F 1 − p

  36. Probabilistic Expressions E • a a ∈ A and p ∈ [0, 1 ] are PREs • if (E a ) a ∈ A are PREs, then ∑ a ∈ A a · E a is a PRE F b • E if E and F are PREs, then p · E + ( 1 - p ) · F is a PRE p • if E and F are PREs, then E · F is a PRE F 1 − p

  37. Probabilistic Expressions E • a a ∈ A and p ∈ [0, 1 ] are PREs • if (E a ) a ∈ A are PREs, then ∑ a ∈ A a · E a is a PRE F b • E if E and F are PREs, then p · E + ( 1 - p ) · F is a PRE p • if E and F are PREs, then E · F is a PRE E • F if E+F is a PRE, then E * · F is a PRE 1 − p F

  38. Probabilistic Expressions E • a a ∈ A and p ∈ [0, 1 ] are PREs • if (E a ) a ∈ A are PREs, then ∑ a ∈ A a · E a is a PRE F b • E if E and F are PREs, then p · E + ( 1 - p ) · F is a PRE p • if E and F are PREs, then E · F is a PRE E • F if E+F is a PRE, then E * · F is a PRE 1 − p F ( a · E) * · b · F ( p · E) * · ( 1 - p ) · F

Recommend


More recommend