215
Duality for Transition Systems Prakash Panangaden 1 1 School of Computer Science McGill University work done while on sabbatical leave at Oxford University Australian Category Seminar: 27th Feb 2013 Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 1 / 79

Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Duality for Transition Systems

Prakash Panangaden1

1School of Computer ScienceMcGill University

work done while on sabbatical leave atOxford University

Australian Category Seminar: 27th Feb 2013

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 1 / 79

Page 2: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Introduction

Opening remarks

Thanks to Annabelle Mciver for inviting me to MacquarieUniversity

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 2 / 79

Page 3: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Introduction

Opening remarks

Thanks to Annabelle Mciver for inviting me to MacquarieUniversity

and to the Australian Category Seminar for hosting this talk.

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 2 / 79

Page 4: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Introduction

Opening remarks

Thanks to Annabelle Mciver for inviting me to MacquarieUniversity

and to the Australian Category Seminar for hosting this talk.

Thanks to Prof. Mingsheng Ying for inviting me once again towonderful Sydney, Australia.

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 2 / 79

Page 5: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Introduction

Opening remarks

Thanks to Annabelle Mciver for inviting me to MacquarieUniversity

and to the Australian Category Seminar for hosting this talk.

Thanks to Prof. Mingsheng Ying for inviting me once again towonderful Sydney, Australia.

Cricket prediction for Australia v India: 1-1.

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 2 / 79

Page 6: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Introduction

Overview

We have discovered an - apparently - new kind of duality forautomata.

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 3 / 79

Page 7: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Introduction

Overview

We have discovered an - apparently - new kind of duality forautomata.

Special case of this construction known since 1962 to Brzozowski.

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 3 / 79

Page 8: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Introduction

Overview

We have discovered an - apparently - new kind of duality forautomata.

Special case of this construction known since 1962 to Brzozowski.

Works for probabilistic automata.

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 3 / 79

Page 9: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Introduction

Overview

We have discovered an - apparently - new kind of duality forautomata.

Special case of this construction known since 1962 to Brzozowski.

Works for probabilistic automata.

Seems interesting for learning and planning.

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 3 / 79

Page 10: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Joint work with Doina Precup, Joelle Pineau at the RL Lab at McGilland Chris Hundt now working for Google. More recently with NickBezhanishvili and Clemens Kupke. Now also with Helle Hvid Hansen,Alexandra Silva, Jan Rutten, Dexter Kozen, Marcello Bonsangue andFilippo Bonchi.

Page 11: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

What is duality?

Often in mathematics one has two types of structures: Shiv andVish.

Page 12: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

What is duality?

Often in mathematics one has two types of structures: Shiv andVish.

It turns out that every Shiv has an associated Vish and vice versa.

Page 13: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

What is duality?

Often in mathematics one has two types of structures: Shiv andVish.

It turns out that every Shiv has an associated Vish and vice versa.

If one starts with a Vish, construct the associated Shiv and comeback one gets “practically” the same Vish that one started with.

Page 14: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

What is duality?

Often in mathematics one has two types of structures: Shiv andVish.

It turns out that every Shiv has an associated Vish and vice versa.

If one starts with a Vish, construct the associated Shiv and comeback one gets “practically” the same Vish that one started with.

This means that these two – apparently – different structures areactually two different descriptions of the same thing.

Page 15: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

What is duality?

Often in mathematics one has two types of structures: Shiv andVish.

It turns out that every Shiv has an associated Vish and vice versa.

If one starts with a Vish, construct the associated Shiv and comeback one gets “practically” the same Vish that one started with.

This means that these two – apparently – different structures areactually two different descriptions of the same thing.

Thus, one has two completely different sets of theorems that onecan use.

Page 16: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Examples of Duality

Maximum and minimum principles for linear programming.

Page 17: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Examples of Duality

Maximum and minimum principles for linear programming.

Boolean algebras and Stone spaces.

Page 18: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Examples of Duality

Maximum and minimum principles for linear programming.

Boolean algebras and Stone spaces.

Logics and Transition systems.

Page 19: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Examples of Duality

Maximum and minimum principles for linear programming.

Boolean algebras and Stone spaces.

Logics and Transition systems.

State transformer semantics and weakest precondition semantics.

Page 20: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Examples of Duality

Maximum and minimum principles for linear programming.

Boolean algebras and Stone spaces.

Logics and Transition systems.

State transformer semantics and weakest precondition semantics.

Measures and random variables.

Page 21: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Examples of Duality

Maximum and minimum principles for linear programming.

Boolean algebras and Stone spaces.

Logics and Transition systems.

State transformer semantics and weakest precondition semantics.

Measures and random variables.

Compact groups and discrete groups.

Page 22: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Examples of Duality

Maximum and minimum principles for linear programming.

Boolean algebras and Stone spaces.

Logics and Transition systems.

State transformer semantics and weakest precondition semantics.

Measures and random variables.

Compact groups and discrete groups.

C*-algebras and compact Hausdorff spaces.

Page 23: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Examples of Duality

Maximum and minimum principles for linear programming.

Boolean algebras and Stone spaces.

Logics and Transition systems.

State transformer semantics and weakest precondition semantics.

Measures and random variables.

Compact groups and discrete groups.

C*-algebras and compact Hausdorff spaces.

Vector spaces and vector spaces.

Page 24: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Deterministic Automata

Deterministic Automata

M = (S,A,O, δ, γ): a deterministic finite automaton. S is the set ofstates , A an input alphabet (actions), O is a set ofobservations .

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 7 / 79

Page 25: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Deterministic Automata

Deterministic Automata

M = (S,A,O, δ, γ): a deterministic finite automaton. S is the set ofstates , A an input alphabet (actions), O is a set ofobservations .

δ : S ×A −→ S is the state transition function .

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 7 / 79

Page 26: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Deterministic Automata

Deterministic Automata

M = (S,A,O, δ, γ): a deterministic finite automaton. S is the set ofstates , A an input alphabet (actions), O is a set ofobservations .

δ : S ×A −→ S is the state transition function .

γ : S −→ 2O or γ : S ×O −→ 2 is a labeling function.

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 7 / 79

Page 27: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Deterministic Automata

Deterministic Automata

M = (S,A,O, δ, γ): a deterministic finite automaton. S is the set ofstates , A an input alphabet (actions), O is a set ofobservations .

δ : S ×A −→ S is the state transition function .

γ : S −→ 2O or γ : S ×O −→ 2 is a labeling function.

If O = {accept} we have ordinary deterministic finite automata,

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 7 / 79

Page 28: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Deterministic Automata

Deterministic Automata

M = (S,A,O, δ, γ): a deterministic finite automaton. S is the set ofstates , A an input alphabet (actions), O is a set ofobservations .

δ : S ×A −→ S is the state transition function .

γ : S −→ 2O or γ : S ×O −→ 2 is a labeling function.

If O = {accept} we have ordinary deterministic finite automata,

except that we do not have a start state,

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 7 / 79

