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
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
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
1 3 2 a a b a a b
1 3 2 a a b a a b 1 3 2 a a b a a b
1 3 1 2
1 2
a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1
2
b, 1
2
1 3 1 2
1 2
a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1
2
b, 1
2
1 3 1 2 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1 1 3 1 2 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
1 3 1 2 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1 1 3 1 2 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
Σ*→ℝ
a a b
two runs: 1→2→1→3 of weight 1/6x1x1x1=1/6 and 1→1→1→3 of weight 1/2x1/2x1x1=1/4
1 3 1 2 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1 1 3 1 2 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
Σ*→ℝ
a a b
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
1 3 1 2 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1 1 3 1 2 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
Σ*→ℝ
a a b
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
1 3 1 2 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1 1 3 1 2 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
Σ*→ℝ
[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
a a b
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
1 3 1 2 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1 1 3 1 2 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
Σ*→ℝ
P : Q × Σ × Q → [0, 1] Acc(q) + X
q02Q
P(q, a, q0) ≤ 1 for all (q, a) ∈ Q × A
1 3 1 2 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
R e a c t i v e P r
a b i l i s t i c F i n i t e A u t
a t a
P : Q × Σ × Q → [0, 1] Acc(q) + X
q02Q
P(q, a, q0) ≤ 1 for all (q, a) ∈ Q × A
1 3 1 2 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
6a(a + b) + 1 2a)∗( 1 3a + b)
R e a c t i v e P r
a b i l i s t i c F i n i t e A u t
a t a
P : Q × Σ × Q → [0, 1] Acc(q) + X
q02Q
P(q, a, q0) ≤ 1 for all (q, a) ∈ Q × A
Applying Schützenberger’s Theorem
we obtain regular expressions (proper)
1 3 1 2 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
1 3 1 2 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
6a(a + b) + 1 2a)∗( 1 3a + b)
1 3 1 2 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
6a(a + b) + 1 2a)∗( 1 3a + b)
1 3 1 2 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
6a(a + b) + 1 2a)∗( 1 3a + b)
6a(a + b) + 1 2a)∗(a + b)
1 3 1 2 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
6a(a + b) + 1 2a)∗( 1 3a + b)
6a(a + b) + 1 2a)∗(a + b)
1 3 1 2 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
6a(a + b) + 1 2a)∗( 1 3a + b)
6a(a + b) + 1 2a)∗(a + b)
6a(a + b) + 1 2a)∗( 1 3a + 1 2b)
1 3 1 2 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
6a(a + b) + 1 2a)∗( 1 3a + b)
6a(a + b) + 1 2a)∗(a + b)
6a(a + b) + 1 2a)∗( 1 3a + 1 2b)
1 3 1 2 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
6a(a + b) + 1 2a)∗( 1 3a + b)
6a(a + b) + 1 2a)∗(a + b)
6a(a + b) + 1 2a)∗( 1 3a + 1 2b)
Searching for a natural fragment
representing probabilistic behaviors
1 3 1 2 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
1 2 3 1 4 1 5 1 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
1 6a(a + b) + 1 2a + ( 1 3a + b)
1 2 3 1 4 1 5 1 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
1 6a(a + b) + 1 2a + ( 1 3a + b)
1 2 3 1 4 1 5 1 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
1 6a(a + b) + 1 2a + ( 1 3a + b)
1
6a(a + b) + 1 2a + ( 1 3a + b)
∗
1 2 3 1 4 1 5 1 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
1 1 2 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
Not a valid Probabilistic Automaton anymore (acceptance condition not fulfilled)
1 6a(a + b) + 1 2a + ( 1 3a + b)
1
6a(a + b) + 1 2a + ( 1 3a + b)
∗
1 2 3 1 4 1 5 1 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
1 1 2 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
1 6a(a + b) + 1 2a + ( 1 3a + b)
1 2 3 1 4 1 5 1 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
1 6a(a + b) + 1 2a + ( 1 3a + b)
1 2 3 1 4 1 5 1 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
1 6a(a + b) + 1 2a + ( 1 3a + b)
( 1
6a(a + b) + 1 2a)∗( 1 3a + b)
1 2 3 1 4 1 5 1 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
1 3 1 2 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
1 6a(a + b) + 1 2a + ( 1 3a + b)
( 1
6a(a + b) + 1 2a)∗( 1 3a + b)
1 2 3 1 4 1 5 1 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
1 3 1 2 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
a b E F
a b E F p 1 − p E F
a b E F p 1 − p E F
a b E F
E F
p 1 − p E F
(a·E)*·b·F (p·E)*·(1-p)·F
a b E F
E F
p 1 − p E F
associativity of + and ·, distributivity of · over +
(a·E)*·b·F (p·E)*·(1-p)·F
a b E F
E F
p 1 − p E F
associativity of + and ·, distributivity of · over +
(a·E)*·b·F (p·E)*·(1-p)·F
Semantics given as a fragment of regular expressions in complete semirings...
a b E F
E F
P(E · F, u) =
P(E, v) × P(F, w)
p 1 − p E F
(a∗b 1
2a)∗a∗b 1 2b
a∗b 1
2a + a∗b 1 2b
a∗b( 1
2a + 1 2b)
a∗b a + b
1 2a + 1 2b
(a∗b 1
2a)∗a∗b 1 2b
a∗b 1
2a + a∗b 1 2b
a∗b( 1
2a + 1 2b)
a∗b a + b
1 2a + 1 2b
(a∗b 1
2a)∗a∗b 1 2b
a∗b 1
2a + a∗b 1 2b
a∗b( 1
2a + 1 2b)
a∗b a + b
1 2a + 1 2b
(a∗b 1
2a)∗a∗b 1 2b
a∗b 1
2a + a∗b 1 2b
a∗b( 1
2a + 1 2b)
a∗b a + b
1 2a + 1 2b
(a∗b 1
2a)∗a∗b 1 2b
a∗b 1
2a + a∗b 1 2b
a∗b( 1
2a + 1 2b)
a∗b a + b
1 2a + 1 2b
(a∗b 1
2a)∗a∗b 1 2b
a∗b 1
2a + a∗b 1 2b
a∗b( 1
2a + 1 2b)
a∗b a + b
1 2a + 1 2b
(a∗b 1
2a)∗a∗b 1 2b
a∗b 1
2a + a∗b 1 2b
a∗b( 1
2a + 1 2b)
a∗b a + b
1 2a + 1 2b
(a∗b 1
2a)∗a∗b 1 2b
a∗b 1
2a + a∗b 1 2b
a∗b( 1
2a + 1 2b)
a∗b a + b
1 2a + 1 2b
The choice in the star is made far from the beginning...
[1] J. A. Brzozowski and E. J. McCluskey (1963). Signal Flow Graph Techniques for Sequential Circuit State
[1]
[2] G. Berry and R. Sethi (1986). From regular expressions to deterministic automata. Theoretical Computer Science 48.
properties of Probabilistic Automata (for example constructing standard automata, [1,2])
[1]
[2] G. Berry and R. Sethi (1986). From regular expressions to deterministic automata. Theoretical Computer Science 48.
properties of Probabilistic Automata (for example constructing standard automata, [1,2])
then E*·F is a PRE » is not an inductive rule
[1]
[2] G. Berry and R. Sethi (1986). From regular expressions to deterministic automata. Theoretical Computer Science 48.
properties of Probabilistic Automata (for example constructing standard automata, [1,2])
then E*·F is a PRE » is not an inductive rule
normal form: accepting states labelled by subexpressions they are computing
[1]
[2] G. Berry and R. Sethi (1986). From regular expressions to deterministic automata. Theoretical Computer Science 48.
properties of Probabilistic Automata (for example constructing standard automata, [1,2])
then E*·F is a PRE » is not an inductive rule
normal form: accepting states labelled by subexpressions they are computing
A ι
E F
[1]
[2] G. Berry and R. Sethi (1986). From regular expressions to deterministic automata. Theoretical Computer Science 48.
properties of Probabilistic Automata (for example constructing standard automata, [1,2])
then E*·F is a PRE » is not an inductive rule
normal form: accepting states labelled by subexpressions they are computing
A ι
E F
[1]
[2] G. Berry and R. Sethi (1986). From regular expressions to deterministic automata. Theoretical Computer Science 48.
properties of Probabilistic Automata (for example constructing standard automata, [1,2])
then E*·F is a PRE » is not an inductive rule
normal form: accepting states labelled by subexpressions they are computing
A ι
E F
[1]
[2] G. Berry and R. Sethi (1986). From regular expressions to deterministic automata. Theoretical Computer Science 48.
properties of Probabilistic Automata (for example constructing standard automata, [1,2])
then E*·F is a PRE » is not an inductive rule
normal form: accepting states labelled by subexpressions they are computing
A ι
E F
[1]
[2] G. Berry and R. Sethi (1986). From regular expressions to deterministic automata. Theoretical Computer Science 48.
properties of Probabilistic Automata (for example constructing standard automata, [1,2])
then E*·F is a PRE » is not an inductive rule
normal form: accepting states labelled by subexpressions they are computing
A ι
E F
[1]
[2] G. Berry and R. Sethi (1986). From regular expressions to deterministic automata. Theoretical Computer Science 48.
properties of Probabilistic Automata (for example constructing standard automata, [1,2])
then E*·F is a PRE » is not an inductive rule
normal form: accepting states labelled by subexpressions they are computing
A ι
E F
[1]
[2] G. Berry and R. Sethi (1986). From regular expressions to deterministic automata. Theoretical Computer Science 48.
properties of Probabilistic Automata (for example constructing standard automata, [1,2])
then E*·F is a PRE » is not an inductive rule
normal form: accepting states labelled by subexpressions they are computing
A ι
E F
A ι
E∗ · F
1
[1]
[2] G. Berry and R. Sethi (1986). From regular expressions to deterministic automata. Theoretical Computer Science 48.
[1] M.-P . Schützenberger (1961). On the Definition of a Family of Automata. Information and Control. [2] A. Paz. (1971). Introduction to probabilistic automata. Academic Press,
models (classical, extended to two-way automata, pebble automata in full paper [1])
permits us to better understand which behavior Probabilistic Automata can generate
and pebbles) can be evaluated efficiently
expressivity, and implement quick algorithms to perform translation from PREs to PAs (as there are some for weighted automata, see [2,3] e.g.)
[1] B. Bollig, P . Gastin, B. M. and M. Zeitoun. (2012). A Probabilistic Kleene Theorem. In Proceedings of ATVA’12. [2] P . Gastin and B. M. (2006). Adding Pebbles to Weighted Automata. In Proceedings of CIAA’12. [3] C. Allauzen, and M., Mohri, (2006). A Unified Construction of the Glushkov, Follow, and Antimirov Automata. In Proceedings of MFCS’06
1 3 2 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
P : Q × Σ × Q → [0, 1] Acc(q) + X
q02Q
P(q, a, q0) ≤ 1 for all (q, a) ∈ Q × A
1 3 2 a, 1
2
a, 1
3
b, 1 a, 1
6
a, 1 b, 1
+ indeed we can drop it using a right marker ◁ in words
P : Q × Σ × Q → [0, 1] Acc(q) + X
q02Q
P(q, a, q0) ≤ 1 for all (q, a) ∈ Q × A
1 2 n − 2 n − 1 n s 1 − s s 1 − s . . . s 1 − s s
◁
1 2 n − 2 n − 1 n s 1 − s s 1 − s . . . s 1 − s s
Expressible with Probabilistic 2-way Automata
s, ¬⊳?, → (1 − s), ¬⊳?, ← ⊳?
◁
1 2 n − 2 n − 1 n s 1 − s s 1 − s . . . s 1 − s s
Expressible with Probabilistic 2-way Automata Expressible with Probabilistic 2-way Expressions
s, ¬⊳?, → (1 − s), ¬⊳?, ← ⊳?
◁
E =
∗⊳?
1 2 n − 2 n − 1 n s 1 − s s 1 − s . . . s 1 − s s
Expressible with Probabilistic 2-way Automata Expressible with Probabilistic 2-way Expressions Not expressible with Probabilistic Expressions / Probabilistic Automata
s, ¬⊳?, → (1 − s), ¬⊳?, ← ⊳?
◁
E =
∗⊳?
1 2 n − 2 n − 1 n s 1 − s s 1 − s . . . s 1 − s s
Expressible with Probabilistic 2-way Automata Expressible with Probabilistic 2-way Expressions
Not expressible with Probabilistic Expressions / Probabilistic Automata
s, ¬⊳?, → (1 − s), ¬⊳?, ← ⊳?
◁
E =
∗⊳?
1 2 n − 2 n − 1 n s 1 − s s 1 − s . . . s 1 − s s
Expressible with Probabilistic 2-way Automata Expressible with Probabilistic 2-way Expressions
Not expressible with Probabilistic Expressions / Probabilistic Automata
s, ¬⊳?, → (1 − s), ¬⊳?, ← ⊳?
◁
E =
∗⊳?
Each LTL formula φ has an implicit free variable x denoting the position where the formula is
Let P(φ, u, i ) denote the probability that φ holds on word u at position i.
P(G ϕ, u, i) = Q
j≥i P(ϕ, u, j)
AG ϕ(x) = ⊳? Aϕ(x)
OK KO
→ x? → ↓x ⊳?↑
Each LTL formula φ has an implicit free variable x denoting the position where the formula is
Let P(φ, u, i ) denote the probability that φ holds on word u at position i.
P(G ϕ, u, i) = Q
j≥i P(ϕ, u, j)
AG ϕ(x) = ⊳? Aϕ(x)
OK KO
→ x? → ↓x ⊳?↑ P(G ϕ, u, i) = Q
j≥i P(ϕ, u, j)
AG ϕ(x) = ⊳? Aϕ(x)
OK KO
→ x? → ↓x ⊳?↑
EG ϕ(x) = ⊲?→∗x?
∗⊳?
Each LTL formula φ has an implicit free variable x denoting the position where the formula is
Let P(φ, u, i ) denote the probability that φ holds on word u at position i.
P(F ϕ, u, i) = P(ϕ, u, i) + (1 − P(ϕ, u, i)) × P(F ϕ, u, i + 1) = P
j≥i
⇣Q
i≤k<j P(¬ϕ, u, k)
⌘ × P(ϕ, u, j) AF ϕ(x) = ⊳? Aϕ(x)
OK KO
→ x? → ↓x ⊳?↑ ⊳?↑ → P(F ϕ, u, i) = P(ϕ, u, i) + (1 − P(ϕ, u, i)) × P(F ϕ, u, i + 1) = P
j≥i
⇣Q
i≤k<j P(¬ϕ, u, k)
⌘ × P(ϕ, u, j) AF ϕ(x) = ⊳? Aϕ(x)
OK KO
→ x? → ↓x ⊳?↑ ⊳?↑ →
EF ϕ(x) = ⊲?→∗x?
∗(x!Eϕ(x))→∗⊳?
Theorem PREs and PAs are expressively equivalent. 2-way PREs and 2-way PAs are expressively equivalent. Pebble PREs and Pebble PAs are expressively equivalent.
Probabilistic models (classical, two-way, pebbles...)
extensions permits us to better understand which behavior Probabilistic Automata can generate
way and pebbles can be evaluated efficiently
same expressivity, and implement quick algorithms to perform translation from PREs to PAs (as there are some for weighted automata, see [2,1] e.g.)
[1] P . Gastin and B. M. (2006). Adding Pebbles to Weighted Automata. In Proceedings of CIAA’12. [2] C. Allauzen, and M., Mohri, (2006). A Unified Construction of the Glushkov, Follow, and Antimirov Automata. In Proceedings of MFCS’06