A probabilistic Kleene Theoremmovep.lif.univ-mrs.fr/documents/monmege-slides.pdf · A probabilistic...

Post on 05-Oct-2020

9 views 0 download

Transcript of A probabilistic Kleene Theoremmovep.lif.univ-mrs.fr/documents/monmege-slides.pdf · A probabilistic...

A probabilistic Kleene Theorem

Benjamin MonmegeLSV, ENS Cachan, CNRS, France

MOVEP 2012, Marseille

Part of works published at ATVA’12 with Benedikt Bollig, Paul Gastin and Marc Zeitoun

Kleene’s Theorem

Finite State Automata

Regular Expressions

same expressivity

E ::= a | E+E | E·E | E*

1 32

a

a

b

a

a

b

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

Kleene’s Theorem

Finite State Automata

Regular Expressions

same expressivity

E ::= a | E+E | E·E | E*

1 32

a

a

b

a

a

b

1 32

a

a

b

a

a

b

Kleene’s Theorem

Finite State Automata

Regular Expressions

same expressivity

Weighted

E ::= a | E+E | E·E | E*

1 31

21

2

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1

2

b, 1

2

1 31

21

2

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1

2

b, 1

2

Kleene’s Theorem

Finite State Automata

Regular Expressions

same expressivity

Weighted

E ::= a | E+E | E·E | E*

1 31

2

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1

b, 1

1 31

2

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1

b, 1

Kleene’s Theorem

Finite State Automata

Regular Expressions

same expressivity

Weighted

E ::= a | E+E | E·E | E*

1 31

2

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1

b, 1

1 31

2

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1

b, 1

Σ*→ℝ

Kleene’s Theorem

Finite State Automata

Regular Expressions

same expressivity

Weighted

E ::= a | E+E | E·E | E*

a a btwo runs: 1→2→1→3 of weight 1/6x1x1x1=1/6 and 1→1→1→3 of weight 1/2x1/2x1x1=1/4

1 31

2

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1

b, 1

1 31

2

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1

b, 1

Σ*→ℝ

Kleene’s Theorem

Finite State Automata

Regular Expressions

same expressivity

Weighted

E ::= a | E+E | E·E | E*

a a btwo 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 31

2

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1

b, 1

1 31

2

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1

b, 1

Σ*→ℝ

Kleene’s Theorem

Finite State Automata

Regular Expressions

same expressivity

Weighted

Weighted

E ::= a | E+E | E·E | E*E properp |

a a btwo 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 31

2

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1

b, 1

1 31

2

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1

b, 1

Σ*→ℝ

Kleene’s Theorem

Finite State Automata

Regular Expressions

same expressivity

Schützenberger

Weighted

Weighted

E ::= a | E+E | E·E | E*E properp |