Page 29: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Deterministic Automata

Deterministic Automata

M = (S,A,O, δ, γ): a deterministic finite automaton. S is the set ofstates , A an input alphabet (actions), O is a set ofobservations .

δ : S ×A −→ S is the state transition function .

γ : S −→ 2O or γ : S ×O −→ 2 is a labeling function.

If O = {accept} we have ordinary deterministic finite automata,

except that we do not have a start state,

but this can be easily added to the framework.

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 7 / 79

Page 30: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

An Example

States:{A,B,C,D,E,F} Observations: {Blue,Red,Yellow}.

A

C B D

F E

ba

ab

ba

baa

b

a

b

Page 31: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Testing the Machine

What can we do with this machine?

Page 32: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Testing the Machine

What can we do with this machine?

We can ask if in the present state the red light is on.

Page 33: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Testing the Machine

What can we do with this machine?

We can ask if in the present state the red light is on.

We can ask whether after a b-transition from the present state theyellow light is on.

Page 34: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Testing the Machine

What can we do with this machine?

We can ask if in the present state the red light is on.

We can ask whether after a b-transition from the present state theyellow light is on.

We can ask whether after abab from the present state the bluelight is on.

Page 35: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Testing the Machine

What can we do with this machine?

We can ask if in the present state the red light is on.

We can ask whether after a b-transition from the present state theyellow light is on.

We can ask whether after abab from the present state the bluelight is on.

We can ask whether after some fixed sequence of transitions aparticular light is on.

Page 36: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

States Satisfy Tests (Or Not)

red is satisfied by {A,C}

Page 37: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

States Satisfy Tests (Or Not)

red is satisfied by {A,C}

After b, yellow is on, is satisfied by {B,E,F} and no other states.

Page 38: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

States Satisfy Tests (Or Not)

red is satisfied by {A,C}

After b, yellow is on, is satisfied by {B,E,F} and no other states.

After abab, blue is on is satisfied by {A,B,C,D,E,F}, i.e. by allstates.

Page 39: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

red is satisfied by {A,C}

A

C B D

F E

ba

ab

ba

baa

b

a

b

Page 40: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

b-Yellow is satisfied by {B,E,F}

A

C B D

F E

ba

ab

ba

baa

b

a

b

Page 41: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

abab-Blue is always satisfied

A

C B D

F E

ba

ab

ba

baa

b

a

b

Page 42: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

A Simple Modal Logic

Thinking of the elements of O as formulas we can use them todefine a simple modal logic. We define a formula ϕ according tothe following grammar:

ϕ ::== ω ∈ O | (a)ϕ

where a ∈ A.

Page 43: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

A Simple Modal Logic

Thinking of the elements of O as formulas we can use them todefine a simple modal logic. We define a formula ϕ according tothe following grammar:

ϕ ::== ω ∈ O | (a)ϕ

where a ∈ A.

We say s |= ω, if ω ∈ γ(s) (or γ(s, ω) = T).We say s |= (a)ϕ if δ(s, a) |= ϕ.

Page 44: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

A Simple Modal Logic

Thinking of the elements of O as formulas we can use them todefine a simple modal logic. We define a formula ϕ according tothe following grammar:

ϕ ::== ω ∈ O | (a)ϕ

where a ∈ A.

We say s |= ω, if ω ∈ γ(s) (or γ(s, ω) = T).We say s |= (a)ϕ if δ(s, a) |= ϕ.

Now we define [[ϕ]]M = {s ∈ S|s |= ϕ}.

Page 45: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

An Equivalence Relation on Formulas

We write sa as shorthand for δ(s, a).

Page 46: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

An Equivalence Relation on Formulas

We write sa as shorthand for δ(s, a).

Define ∼M between formulas as ϕ ∼M ψ if [[ϕ]]M = [[ψ]]M.

Page 47: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

An Equivalence Relation on Formulas

We write sa as shorthand for δ(s, a).

Define ∼M between formulas as ϕ ∼M ψ if [[ϕ]]M = [[ψ]]M.

Note that this allows us to identify an equivalence class for ϕ withthe set of states [[ϕ]]M that satisfy ϕ.

Page 48: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

An Equivalence Relation on Formulas

We write sa as shorthand for δ(s, a).

Define ∼M between formulas as ϕ ∼M ψ if [[ϕ]]M = [[ψ]]M.

Note that this allows us to identify an equivalence class for ϕ withthe set of states [[ϕ]]M that satisfy ϕ.

Note that another way of defining this equivalence relations is

ϕ ∼M ϕ′ := ∀s ∈ S.s |= ϕ ⇐⇒ s |= ϕ′.

Page 49: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Examples of Equivalent Formulas

The formulas bbbyellow and bbbbbyellow are satisfied by all states.They are thus equivalent.

Page 50: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Examples of Equivalent Formulas

The formulas bbbyellow and bbbbbyellow are satisfied by all states.They are thus equivalent.

Other equivalent formulas are all formulas of the form bmyellow form > 1.

Page 51: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Examples of Equivalent Formulas

The formulas bbbyellow and bbbbbyellow are satisfied by all states.They are thus equivalent.

Other equivalent formulas are all formulas of the form bmyellow form > 1.

There are a lot of formulas in this equivalence class!

Page 52: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Examples of Equivalent Formulas

The formulas bbbyellow and bbbbbyellow are satisfied by all states.They are thus equivalent.

Other equivalent formulas are all formulas of the form bmyellow form > 1.

There are a lot of formulas in this equivalence class!

But there are only finitely many equivalence classes.

Page 53: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

An Equivalence Relation on States

We also define an equivalence ≡ between states in M as s1 ≡ s2

if for all formulas ϕ on M, s1 |= ϕ ⇐⇒ s2 |= ϕ.

Page 54: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

An Equivalence Relation on States

We also define an equivalence ≡ between states in M as s1 ≡ s2

if for all formulas ϕ on M, s1 |= ϕ ⇐⇒ s2 |= ϕ.

The equivalence relations ∼ and ≡ are clearly closely related:they are the hinge of the duality between states and observations.

Page 55: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

An Equivalence Relation on States

We also define an equivalence ≡ between states in M as s1 ≡ s2

if for all formulas ϕ on M, s1 |= ϕ ⇐⇒ s2 |= ϕ.

The equivalence relations ∼ and ≡ are clearly closely related:they are the hinge of the duality between states and observations.

We say that M is reduced if the ≡-equivalence classes aresingletons.

Page 56: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

An Equivalence Relation on States

We also define an equivalence ≡ between states in M as s1 ≡ s2

if for all formulas ϕ on M, s1 |= ϕ ⇐⇒ s2 |= ϕ.

The equivalence relations ∼ and ≡ are clearly closely related:they are the hinge of the duality between states and observations.

We say that M is reduced if the ≡-equivalence classes aresingletons.

Since there is more than just one proposition in general therelation ≡ is finer than the usual equivalence of automata theory.

Page 57: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

A Dual Automaton

Given a finite automaton M = (S,A,O, δ, γ).Let T be the set of ∼M-equivalence classes of formulas on M.

Page 58: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

A Dual Automaton

Given a finite automaton M = (S,A,O, δ, γ).Let T be the set of ∼M-equivalence classes of formulas on M.

We define M′ = (S′,A,O′, δ′, γ′) as follows:

Page 59: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

A Dual Automaton

Given a finite automaton M = (S,A,O, δ, γ).Let T be the set of ∼M-equivalence classes of formulas on M.

We define M′ = (S′,A,O′, δ′, γ′) as follows:

S′ = T = {[[ϕ]]M}

Page 60: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

A Dual Automaton

Given a finite automaton M = (S,A,O, δ, γ).Let T be the set of ∼M-equivalence classes of formulas on M.

We define M′ = (S′,A,O′, δ′, γ′) as follows:

S′ = T = {[[ϕ]]M}

O′ = S

Page 61: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

A Dual Automaton

Given a finite automaton M = (S,A,O, δ, γ).Let T be the set of ∼M-equivalence classes of formulas on M.

We define M′ = (S′,A,O′, δ′, γ′) as follows:

S′ = T = {[[ϕ]]M}

O′ = S

δ′([[ϕ]]M, a) = [[(a)ϕ]]M

Page 62: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

A Dual Automaton

Given a finite automaton M = (S,A,O, δ, γ).Let T be the set of ∼M-equivalence classes of formulas on M.

We define M′ = (S′,A,O′, δ′, γ′) as follows:

S′ = T = {[[ϕ]]M}

O′ = S

δ′([[ϕ]]M, a) = [[(a)ϕ]]Mγ′([[ϕ]]M) = [[ϕ]]M or γ′([[ϕ]]A, s) = (s |= ϕ).

Page 63: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Let’s look at that last line again

γ′([[ϕ]]M) = [[ϕ]]M?

Page 64: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Let’s look at that last line again

γ′([[ϕ]]M) = [[ϕ]]M?

Does it make sense? Is γ′ just the identity?

Page 65: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Let’s look at that last line again

γ′([[ϕ]]M) = [[ϕ]]M?

Does it make sense? Is γ′ just the identity?

On the left-hand side [[ϕ]] is an equivalence class of formulas,hence a state of the dual machine;

Page 66: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Let’s look at that last line again

γ′([[ϕ]]M) = [[ϕ]]M?

Does it make sense? Is γ′ just the identity?

On the left-hand side [[ϕ]] is an equivalence class of formulas,hence a state of the dual machine;

so the right-hand side ought to have a set of observations of thedual machine,

Page 67: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Let’s look at that last line again

γ′([[ϕ]]M) = [[ϕ]]M?

Does it make sense? Is γ′ just the identity?

On the left-hand side [[ϕ]] is an equivalence class of formulas,hence a state of the dual machine;

so the right-hand side ought to have a set of observations of thedual machine,

but that is just a set of states of the original machine!

Page 68: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The intuition

We have interchanged the states and the observations or propositions;more precisely we have interchanged equivalence classes of formulas- based on the observations - with the states. We have made thestates of the old machine the observations of the dual machine.

Page 69: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Dual Machine For Our Example

bB R aR

B aB bY

Y

a

b

a

bb

aa

b

a b

a,b

a,b

Note that aB ∼ abY ∼ bR ∼ false and that aR ∼ bbY ∼ abB ∼ true.

Page 70: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Dual Machine Labelled with Observations (akaStates)

A,C,D A,C S

B∗ ∅ B,E,F

E

a

b

a

bb

aa

b

a b

a,b

a,b

∗: This means the state B, not the colour Blue!S stands for the set of all states.

Page 71: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Some Remarks

The dual machine has more states than the primal machine.

Page 72: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Some Remarks

The dual machine has more states than the primal machine.

The dual machine could have at most 2|S| states.

Page 73: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Some Remarks

The dual machine has more states than the primal machine.

The dual machine could have at most 2|S| states.

Not every possible set of states is the denotation of some formula.

Page 74: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Some Remarks

The dual machine has more states than the primal machine.

The dual machine could have at most 2|S| states.

Not every possible set of states is the denotation of some formula.

If it were the case that every possible set of states is described bysome formula then we would indeed have exponential blow up inthe size.

Page 75: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Some Remarks

The dual machine has more states than the primal machine.

The dual machine could have at most 2|S| states.

Not every possible set of states is the denotation of some formula.

If it were the case that every possible set of states is described bysome formula then we would indeed have exponential blow up inthe size.

If we had a richer logic then more sets of states would bedefinable.

Page 76: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Double Dual

Now consider M′′ = (M′)′, the dual of the dual.

Page 77: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Double Dual

Now consider M′′ = (M′)′, the dual of the dual.

Its states are equivalence classes of M′-formulas.

Page 78: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Double Dual

Now consider M′′ = (M′)′, the dual of the dual.

Its states are equivalence classes of M′-formulas.

Each such class is identified with a set [[ϕ′]]M′ of M′-states bywhich formulas in that class are satisfied, and

Page 79: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Double Dual

Now consider M′′ = (M′)′, the dual of the dual.

Its states are equivalence classes of M′-formulas.

Each such class is identified with a set [[ϕ′]]M′ of M′-states bywhich formulas in that class are satisfied, and

each M′-state is an equivalence class of M-formulas.

Page 80: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Double Dual

Now consider M′′ = (M′)′, the dual of the dual.

Its states are equivalence classes of M′-formulas.

Each such class is identified with a set [[ϕ′]]M′ of M′-states bywhich formulas in that class are satisfied, and

each M′-state is an equivalence class of M-formulas.

Thus we can look at states in M′′ as collections of M-formulaequivalence classes.

Page 81: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Double Dual 2

Let M′′ be the double dual, and for any state s ∈ S in the originalautomaton we define

Sat(s) = {[[ϕ]]M : s |= ϕ}.

Page 82: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Double Dual 2

Let M′′ be the double dual, and for any state s ∈ S in the originalautomaton we define

Sat(s) = {[[ϕ]]M : s |= ϕ}.

Lemma: For any s ∈ S, Sat(s) is a state in M′′.

Page 83: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Double Dual 2

Let M′′ be the double dual, and for any state s ∈ S in the originalautomaton we define

Sat(s) = {[[ϕ]]M : s |= ϕ}.

Lemma: For any s ∈ S, Sat(s) is a state in M′′.

In fact all the states of the double dual have this form.

Page 84: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Double Dual 2

Let M′′ be the double dual, and for any state s ∈ S in the originalautomaton we define

Sat(s) = {[[ϕ]]M : s |= ϕ}.

Lemma: For any s ∈ S, Sat(s) is a state in M′′.

In fact all the states of the double dual have this form.

Lemma: Let s′′ = [[ϕ]]M′ ∈ S′′ be any state in M′′. Thens′′ = Sat(sϕ) for some state sϕ ∈ S.