[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.

a a btwo 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 31

2

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1

b, 1

1 31

2

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1

b, 1

Σ*→ℝ

Probabilistic case?

A = (Q, !,Acc,P)P : Q! !!Q " [0, 1]

Acc(q) +X

q02Q

P(q, a, q0) 1 for all (q, a) 2 Q ⇥ A

1 31

2

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1

b, 1

Probabilistic case?

Reactive Probabilistic

Finite Automata

A = (Q, !,Acc,P)P : Q! !!Q " [0, 1]

Acc(q) +X

q02Q

P(q, a, q0) 1 for all (q, a) 2 Q ⇥ A

1 31

2

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1

b, 1

Probabilistic case?

( 16a(a+ b) + 1

2a)!( 1

3a+ b)

Reactive Probabilistic

Finite Automata

A = (Q, !,Acc,P)P : Q! !!Q " [0, 1]

Acc(q) +X

q02Q

P(q, a, q0) 1 for all (q, a) 2 Q ⇥ AApplying Schützenberger’s Theorem

over these special Weighted Automata,

we obtain regular expressions (proper)

1 31

2

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1

b, 1

What kind of expressions?

1 31

2

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1

b, 1

What kind of expressions?

( 16a(a+ b) + 1

2a)!( 1

3a+ b)

1 31

2

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1

b, 1

What kind of expressions?

( 16a(a+ b) + 1

2a)!( 1

3a+ b)

1 31

2

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1

b, 1

What kind of expressions?

( 16a(a+ b) + 1

2a)!( 1

3a+ b)

( 16a(a+ b) + 1

2a)!(a+ b)

1 31

2

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1

b, 1

What kind of expressions?

( 16a(a+ b) + 1

2a)!( 1

3a+ b)

( 16a(a+ b) + 1

2a)!(a+ b)

1 31

2

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1

b, 1

What kind of expressions?

( 16a(a+ b) + 1

2a)!( 1

3a+ b)

( 16a(a+ b) + 1

2a)!(a+ b)

( 16a(a+ b) + 1

2a)!( 1

3a+ 1

2b)

1 31

2

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1

b, 1

What kind of expressions?

( 16a(a+ b) + 1

2a)!( 1

3a+ b)

( 16a(a+ b) + 1

2a)!(a+ b)

( 16a(a+ b) + 1

2a)!( 1

3a+ 1

2b)

1 31

2

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1

b, 1

What kind of expressions?

( 16a(a+ b) + 1

2a)!( 1

3a+ b)

( 16a(a+ b) + 1

2a)!(a+ b)

( 16a(a+ b) + 1

2a)!( 1

3a+ 1

2b)

Searching for a natural fragment of weighted regular expressions

representing probabilistic behaviors 1 31

2

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1

b, 1

Constructing Probabilistic ExpressionsHow to iterate?

1

2

31

41

51

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1b, 1

Constructing Probabilistic ExpressionsHow to iterate?

1

6a(a+ b) + 1

2a+ ( 1

3a+ b)

1

2

31

41

51

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1b, 1

Constructing Probabilistic ExpressionsHow to iterate?

1

6a(a+ b) + 1

2a+ ( 1

3a+ b)

1

2

31

41

51

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1b, 1

Constructing Probabilistic ExpressionsHow to iterate?

1

6a(a+ b) + 1

2a+ ( 1

3a+ b)

!

1

6a(a+ b) + 1

2a+ ( 1

3a+ b)

"!

1

2

31

41

51

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1b, 1

1

1

2

a, 1

2

a, 1

3

b, 1a, 1

6

a, 1b, 1

Constructing Probabilistic ExpressionsHow to iterate?

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

31

41

51

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1b, 1

1

1

2

a, 1

2

a, 1

3

b, 1a, 1

6

a, 1b, 1

Constructing Probabilistic ExpressionsHow to iterate?

1

6a(a+ b) + 1

2a+ ( 1

3a+ b)

1

2

31

41

51

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1b, 1

Constructing Probabilistic ExpressionsHow to iterate?

1

6a(a+ b) + 1

2a+ ( 1

3a+ b)

1

2

31

41

51

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1b, 1

Constructing Probabilistic ExpressionsHow to iterate?

1

6a(a+ b) + 1

2a+ ( 1

3a+ b)

( 16a(a+ b) + 1

2a)!( 1

3a+ b)

1

2

31

41

51

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1b, 1

1 31

2

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1

b, 1

Constructing Probabilistic ExpressionsHow to iterate?

Keep some branch for termination of the

Probabilistic Automaton1

6a(a+ b) + 1

2a+ ( 1

3a+ b)

( 16a(a+ b) + 1

2a)!( 1

3a+ b)

1

2

31

41

51

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1b, 1

1 31

2

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1

b, 1

Probabilistic Expressions

Probabilistic Expressions

• a∈A and p∈[0,1] are PREs

Probabilistic Expressions

• a∈A and p∈[0,1] are PREs

• if (Ea)a∈A are PREs, then ∑a∈A a·Ea is a PRE

a

b

E

F

Probabilistic Expressions

• a∈A and p∈[0,1] are PREs

• if (Ea)a∈A are PREs, then ∑a∈A a·Ea is a PRE

• if E and F are PREs, then p·E + (1-p)·F is a PRE

a

b

E

F

p

1! p

E

F

Probabilistic Expressions

• a∈A and p∈[0,1] are PREs

• if (Ea)a∈A are PREs, then ∑a∈A a·Ea is a PRE

• if E and F are PREs, then p·E + (1-p)·F is a PRE

• if E and F are PREs, then E·F is a PRE

a

b

E

F

p

1! p

E

F

Probabilistic Expressions

• a∈A and p∈[0,1] are PREs

• if (Ea)a∈A are PREs, then ∑a∈A a·Ea is a PRE

• if E and F are PREs, then p·E + (1-p)·F is a PRE

• if E and F are PREs, then E·F is a PRE

• if E+F is a PRE, then E*·F is a PRE

a

b

E

F

E

F

p

1! p

E

F

Probabilistic Expressions

• a∈A and p∈[0,1] are PREs

• if (Ea)a∈A are PREs, then ∑a∈A a·Ea is a PRE

• if E and F are PREs, then p·E + (1-p)·F is a PRE

• if E and F are PREs, then E·F is a PRE

• if E+F is a PRE, then E*·F is a PRE

(a·E)*·b·F(p·E)*·(1-p)·F

a

b

E

F

E

F

p

1! p

E

F

Probabilistic Expressions

• Closure of PRE under commutativity of +, associativity of + and ·, distributivity of · over +

• a∈A and p∈[0,1] are PREs

• if (Ea)a∈A are PREs, then ∑a∈A a·Ea is a PRE

• if E and F are PREs, then p·E + (1-p)·F is a PRE

• if E and F are PREs, then E·F is a PRE

• if E+F is a PRE, then E*·F is a PRE

(a·E)*·b·F(p·E)*·(1-p)·F

a

b

E

F

E

F

p

1! p

E

F

Probabilistic Expressions

• Closure of PRE under commutativity of +, associativity of + and ·, distributivity of · over +

• a∈A and p∈[0,1] are PREs

• if (Ea)a∈A are PREs, then ∑a∈A a·Ea is a PRE

• if E and F are PREs, then p·E + (1-p)·F is a PRE

• if E and F are PREs, then E·F is a PRE

• if E+F is a PRE, then E*·F is a PRE

(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) =!

u=vw

P(E, v)! P(F,w)

p

1! p

E

F

Example

(a!b 12a)!a!b 1

2b

a!b 12a+ a!b 1

2b

a!b( 12a+ 1

2b)

a!b

a+ b

1

2a+ 1

2b

Example

(a!b 12a)!a!b 1

2b

a!b 12a+ a!b 1

2b

a!b( 12a+ 1

2b)

a!b

a+ b

1

2a+ 1

2b

Deterministic choice

Example

(a!b 12a)!a!b 1

2b

a!b 12a+ a!b 1

2b

a!b( 12a+ 1

2b)

a!b

a+ b

1

2a+ 1

2b

Star rule

Deterministic choice

Example

(a!b 12a)!a!b 1

2b

a!b 12a+ a!b 1

2b

a!b( 12a+ 1

2b)

a!b

a+ b

1

2a+ 1

2b

Star rule

Deterministic choice

Probabilistic choice

Example

(a!b 12a)!a!b 1

2b

a!b 12a+ a!b 1

2b

a!b( 12a+ 1

2b)

a!b

a+ b

1

2a+ 1

2b

Star rule

Concatenation rule

Deterministic choice

Probabilistic choice

Example

(a!b 12a)!a!b 1

2b

a!b 12a+ a!b 1

2b

a!b( 12a+ 1

2b)

a!b

a+ b

1

2a+ 1

2b

Star rule

Concatenation rule

Distributivity of · over +

Deterministic choice

Probabilistic choice

Example

(a!b 12a)!a!b 1

2b

a!b 12a+ a!b 1

2b

a!b( 12a+ 1

2b)

a!b

a+ b

1

2a+ 1

2b

Star rule

Concatenation rule

Distributivity of · over +

Star rule

Deterministic choice

Probabilistic choice

Example

(a!b 12a)!a!b 1

2b

a!b 12a+ a!b 1

2b

a!b( 12a+ 1

2b)

a!b

a+ b

1

2a+ 1

2b

Star rule

Concatenation rule

Distributivity of · over +

Star rule

The choice in the star is made far from the beginning...

Deterministic choice

Probabilistic choice

Probabilistic Kleene-Schützenberger Theorem

• Every PRE can be translated into an equivalent Probabilistic automaton.

• Every Probabilistic automaton can be denoted by an equivalent PRE.

From Automata to Expressions

• Usual procedures (Brozozwski-McCluskey, elimination, McNaughton-Yamada...) keeping probabilistic constraints in mind

• Requires to prove some (useful) properties of PREs, e.g., if E+F and G are PREs, then E+F·G is a PRE

[1] J. A. Brzozowski and E. J. McCluskey (1963). Signal Flow Graph Techniques for Sequential Circuit State Diagrams. IEEE Trans. on Electronic Computers 12.

From Expressions to Automata

[1] V. M. Glushkov (1961). The abstract theory of automata. Russian Math. Surveys 16.[2] G. Berry and R. Sethi (1986). From regular expressions to deterministic automata. Theoretical Computer Science 48.

From Expressions to Automata• We have to prove closure

properties of Probabilistic Automata (for example constructing standard automata, [1,2])

[1] V. M. Glushkov (1961). The abstract theory of automata. Russian Math. Surveys 16.[2] G. Berry and R. Sethi (1986). From regular expressions to deterministic automata. Theoretical Computer Science 48.

From Expressions to Automata• We have to prove closure

properties of Probabilistic Automata (for example constructing standard automata, [1,2])

• Problem: « if E+F is a PRE, then E*·F is a PRE » is not an inductive rule

[1] V. M. Glushkov (1961). The abstract theory of automata. Russian Math. Surveys 16.[2] G. Berry and R. Sethi (1986). From regular expressions to deterministic automata. Theoretical Computer Science 48.

From Expressions to Automata• We have to prove closure

properties of Probabilistic Automata (for example constructing standard automata, [1,2])

• Problem: « if E+F is a PRE, then E*·F is a PRE » is not an inductive rule

• Probabilistic Automata in a normal form: accepting states labelled by subexpressions they are computing

[1] V. M. Glushkov (1961). The abstract theory of automata. Russian Math. Surveys 16.[2] G. Berry and R. Sethi (1986). From regular expressions to deterministic automata. Theoretical Computer Science 48.

From Expressions to Automata• We have to prove closure

properties of Probabilistic Automata (for example constructing standard automata, [1,2])

• Problem: « if E+F is a PRE, then E*·F is a PRE » is not an inductive rule

• Probabilistic Automata in a normal form: accepting states labelled by subexpressions they are computing

A!

E

F

[1] V. M. Glushkov (1961). The abstract theory of automata. Russian Math. Surveys 16.[2] G. Berry and R. Sethi (1986). From regular expressions to deterministic automata. Theoretical Computer Science 48.

From Expressions to Automata• We have to prove closure

properties of Probabilistic Automata (for example constructing standard automata, [1,2])

• Problem: « if E+F is a PRE, then E*·F is a PRE » is not an inductive rule

• Probabilistic Automata in a normal form: accepting states labelled by subexpressions they are computing

A!

E

F

[1] V. M. Glushkov (1961). The abstract theory of automata. Russian Math. Surveys 16.[2] G. Berry and R. Sethi (1986). From regular expressions to deterministic automata. Theoretical Computer Science 48.

From Expressions to Automata• We have to prove closure

properties of Probabilistic Automata (for example constructing standard automata, [1,2])

• Problem: « if E+F is a PRE, then E*·F is a PRE » is not an inductive rule

• Probabilistic Automata in a normal form: accepting states labelled by subexpressions they are computing

A!

E

F

[1] V. M. Glushkov (1961). The abstract theory of automata. Russian Math. Surveys 16.[2] G. Berry and R. Sethi (1986). From regular expressions to deterministic automata. Theoretical Computer Science 48.

From Expressions to Automata• We have to prove closure

properties of Probabilistic Automata (for example constructing standard automata, [1,2])

• Problem: « if E+F is a PRE, then E*·F is a PRE » is not an inductive rule

• Probabilistic Automata in a normal form: accepting states labelled by subexpressions they are computing

A!

E

F

[1] V. M. Glushkov (1961). The abstract theory of automata. Russian Math. Surveys 16.[2] G. Berry and R. Sethi (1986). From regular expressions to deterministic automata. Theoretical Computer Science 48.

From Expressions to Automata• We have to prove closure

properties of Probabilistic Automata (for example constructing standard automata, [1,2])

• Problem: « if E+F is a PRE, then E*·F is a PRE » is not an inductive rule

• Probabilistic Automata in a normal form: accepting states labelled by subexpressions they are computing

A!

E

F

[1] V. M. Glushkov (1961). The abstract theory of automata. Russian Math. Surveys 16.[2] G. Berry and R. Sethi (1986). From regular expressions to deterministic automata. Theoretical Computer Science 48.

From Expressions to Automata• We have to prove closure

properties of Probabilistic Automata (for example constructing standard automata, [1,2])

• Problem: « if E+F is a PRE, then E*·F is a PRE » is not an inductive rule

• Probabilistic Automata in a normal form: accepting states labelled by subexpressions they are computing

A!

E

F

[1] V. M. Glushkov (1961). The abstract theory of automata. Russian Math. Surveys 16.[2] G. Berry and R. Sethi (1986). From regular expressions to deterministic automata. Theoretical Computer Science 48.

From Expressions to Automata• We have to prove closure

properties of Probabilistic Automata (for example constructing standard automata, [1,2])

• Problem: « if E+F is a PRE, then E*·F is a PRE » is not an inductive rule

• Probabilistic Automata in a normal form: accepting states labelled by subexpressions they are computing

A!

E

F

A!

E!· F

1

[1] V. M. Glushkov (1961). The abstract theory of automata. Russian Math. Surveys 16.[2] G. Berry and R. Sethi (1986). From regular expressions to deterministic automata. Theoretical Computer Science 48.

Corollaries

• Equivalence problem for PREs is decidable: given PREs E and F, does they generate the same semantics? (translation into automata [1])

• Threshold problem for PREs is undecidable: given a PRE E and a threshold s, is there a word w which is mapped by to a probability greater than s? (by reduction to automata [2])

[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,

Summary and Future Works• General Kleene-Schützenberger theorems for Probabilistic

models (classical, extended to two-way automata, pebble automata in full paper [1])

• Study of Probabilistic Expressions and their extensions permits us to better understand which behavior Probabilistic Automata can generate

• In [2], we proved that Weighted Automata (with two-way and pebbles) can be evaluated efficiently

• Future work: get logical formalisms generating the same 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

Automata Model

1 32

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1

b, 1Usual Rabin automata...

A = (Q, !,Acc,P)P : Q! !!Q " [0, 1]

Acc(q) +X

q02Q

P(q, a, q0) 1 for all (q, a) 2 Q ⇥ A

Automata Model

1 32

a, 1

2

a, 1

3

b, 1

a, 1

6

a, 1

b, 1Usual Rabin automata...

GOAL: Remove all trace of non-determinism- seems to be a strong restriction

+ indeed we can drop it using a right marker ◁ in words

A = (Q, !,Acc,P)P : Q! !!Q " [0, 1]

Acc(q) +X

q02Q

P(q, a, q0) 1 for all (q, a) 2 Q ⇥ A

2-way Probabilistic Expressions

Random walk

E = (¬/?(s!+ (1� s)¬.? ))⇤ /?

Random walk on a word u of length n (Markov chain):

0 1 2 n! 2 n! 1 n

s

1! s

s

1! s

. . .s

1! s

s

With 0 < s < 1 and ↵ = 1�s

s

, one can show that

[[E]](u) =1

1 + ↵+ . . .+ ↵|u|

Expression E computes an infinite sum of positive values.

Random Walk over a finite linear graph

2-way Probabilistic Expressions

Random walk

E = (¬/?(s!+ (1� s)¬.? ))⇤ /?

Random walk on a word u of length n (Markov chain):

0 1 2 n! 2 n! 1 n

s

1! s

s

1! s

. . .s

1! s

s

With 0 < s < 1 and ↵ = 1�s

s

, one can show that

[[E]](u) =1

1 + ↵+ . . .+ ↵|u|

Expression E computes an infinite sum of positive values.

Random Walk over a finite linear graph

Expressible with Probabilistic 2-way Automata

s,¬!?,!

(1" s),¬!?,#

!?

2-way Probabilistic Expressions

Random walk

E = (¬/?(s!+ (1� s)¬.? ))⇤ /?

Random walk on a word u of length n (Markov chain):

0 1 2 n! 2 n! 1 n

s

1! s

s

1! s

. . .s

1! s

s

With 0 < s < 1 and ↵ = 1�s

s

, one can show that

[[E]](u) =1

1 + ↵+ . . .+ ↵|u|

Expression E computes an infinite sum of positive values.

Random Walk over a finite linear graph

Expressible with Probabilistic 2-way Automata Expressible with

Probabilistic 2-way Expressionss,¬!?,!

(1" s),¬!?,#

!?

E =!

¬!?s!+ ¬!?(1" s)#"!!?

2-way Probabilistic Expressions

Random walk

E = (¬/?(s!+ (1� s)¬.? ))⇤ /?

Random walk on a word u of length n (Markov chain):

0 1 2 n! 2 n! 1 n

s

1! s

s

1! s

. . .s

1! s

s

With 0 < s < 1 and ↵ = 1�s

s

, one can show that

[[E]](u) =1

1 + ↵+ . . .+ ↵|u|

Expression E computes an infinite sum of positive values.

Random Walk over a finite linear graph

Expressible with Probabilistic 2-way Automata Expressible with

Probabilistic 2-way Expressions

Not expressible with Probabilistic Expressions / Probabilistic Automata

s,¬!?,!

(1" s),¬!?,#

!?

E =!

¬!?s!+ ¬!?(1" s)#"!!?

2-way Probabilistic Expressions

Random walk

E = (¬/?(s!+ (1� s)¬.? ))⇤ /?

Random walk on a word u of length n (Markov chain):

0 1 2 n! 2 n! 1 n

s

1! s

s

1! s

. . .s

1! s

s

With 0 < s < 1 and ↵ = 1�s

s

, one can show that

[[E]](u) =1

1 + ↵+ . . .+ ↵|u|

Expression E computes an infinite sum of positive values.

Random Walk over a finite linear graph

Expressible with Probabilistic 2-way Automata Expressible with

Probabilistic 2-way Expressions

Idea: replace every letter a by a test a? followed by a move (either → or ←)

Not expressible with Probabilistic Expressions / Probabilistic Automata

s,¬!?,!

(1" s),¬!?,#

!?

E =!

¬!?s!+ ¬!?(1" s)#"!!?

2-way Probabilistic Expressions

Random walk

E = (¬/?(s!+ (1� s)¬.? ))⇤ /?

Random walk on a word u of length n (Markov chain):

0 1 2 n! 2 n! 1 n

s

1! s

s

1! s

. . .s

1! s

s

With 0 < s < 1 and ↵ = 1�s

s

, one can show that

[[E]](u) =1

1 + ↵+ . . .+ ↵|u|

Expression E computes an infinite sum of positive values.

Random Walk over a finite linear graph

Expressible with Probabilistic 2-way Automata Expressible with

Probabilistic 2-way Expressions

Idea: replace every letter a by a test a? followed by a move (either → or ←)

Expressiveness result still holds!

Not expressible with Probabilistic Expressions / Probabilistic Automata

s,¬!?,!

(1" s),¬!?,#

!?

E =!

¬!?s!+ ¬!?(1" s)#"!!?

Adding Pebbles: pLTLEach LTL formula φ has an implicit free variable x denoting the position where the formula is evaluated. We use a pebble to mark this position.

Let P(φ, u, i ) denote the probability that φ holds on word u at position i.

14/42

Probabilistic LTLEach LTL formula ' has an implicit free variable x denoting the position where theformula is evaluated. We use a pebble to mark this position.

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!?#

I Pebbles are reusable:

I Hiding policy: only the last dropped occurrence of a pebble is visible.

I Stack policy: the lifted pebble is the last dropped pebble.

Adding Pebbles: pLTLEach LTL formula φ has an implicit free variable x denoting the position where the formula is evaluated. We use a pebble to mark this position.

Let P(φ, u, i ) denote the probability that φ holds on word u at position i.

14/42

Probabilistic LTLEach LTL formula ' has an implicit free variable x denoting the position where theformula is evaluated. We use a pebble to mark this position.

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!?#

I Pebbles are reusable:

I Hiding policy: only the last dropped occurrence of a pebble is visible.

I Stack policy: the lifted pebble is the last dropped pebble.

14/42

Probabilistic LTLEach LTL formula ' has an implicit free variable x denoting the position where theformula is evaluated. We use a pebble to mark this position.

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!?#

I Pebbles are reusable:

I Hiding policy: only the last dropped occurrence of a pebble is visible.

I Stack policy: the lifted pebble is the last dropped pebble.

EG!(x) = !?!!x?!

(x!E!(x))!"!"?

Adding Pebbles: pLTLEach LTL formula φ has an implicit free variable x denoting the position where the formula is evaluated. We use a pebble to mark this position.

Let P(φ, u, i ) denote the probability that φ holds on word u at position i.

15/42

Probabilistic LTL

P(F', u, i) = P(', u, i) + (1� P(', u, i))⇥ P(F', u, i+ 1)

=P

j�i

⇣Qik<j

P(¬', u, k)⌘⇥ P(', u, j)

AF'

(x) =!?

A!(x)OK

KO

!

x? !

"x!?#

!?#

!

15/42

Probabilistic LTL

P(F', u, i) = P(', u, i) + (1� P(', u, i))⇥ P(F', u, i+ 1)

=P

j�i

⇣Qik<j

P(¬', u, k)⌘⇥ P(', u, j)

AF'

(x) =!?

A!(x)OK

KO

!

x? !

"x!?#

!?#

!

EF!(x) = !?!!x?!

(x!E¬!(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.

1-way2-way

Pebble

Extensions

• Add 2-way and pebbles in automata and expressions (XPath-like syntax)

• Possibility to express more, e.g. smaller probabilities (to represent rare events)

• Still a natural way to denote probabilistic properties about words

Conclusion• General Kleene-Schützenberger theorems for

Probabilistic models (classical, two-way, pebbles...)

• Study of Probabilistic Expressions and their extensions permits us to better understand which behavior Probabilistic Automata can generate

• In [1], we proved that Weighted Automata with two-way and pebbles can be evaluated efficiently

• Future work: get logical formalisms generating the 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