Page 85: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Double Dual 2

Let M′′ be the double dual, and for any state s ∈ S in the originalautomaton we define

Sat(s) = {[[ϕ]]M : s |= ϕ}.

Lemma: For any s ∈ S, Sat(s) is a state in M′′.

In fact all the states of the double dual have this form.

Lemma: Let s′′ = [[ϕ]]M′ ∈ S′′ be any state in M′′. Thens′′ = Sat(sϕ) for some state sϕ ∈ S.

The proof is by an easy induction on ϕ.

Page 86: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Minimality Properties

If M is reduced then Sat is a bijection from S to S′′.

Page 87: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Minimality Properties

If M is reduced then Sat is a bijection from S to S′′.

The statement above can be strengthened to show that weactually have an isomorphism of automata.

Page 88: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Minimality Properties

If M is reduced then Sat is a bijection from S to S′′.

The statement above can be strengthened to show that weactually have an isomorphism of automata.

In general, the double dual is the minimal machine with the samebehaviour!

Page 89: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Minimality Properties

If M is reduced then Sat is a bijection from S to S′′.

The statement above can be strengthened to show that weactually have an isomorphism of automata.

In general, the double dual is the minimal machine with the samebehaviour!

For deterministic machines bisimulation is the same as traceequivalence so there is no question about what equivalence wehave in mind.

Page 90: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Brzozowski’s Algorithm 1962

Take a NFA and just reverse all the transitions and interchangeinitial and final states.

Page 91: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Brzozowski’s Algorithm 1962

Take a NFA and just reverse all the transitions and interchangeinitial and final states.

Determinize the result.

Page 92: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Brzozowski’s Algorithm 1962

Take a NFA and just reverse all the transitions and interchangeinitial and final states.

Determinize the result.

Take the reachable states.

Page 93: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Brzozowski’s Algorithm 1962

Take a NFA and just reverse all the transitions and interchangeinitial and final states.

Determinize the result.

Take the reachable states.

Reverse all the transitions again and interchange initial and finalstates.

Page 94: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Brzozowski’s Algorithm 1962

Take a NFA and just reverse all the transitions and interchangeinitial and final states.

Determinize the result.

Take the reachable states.

Reverse all the transitions again and interchange initial and finalstates.

Determinize the result.

Page 95: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Brzozowski’s Algorithm 1962

Take a NFA and just reverse all the transitions and interchangeinitial and final states.

Determinize the result.

Take the reachable states.

Reverse all the transitions again and interchange initial and finalstates.

Determinize the result.

Take the reachable states.

Page 96: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Brzozowski’s Algorithm 1962

Take a NFA and just reverse all the transitions and interchangeinitial and final states.

Determinize the result.

Take the reachable states.

Reverse all the transitions again and interchange initial and finalstates.

Determinize the result.

Take the reachable states.

This gives the minimal DFA recognizing the same language. Theintermediate step can blow up the size of the automatonexponentially before minimizing it.

Page 97: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Probabilistic Systems

Probabilistic systems

Everything is discrete.

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 28 / 79

Page 98: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Probabilistic Systems

Probabilistic systems

Everything is discrete.

Markov Decision Processes aka Labelled Markov Processes:

M = (S,A,∀a ∈ A, τa : S × S −→ [0, 1]).

The τa are transition probability functions (matrices).

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 28 / 79

Page 99: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Probabilistic Systems

Probabilistic systems

Everything is discrete.

Markov Decision Processes aka Labelled Markov Processes:

M = (S,A,∀a ∈ A, τa : S × S −→ [0, 1]).

The τa are transition probability functions (matrices).

Usually MDPs have rewards but I will not consider them for now.

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 28 / 79

Page 100: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Partial Observations

Partially Observable Markov Decision Processes (POMDPs). Wecannot see the entire state but we can see something.

Page 101: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Partial Observations

Partially Observable Markov Decision Processes (POMDPs). Wecannot see the entire state but we can see something.

In process algebra we typically take actions as not always beingenabled and we observe whether actions are accepted orrejected.

Page 102: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Partial Observations

Partially Observable Markov Decision Processes (POMDPs). Wecannot see the entire state but we can see something.

In process algebra we typically take actions as not always beingenabled and we observe whether actions are accepted orrejected.

In POMDPs we assume actions are always accepted but witheach transition some propositions are true, or some booleanobservables are “on.”

Page 103: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Partial Observations

Partially Observable Markov Decision Processes (POMDPs). Wecannot see the entire state but we can see something.

In process algebra we typically take actions as not always beingenabled and we observe whether actions are accepted orrejected.

In POMDPs we assume actions are always accepted but witheach transition some propositions are true, or some booleanobservables are “on.”

Note that the observations can depend probabilistically on theaction taken and the final state. Many variations are possible.

Page 104: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Formal Definition of a POMDP

M = (S,A,O, δ : S ×A× S −→ [0, 1], γ : S ×A×O −→ [0, 1]),

Page 105: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Formal Definition of a POMDP

M = (S,A,O, δ : S ×A× S −→ [0, 1], γ : S ×A×O −→ [0, 1]),

where S is the set of states, O is the set of observations, A is theset of actions, δ is the transition probability function and γ givesthe observation probabilities.

Page 106: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Automata with State-based Observations

A deterministic automaton with stochastic observations is aquintuple

E = (S,A,O, δ : S ×A −→ S, γ : S ×O −→ [0, 1]).

Note that this has deterministic transitions and stochasticobservations.

Page 107: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Automata with State-based Observations

A deterministic automaton with stochastic observations is aquintuple

E = (S,A,O, δ : S ×A −→ S, γ : S ×O −→ [0, 1]).

Note that this has deterministic transitions and stochasticobservations.

A probabilistic automaton with stochastic observations is

F = (S,A,O, δ : S ×A× S −→ [0, 1], γ : S ×O −→ [0, 1]).

Page 108: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Simple Tests

Rather than thinking of propositions and formulas we will think ofobservations and tests. I will look at state-based notions ofobservations.

Page 109: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Simple Tests

Rather than thinking of propositions and formulas we will think ofobservations and tests. I will look at state-based notions ofobservations.

Recall probabilistic automata

E = (S,A,O, δ, γ),

Page 110: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Simple Tests

Rather than thinking of propositions and formulas we will think ofobservations and tests. I will look at state-based notions ofobservations.

Recall probabilistic automata

E = (S,A,O, δ, γ),

where δ : S ×A× S −→ [0, 1] is the transition function

Page 111: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Simple Tests

Rather than thinking of propositions and formulas we will think ofobservations and tests. I will look at state-based notions ofobservations.

Recall probabilistic automata

E = (S,A,O, δ, γ),

where δ : S ×A× S −→ [0, 1] is the transition function

and γ : S ×O −→ [0, 1] is the observation function.

Page 112: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Simple Tests 2

We use the same logic as before except that we give aprobabilistic semantics and call the formulas “tests.” I write a.t orat rather than (a)ϕ.

Page 113: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Simple Tests 2

We use the same logic as before except that we give aprobabilistic semantics and call the formulas “tests.” I write a.t orat rather than (a)ϕ.

Tests define functions from states to [0, 1]. If they define the samefunction they are equivalent.

Page 114: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Simple Tests 2

We use the same logic as before except that we give aprobabilistic semantics and call the formulas “tests.” I write a.t orat rather than (a)ϕ.

Tests define functions from states to [0, 1]. If they define the samefunction they are equivalent.

The explicit definition of these functions are:

[[o]]E (s) = γ(s, o)

[[at]]E (s) =∑

s′

δ(s, a, s′)[[t]]E (s′).

Page 115: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Simple Tests 2

We use the same logic as before except that we give aprobabilistic semantics and call the formulas “tests.” I write a.t orat rather than (a)ϕ.

Tests define functions from states to [0, 1]. If they define the samefunction they are equivalent.

The explicit definition of these functions are:

[[o]]E (s) = γ(s, o)

[[at]]E (s) =∑

s′

δ(s, a, s′)[[t]]E (s′).

In AI these are called “e-tests.”

Page 116: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Duality with e-tests

S′ = {[[t]]E}

Page 117: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Duality with e-tests

S′ = {[[t]]E}

O′ = S

Page 118: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Duality with e-tests

S′ = {[[t]]E}

O′ = S

γ′([[t]]E , s) = [[t]]E(s)

Page 119: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Duality with e-tests

S′ = {[[t]]E}

O′ = S

γ′([[t]]E , s) = [[t]]E(s)

δ′([[t]]E , a, [[at]]E ) = 1; 0 otherwise.

Page 120: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Duality with e-tests

S′ = {[[t]]E}

O′ = S

γ′([[t]]E , s) = [[t]]E(s)

δ′([[t]]E , a, [[at]]E ) = 1; 0 otherwise.

This machine has deterministic transitions and γ′ is just thetranspose of γ.

Page 121: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Double Dual

If E is the primal and E ′ is the dual then the states of the doubledual, E ′′ are E ′-equivalence classes of tests.

Page 122: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Double Dual

If E is the primal and E ′ is the dual then the states of the doubledual, E ′′ are E ′-equivalence classes of tests.

An “atomic” test is just an observation of E ′, which is just a state ofE so it has the form [[s]]E ′ for some s.

Page 123: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Double Dual

If E is the primal and E ′ is the dual then the states of the doubledual, E ′′ are E ′-equivalence classes of tests.

An “atomic” test is just an observation of E ′, which is just a state ofE so it has the form [[s]]E ′ for some s.

We see that

γ′′([[s]]E ′ , [[o]]E ) = [[s]]E ′([[o]]E ) = γ′([[o]]E , s) = [[o]]E (s) = γ(s, o).

Page 124: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Double Dual

If E is the primal and E ′ is the dual then the states of the doubledual, E ′′ are E ′-equivalence classes of tests.

An “atomic” test is just an observation of E ′, which is just a state ofE so it has the form [[s]]E ′ for some s.

We see that

γ′′([[s]]E ′ , [[o]]E ) = [[s]]E ′([[o]]E ) = γ′([[o]]E , s) = [[o]]E (s) = γ(s, o).

An easy calculation shows:

[[a1a2 · · · ako]]E ′′([[s]]E ′)

= [[a1a2 · · · ako]]E (s).

Page 125: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Inadequacy of e-tests

There is a loss of information in the previous construction.

Page 126: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Inadequacy of e-tests

There is a loss of information in the previous construction.

The double dual behaves just like the primal with respect to“e-tests” but not with respect to more refined kinds ofobservations.

Page 127: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Inadequacy of e-tests

There is a loss of information in the previous construction.

The double dual behaves just like the primal with respect to“e-tests” but not with respect to more refined kinds ofobservations.

[[o1a1o2a2o3]]E ′′([[s]]E ′) =

[[o1]]E ′′([[s]]E ′′) · [[a1o2]]E ′′([[s]]E ′) · [[a1a2o3]]E ′′([[s]]E ′).

This does not hold in the primal.

Page 128: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Inadequacy of e-tests

There is a loss of information in the previous construction.

The double dual behaves just like the primal with respect to“e-tests” but not with respect to more refined kinds ofobservations.

[[o1a1o2a2o3]]E ′′([[s]]E ′) =

[[o1]]E ′′([[s]]E ′′) · [[a1o2]]E ′′([[s]]E ′) · [[a1a2o3]]E ′′([[s]]E ′).

This does not hold in the primal.

The double dual does not conditionalize with respect tointermediate observations.

Page 129: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

More General Tests

Recall the definition of a POMDP

M = (S,A,O, δa : S × S −→ [0, 1], γa : S ×O −→ [0, 1]).

Page 130: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

More General Tests

Recall the definition of a POMDP

M = (S,A,O, δa : S × S −→ [0, 1], γa : S ×O −→ [0, 1]).

A test t is a non-empty sequence of actions followed by anobservation, i.e. t = a1 · · · ano, with n ≥ 1.

Page 131: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

More General Tests

Recall the definition of a POMDP

M = (S,A,O, δa : S × S −→ [0, 1], γa : S ×O −→ [0, 1]).

A test t is a non-empty sequence of actions followed by anobservation, i.e. t = a1 · · · ano, with n ≥ 1.

An experiment is a non-empty sequence of tests e = t1 · · · tm withm ≥ 1.

Page 132: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Some Notation

We need to generalize the transition function to keep track of thefinal state.

δǫ(s, s′) = 1s=s′ ∀s, s′ ∈ S

δaα(s, s′) =

s′′

δa(s, s′′)δα(s

′′, s′) ∀s, s′ ∈ S.

Page 133: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Some Notation

We need to generalize the transition function to keep track of thefinal state.

δǫ(s, s′) = 1s=s′ ∀s, s′ ∈ S

δaα(s, s′) =

s′′

δa(s, s′′)δα(s

′′, s′) ∀s, s′ ∈ S.

We have written 1s=s′ for the indicator function.

Page 134: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Some Notation

We need to generalize the transition function to keep track of thefinal state.

δǫ(s, s′) = 1s=s′ ∀s, s′ ∈ S

δaα(s, s′) =

s′′

δa(s, s′′)δα(s

′′, s′) ∀s, s′ ∈ S.

We have written 1s=s′ for the indicator function.

We define the symbol 〈s|t|s′〉 which gives the probability that thesystem starts in s, is subjected to the test t and ends up in thestate s′; similarly 〈s|e|s′〉.

Page 135: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Notation continued

We have〈s|a1 · · · ano|s′〉 = δα(s, s

′)γan(s′, o).

Page 136: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Notation continued

We have〈s|a1 · · · ano|s′〉 = δα(s, s

′)γan(s′, o).

We define〈s|e〉 =

s′

〈s|e|s′〉.

Page 137: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Equivalence on Experiments

For experiments e1, e2, we say

e1 ∼M e2 ⇔ 〈s|e1〉 = 〈s|e2〉∀s ∈ S.

Page 138: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Equivalence on Experiments

For experiments e1, e2, we say

e1 ∼M e2 ⇔ 〈s|e1〉 = 〈s|e2〉∀s ∈ S.

Then [e]M is the ∼M-equivalence class of e.

Page 139: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Equivalence on Experiments

For experiments e1, e2, we say

e1 ∼M e2 ⇔ 〈s|e1〉 = 〈s|e2〉∀s ∈ S.

Then [e]M is the ∼M-equivalence class of e.

The construction of the dual proceeds as before by makingequivalence classes of experiments the states of the dualmachine and

Page 140: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Equivalence on Experiments

For experiments e1, e2, we say

e1 ∼M e2 ⇔ 〈s|e1〉 = 〈s|e2〉∀s ∈ S.

Then [e]M is the ∼M-equivalence class of e.

The construction of the dual proceeds as before by makingequivalence classes of experiments the states of the dualmachine and

the states of the primal machine become the observations of thedual machine.

Page 141: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Dual Machine

We define the dual as M′ =

(S′,A,O′, δ′ : S′ ×A −→ S′, γ′ : S′ ×O′ −→ [0, 1]),

Page 142: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Dual Machine

We define the dual as M′ =

(S′,A,O′, δ′ : S′ ×A −→ S′, γ′ : S′ ×O′ −→ [0, 1]),

where S′ = {[e]M}, O′ = S

Page 143: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Dual Machine

We define the dual as M′ =

(S′,A,O′, δ′ : S′ ×A −→ S′, γ′ : S′ ×O′ −→ [0, 1]),

where S′ = {[e]M}, O′ = S

δ′([e]M, a0) = [a0e]M and

Page 144: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Dual Machine

We define the dual as M′ =

(S′,A,O′, δ′ : S′ ×A −→ S′, γ′ : S′ ×O′ −→ [0, 1]),

where S′ = {[e]M}, O′ = S

δ′([e]M, a0) = [a0e]M and

γ′([e]M, s) = 〈s|e〉.

Page 145: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Dual Machine

We define the dual as M′ =

(S′,A,O′, δ′ : S′ ×A −→ S′, γ′ : S′ ×O′ −→ [0, 1]),

where S′ = {[e]M}, O′ = S

δ′([e]M, a0) = [a0e]M and

γ′([e]M, s) = 〈s|e〉.

We get a deterministic transition system with stochasticobservations.

Page 146: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Double Dual

We use the e-test construction to go from the dual to the doubledual.

Page 147: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Double Dual

We use the e-test construction to go from the dual to the doubledual.

The double dual is

M′′ = (S′′,A′,O′′, δ′′, γ′′),

where

Page 148: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Double Dual

We use the e-test construction to go from the dual to the doubledual.

The double dual is

M′′ = (S′′,A′,O′′, δ′′, γ′′),

where

S′′ = {[t]M′}, O′′ = S′,

Page 149: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Double Dual

We use the e-test construction to go from the dual to the doubledual.

The double dual is

M′′ = (S′′,A′,O′′, δ′′, γ′′),

where

S′′ = {[t]M′}, O′′ = S′,

δ′′([t]M′ , a0) = [a0e]M and

Page 150: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Double Dual

We use the e-test construction to go from the dual to the doubledual.

The double dual is

M′′ = (S′′,A′,O′′, δ′′, γ′′),

where

S′′ = {[t]M′}, O′′ = S′,

δ′′([t]M′ , a0) = [a0e]M and

γ′′([t]M′ , [t]M) = 〈[t]M|e〉 = 〈s|αRt〉 (e = αs).

Page 151: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Main Theorem

One can use experiments to construct the dual,

Page 152: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Main Theorem

One can use experiments to construct the dual,

this gives a DASO. Now we can use e-tests to construct thedouble dual.

Page 153: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Main Theorem

One can use experiments to construct the dual,

this gives a DASO. Now we can use e-tests to construct thedouble dual.

The main result is: The probability of a state s in the primalsatisfying a experiment e, i.e. 〈s|e〉 is given by〈[s]M′ |[e]M〉 = γ′′([s]M′)|[e]M〉, where [s] indicates the equivalenceclass of the e-test on the dual which has s as an observation andan empty sequence of actions.

Page 154: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

AI Motivation

One can plan when one has the model: value iteration etc., butquite often one does not have the model.

Page 155: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

AI Motivation

One can plan when one has the model: value iteration etc., butquite often one does not have the model.

In the absence of a model, one is forced to learn from data.

Page 156: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

AI Motivation

One can plan when one has the model: value iteration etc., butquite often one does not have the model.

In the absence of a model, one is forced to learn from data.

Learning is hopeless when one has no idea what the state spaceis.

Page 157: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

AI Motivation

One can plan when one has the model: value iteration etc., butquite often one does not have the model.

In the absence of a model, one is forced to learn from data.

Learning is hopeless when one has no idea what the state spaceis.

There should be no such thing as absolute state! State is just asummary of past observations that can be used to makepredictions.

Page 158: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

AI Motivation

One can plan when one has the model: value iteration etc., butquite often one does not have the model.

In the absence of a model, one is forced to learn from data.

Learning is hopeless when one has no idea what the state spaceis.

There should be no such thing as absolute state! State is just asummary of past observations that can be used to makepredictions.

The double dual shows that the state can be regarded as just thesummary of the outcomes of experiments.

Page 159: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Categorical Considerations

What is the right categorical description?

Is this is some kind of familiar Stone-type duality?

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 45 / 79

Page 160: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Categorical Considerations

What is the right categorical description?

Is this is some kind of familiar Stone-type duality?

We know that machines are co-algebras and logics are algebrasbut

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 45 / 79

Page 161: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Categorical Considerations

What is the right categorical description?

Is this is some kind of familiar Stone-type duality?

We know that machines are co-algebras and logics are algebrasbut

why is the dual another automaton?

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 45 / 79

Page 162: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Automata as Coalgebras

Our automata are coalgebras of the following functor:

F(S) = SA × 2O, F(f : S −→ S′) = λ(α : A −→ S, O ⊂ O).(f ◦ α, O).

The category of these coalgebras is called PODFA.

Page 163: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Homomorphisms

A homomorphism for these coalgebras is a function f : S −→ S′ suchthat the following diagram commutes:

Sf //

(δ, γ)��

S′

(δ′, γ′)��

SA × 2OfA×id

// S′A × 2O

where fA(α) = f ◦ α.

Page 164: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

This translates to the following conditions:

∀s ∈ S, ω ∈ O, ω ∈ γ(s) ⇐⇒ ω ∈ γ′(f (s)) (1)

and∀s ∈ S, a ∈ A, f (δ(s, a)) = δ′(f (s), a). (2)

Page 165: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Dual Category

The category of finite boolean algebras with operators (FBAO)has as objects finite boolean algebras B with

Page 166: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Dual Category

The category of finite boolean algebras with operators (FBAO)has as objects finite boolean algebras B with

the usual operations ∧, ¬ and constants T and ⊥ and, in addition,

Page 167: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Dual Category

The category of finite boolean algebras with operators (FBAO)has as objects finite boolean algebras B with

the usual operations ∧, ¬ and constants T and ⊥ and, in addition,

together with unary operators (a) and constants ω.

Page 168: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Dual Category

The category of finite boolean algebras with operators (FBAO)has as objects finite boolean algebras B with

the usual operations ∧, ¬ and constants T and ⊥ and, in addition,

together with unary operators (a) and constants ω.

We denote an object by B = (B, {(a)|a ∈ A}, {ω|ω ∈ O},T,∧,¬).

Page 169: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Morphisms

The morphisms are the usual boolean homomorphisms preserving, inaddition, the constants and the unary operators.The following three equations hold:

(a)(b1 ∧ b2) = (a)b1 ∧ (a)b2, (3a)

(a)T = T, (3b)

¬(a)¬b = (a)b. (3c)

Page 170: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Duality Theorem

There is a dual equivalence of categories

PODFAop ∼= FBAO.

One functor P is just the contravariant power set functor and the otherone H maps a boolean algebra to its set of atoms.

Page 171: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Minimization?

Obviously, if we have an equivalence of categories we get thesame machine back when we go back and forth.

Page 172: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Minimization?

Obviously, if we have an equivalence of categories we get thesame machine back when we go back and forth.

So how do we explain the minimization?

Page 173: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Definable Subsets

Define a logic L by

φ ::== T|⊥|φ1 ∧ φ2|¬φ|(a)φ|ω

and define the definable subsets D(S) of a machine M = (S, δ, γ) assets of the form [[φ]].

Page 174: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

D(S) is a subobject of P(M)

Page 175: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

D(S) is a subobject of P(M)

in fact it is the smallest possible subalgebra and

Page 176: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

D(S) is a subobject of P(M)

in fact it is the smallest possible subalgebra and

any other subalgebra must contain D(S).

Page 177: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

In Pictures

M // P(M)

Page 178: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

M // P(M)

D(S)?�

1

OO

Page 179: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

M //

2����

P(M)

H(D(S)) D(S)oo?�

1

OO

Page 180: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

M //

2����

3

����✡✡✡✡✡✡✡✡✡✡✡✡✡✡✡✡✡

P(M)

H(D(S)) D(S)oo?�

1

OO

S ′ //4

// // P(S ′)

Page 181: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

M //

2����

3

����✡✡✡✡✡✡✡✡✡✡✡✡✡✡✡✡✡

P(M)

H(D(S)) D(S)oo?�

1

OO

S ′ //4

// // P(S ′)L,

5

ZZ✻✻✻✻✻✻✻✻✻✻✻✻✻✻✻✻

Page 182: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

M //

2����

3

����✡✡✡✡✡✡✡✡✡✡✡✡✡✡✡✡✡

P(M)

H(D(S)) D(S)oo?�

1

OO

� r

6 $$■■■

■■■■

S ′ //4

// // P(S ′)L,

5

ZZ✻✻✻✻✻✻✻✻✻✻✻✻✻✻✻✻

Page 183: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

The Secret of Minimization

M //

2����

3

����✡✡✡✡✡✡✡✡✡✡✡✡✡✡✡✡✡

P(M)

H(D(S)) D(S)oo?�

1

OO

� r

6 $$■■■

■■■■

S ′

7

;; ;;✇✇✇✇✇✇✇✇✇//

4// // P(S ′)

L,

5

ZZ✻✻✻✻✻✻✻✻✻✻✻✻✻✻✻✻

Page 184: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

A Simpler Logic

Why did the minimization work with just the logic

φ ::== ω|(a)φ?

Page 185: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

A Simpler Logic

Why did the minimization work with just the logic

φ ::== ω|(a)φ?

With this logic the definable subsets E(S) do not form a booleanalgebra

Page 186: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

A Simpler Logic

Why did the minimization work with just the logic

φ ::== ω|(a)φ?

With this logic the definable subsets E(S) do not form a booleanalgebra

it is just a “set with operations”

Page 187: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

A Simpler Logic

Why did the minimization work with just the logic

φ ::== ω|(a)φ?

With this logic the definable subsets E(S) do not form a booleanalgebra

it is just a “set with operations”

in other words it can be viewed as an automaton!

Page 188: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Deterministic vs Nondeterministic Automata

For deterministic automata we can flatten formulas like(a)(ω1 ∧ (b)ω2) to (a)ω1 ∧ (a)(b)ω2.

Page 189: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Deterministic vs Nondeterministic Automata

For deterministic automata we can flatten formulas like(a)(ω1 ∧ (b)ω2) to (a)ω1 ∧ (a)(b)ω2.

Thus for deterministic automata the boolean algebra generatedby E(S) is just the same as D(S) so the minimization picture workswith boolean algebra generated by E(S).

Page 190: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Deterministic vs Nondeterministic Automata

For deterministic automata we can flatten formulas like(a)(ω1 ∧ (b)ω2) to (a)ω1 ∧ (a)(b)ω2.

Thus for deterministic automata the boolean algebra generatedby E(S) is just the same as D(S) so the minimization picture workswith boolean algebra generated by E(S).

For nondeterministic automata the story is different.

Page 191: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Weighted Automata

These are automata where the state space is a vector space andthe transitions are given by matrices.

Page 192: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Weighted Automata

These are automata where the state space is a vector space andthe transitions are given by matrices.

Stefan Kiefer came up with a beautiful backwards-and-forwardsminimization algorithm after hearing my original talk on this lastautumn.

Page 193: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Weighted Automata

These are automata where the state space is a vector space andthe transitions are given by matrices.

Stefan Kiefer came up with a beautiful backwards-and-forwardsminimization algorithm after hearing my original talk on this lastautumn.

Recently, Nick Bezhanishvili, Clemens Kupke and I showed thatthis construction is a beautiful example of our categorical picture

Page 194: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Weighted Automata

These are automata where the state space is a vector space andthe transitions are given by matrices.

Stefan Kiefer came up with a beautiful backwards-and-forwardsminimization algorithm after hearing my original talk on this lastautumn.

Recently, Nick Bezhanishvili, Clemens Kupke and I showed thatthis construction is a beautiful example of our categorical picture

exploiting the fact that the category of vector spaces is self dual.

Page 195: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Categorical Considerations

Probabilistic Automata

With probabilistic automata one can define an associateddeterimnistic automaton where the states are probabilitydistributions (belief automata).

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 65 / 79

Page 196: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Categorical Considerations

Probabilistic Automata

With probabilistic automata one can define an associateddeterimnistic automaton where the states are probabilitydistributions (belief automata).

These are compact Hausdorff spaces with transitions andobservations.

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 65 / 79

Page 197: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Categorical Considerations

Probabilistic Automata

With probabilistic automata one can define an associateddeterimnistic automaton where the states are probabilitydistributions (belief automata).

These are compact Hausdorff spaces with transitions andobservations.

The dual is a C* algebra with operations.

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 65 / 79

Page 198: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Categorical Considerations

Probabilistic Automata

With probabilistic automata one can define an associateddeterimnistic automaton where the states are probabilitydistributions (belief automata).

These are compact Hausdorff spaces with transitions andobservations.

The dual is a C* algebra with operations.

The same picture applies.

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 65 / 79

Page 199: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Brzozowski revisited

Diagram of an automaton

1i

""❊❊❊

❊❊❊ 2

S

f <<②②②②②②

�SA

S is the state spaceδ is the transition functionf defines the final states.

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 66 / 79

Page 200: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Brzozowski revisited

The butterfly

1

ε

��

i

""❊❊❊

❊❊❊❊

❊❊❊ 2

A∗ r //❴❴❴❴

�

S

f;;①①①①①①①①①①

�

o //❴❴❴❴ 2A∗

�

ε?

OO

(A∗)A

rA//❴❴❴ SA

oA//❴❴❴ (2A∗

)A

Left: Automaton of words (initial)

α : A∗ −→ (A∗)A α(w)(a) = w · a

Right: Automaton of languages (terminal)

β : 2A∗

−→ (2A∗

)A β(L)(a) = {w ∈ A∗ | a · w ∈ L}

r defines reachability; o defines observability.Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 67 / 79

Page 201: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Brzozowski revisited

Reachability and observability

A deterministic automaton (S, δ, i, f ) is reachable if r is surjective, it isobservable if o is injective, and it is minimal if it is both reachable andobservable.

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 68 / 79

Page 202: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Brzozowski revisited

Contravariant power set functor

V

f

��

2V

2(−) : 7→

W 2W

2f

OO

which is defined, for a set V, by 2V = {S | S ⊆ V} and, for f : V −→ Wand S ⊆ W, by

2f : 2W −→ 2V 2f (S) = {v ∈ V | f (v) ∈ S}

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 69 / 79

Page 203: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Brzozowski revisited

Reversing

S

�

SA

A × A

��S

2S×A

2S

OO (2S)A

2S

OO

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 70 / 79

Page 204: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Brzozowski revisited

Initial becomes final

Applying the operation 2(−) to the initial state (function) of ourautomaton gives

1

i��

X

2

2S

2i

OO

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 71 / 79

Page 205: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Brzozowski revisited

Reachable becomes observable - I

Apply the powerset functor:

2

2S

2i

::✉✉✉✉✉✉✉✉✉✉✉

2�

2r// 2A∗

2�

OO

(2S)A

2rA// (2A∗

)A

For any L ∈ 2A∗

, we have 2ε(L) = ε?(L) and, for any a ∈ A,

2α(L)(a) = {w ∈ A∗ | w · a ∈ L}

Like β(L)(a) but it uses w · a instead of a · w.

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 72 / 79

Page 206: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Brzozowski revisited

Reachable becomes observable - II

By finality of (2A∗

, β, ε? ), there exists a unique homomorphism rev : 2A∗

−→ 2A∗

2

2A∗

2ε99ttttttttttt

2�

rev //❴❴❴❴ 2A∗

�

ε?

OO

(2A∗

)A

revA//❴❴❴ (2A∗

)A

which sends a language L to its reverse

rev(L) = {w ∈ A∗ | wR ∈ L }

where wR is the reverse of w.

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 73 / 79

Page 207: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Brzozowski revisited

Reachable becomes observable - III

Combining diagrams yields:

2

2S

2i

44❥❥❥❥❥❥❥❥❥❥❥❥❥❥❥❥❥❥❥❥❥❥❥❥❥

��

2r// 2A∗

��

99tttttttttttt

rev// 2A∗

β

��

ε?

OO

(2S)A

2rA// (2A∗

)A

revA// (2A∗

)A

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 74 / 79

Page 208: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Brzozowski revisited

Reachable becomes observable - IV

Thus the composition of rev and 2r is the unique function that makesthe following diagram commute:

2

2S

2i

::✉✉✉✉✉✉✉✉✉✉✉

2�

O //❴❴❴❴ 2A∗

�

ε?

OO

(2S)A

OA//❴❴❴ (2A∗

)A

O = rev ◦ 2r

One can easily show that it satisfies, for any X ⊆ S,

O(X) = {wR ∈ A∗ | iw ∈ X}

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 75 / 79

Page 209: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Brzozowski revisited

Final becomes initial

2

S

f

OO 1

f��

2S

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 76 / 79

Page 210: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Brzozowski revisited

Putting everything together

We have obtained the following, new deterministic automaton:

1

ε

��

f

$$■■■

■■■■

■■■ 2

A∗R

//❴❴❴❴

�

2X

2i

::✉✉✉✉✉✉✉✉✉✉✉

2t

��

O//❴❴❴❴ 2A∗

�

ε?

OO

(A∗)A

RA//❴❴❴ (2X)A

OA//❴❴❴ (2A∗

)A

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 77 / 79

Page 211: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Brzozowski revisited

The main theorem

Let (S, δ, i, f ) be a deterministic automaton and let (2S, 2δ , f , 2i) be thereversed deterministic automaton constructed as above.

1 If (S, δ, i, f ) is reachable, then (2S, 2δ , f , 2i) is observable.

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 78 / 79

Page 212: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Brzozowski revisited

The main theorem

Let (S, δ, i, f ) be a deterministic automaton and let (2S, 2δ , f , 2i) be thereversed deterministic automaton constructed as above.

1 If (S, δ, i, f ) is reachable, then (2S, 2δ , f , 2i) is observable.2 If (S, δ, i, f ) accepts the language L, then (2S, 2δ , f , 2i) accepts

rev(L).

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 78 / 79

Page 213: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Conclusions

Conclusions

We are experimenting with these ideas for use in approximation inthe RL Lab at McGill; joint with Doina Precup and Joelle Pineauand their students.

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 79 / 79

Page 214: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Conclusions

Conclusions

We are experimenting with these ideas for use in approximation inthe RL Lab at McGill; joint with Doina Precup and Joelle Pineauand their students.

Extension to continuous observation and continuous state spaces.

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 79 / 79

Page 215: Duality for Transition Systems - McGill University School ...prakash/Talks/macquarie_talk.pdf · M =(S,A,O,δ,γ): a deterministic finite automaton. S is the set of states, A an

Conclusions

Conclusions

We are experimenting with these ideas for use in approximation inthe RL Lab at McGill; joint with Doina Precup and Joelle Pineauand their students.

Extension to continuous observation and continuous state spaces.

It is possible to eliminate state completely in favour of histories;when can this representation be compressed and made tractable?

Panangaden (McGill University) Duality for Transition Systems Macquarie 2013 79 / 79