Duality in Probabilistic Automata

Size: px
Start display at page:

Download "Duality in Probabilistic Automata"

Transcription

1 Duality in Probabilistic Automata Chris Hundt Prakash Panangaden Joelle Pineau Doina Precup Gavin Seal McGill University MFPS May 2006 Genoa p.1/40

2 Overview We have discovered an - apparently - new kind of duality for automata. MFPS May 2006 Genoa p.2/40

3 Overview We have discovered an - apparently - new kind of duality for automata. Special case of this construction known since 1962 to Brzozowski. MFPS May 2006 Genoa p.2/40

4 Overview We have discovered an - apparently - new kind of duality for automata. Special case of this construction known since 1962 to Brzozowski. Works for probabilistic automata. MFPS May 2006 Genoa p.2/40

5 Overview We have discovered an - apparently - new kind of duality for automata. Special case of this construction known since 1962 to Brzozowski. Works for probabilistic automata. Seems interesting for learning and planning. MFPS May 2006 Genoa p.2/40

6 Overview We have discovered an - apparently - new kind of duality for automata. Special case of this construction known since 1962 to Brzozowski. Works for probabilistic automata. Seems interesting for learning and planning. Could be connected to duality in control theory, Pontryagin duality or general concrete dualities. MFPS May 2006 Genoa p.2/40

7 Overview We have discovered an - apparently - new kind of duality for automata. Special case of this construction known since 1962 to Brzozowski. Works for probabilistic automata. Seems interesting for learning and planning. Could be connected to duality in control theory, Pontryagin duality or general concrete dualities. We are not sure about the right categorical setting. MFPS May 2006 Genoa p.2/40

8 Deterministic Automata A = (Q, Σ, P, δ, γ): a deterministic finite automaton. Q is the set of states, Σ an input alphabet (actions), P is a set of propositions. MFPS May 2006 Genoa p.3/40

9 Deterministic Automata A = (Q, Σ, P, δ, γ): a deterministic finite automaton. Q is the set of states, Σ an input alphabet (actions), P is a set of propositions. δ : Q Σ Q is the state transition function. MFPS May 2006 Genoa p.3/40

10 Deterministic Automata A = (Q, Σ, P, δ, γ): a deterministic finite automaton. Q is the set of states, Σ an input alphabet (actions), P is a set of propositions. δ : Q Σ Q is the state transition function. γ : Q 2 P or γ : Q P 2 is a labeling function. MFPS May 2006 Genoa p.3/40

11 Deterministic Automata A = (Q, Σ, P, δ, γ): a deterministic finite automaton. Q is the set of states, Σ an input alphabet (actions), P is a set of propositions. δ : Q Σ Q is the state transition function. γ : Q 2 P or γ : Q P 2 is a labeling function. If P = {accept} we have ordinary deterministic finite automata. MFPS May 2006 Genoa p.3/40

12 A Simple Modal Logic Thinking of the elements of P as formulas we can use them to define a simple modal logic. We define a formula ϕ according to the following grammar: where a Σ. ϕ ::== p P (a)ϕ MFPS May 2006 Genoa p.4/40

13 A Simple Modal Logic Thinking of the elements of P as formulas we can use them to define a simple modal logic. We define a formula ϕ according to the following grammar: where a Σ. ϕ ::== p P (a)ϕ We say s = p, if p γ(s) (or γ(s, p) = T ). We say s = (a)ϕ if δ(s, a) = ϕ. MFPS May 2006 Genoa p.4/40

14 A Simple Modal Logic Thinking of the elements of P as formulas we can use them to define a simple modal logic. We define a formula ϕ according to the following grammar: where a Σ. ϕ ::== p P (a)ϕ We say s = p, if p γ(s) (or γ(s, p) = T ). We say s = (a)ϕ if δ(s, a) = ϕ. Now we define [ϕ] A = {s Q s = ϕ}. MFPS May 2006 Genoa p.4/40

15 An Equivalence Relation on Formulas We write sa as shorthand for δ(s, a). MFPS May 2006 Genoa p.5/40

16 An Equivalence Relation on Formulas We write sa as shorthand for δ(s, a). Define A between formulas as ϕ A ψ if [ϕ] A = [ψ] A. MFPS May 2006 Genoa p.5/40

17 An Equivalence Relation on Formulas We write sa as shorthand for δ(s, a). Define A between formulas as ϕ A ψ if [ϕ] A = [ψ] A. Note that this allows us to identify an equivalence class for ϕ with the set of states [ϕ] A that satisfy ϕ. MFPS May 2006 Genoa p.5/40

18 An Equivalence Relation on Formulas We write sa as shorthand for δ(s, a). Define A between formulas as ϕ A ψ if [ϕ] A = [ψ] A. Note that this allows us to identify an equivalence class for ϕ with the set of states [ϕ] A that satisfy ϕ. Note that another way of defining this equivalence relations is ϕ A ϕ := s Q.s = ϕ s = ϕ. MFPS May 2006 Genoa p.5/40

19 An Equivalence Relation on States We also define an equivalence between states in A as s 1 s 2 if for all formulas ϕ on A, s 1 = ϕ s 2 = ϕ. MFPS May 2006 Genoa p.6/40

20 An Equivalence Relation on States We also define an equivalence between states in A as s 1 s 2 if for all formulas ϕ on A, s 1 = ϕ s 2 = ϕ. The equivalence relations and are clearly closely related: they are the hinge of the duality between states and observations. MFPS May 2006 Genoa p.6/40

21 An Equivalence Relation on States We also define an equivalence between states in A as s 1 s 2 if for all formulas ϕ on A, s 1 = ϕ s 2 = ϕ. The equivalence relations and are clearly closely related: they are the hinge of the duality between states and observations. We say that A is reduced if the -equivalence classes are singletons. MFPS May 2006 Genoa p.6/40

22 An Equivalence Relation on States We also define an equivalence between states in A as s 1 s 2 if for all formulas ϕ on A, s 1 = ϕ s 2 = ϕ. The equivalence relations and are clearly closely related: they are the hinge of the duality between states and observations. We say that A is reduced if the -equivalence classes are singletons. Since there is more than just one proposition in general the relation is finer than the usual equivalence of automata theory. MFPS May 2006 Genoa p.6/40

23 A Dual Automaton Given a finite automaton A = (Q, Σ, P, δ, γ). Let T be the set of A -equivalence classes of formulas on A. MFPS May 2006 Genoa p.7/40

24 A Dual Automaton Given a finite automaton A = (Q, Σ, P, δ, γ). Let T be the set of A -equivalence classes of formulas on A. We define A = (Q, Σ, P, δ, γ ) as follows: MFPS May 2006 Genoa p.7/40

25 A Dual Automaton Given a finite automaton A = (Q, Σ, P, δ, γ). Let T be the set of A -equivalence classes of formulas on A. We define A = (Q, Σ, P, δ, γ ) as follows: Q = T = {[ϕ] A } MFPS May 2006 Genoa p.7/40

26 A Dual Automaton Given a finite automaton A = (Q, Σ, P, δ, γ). Let T be the set of A -equivalence classes of formulas on A. We define A = (Q, Σ, P, δ, γ ) as follows: Q = T = {[ϕ] A } P = Q MFPS May 2006 Genoa p.7/40

27 A Dual Automaton Given a finite automaton A = (Q, Σ, P, δ, γ). Let T be the set of A -equivalence classes of formulas on A. We define A = (Q, Σ, P, δ, γ ) as follows: Q = T = {[ϕ] A } P = Q δ ([ϕ] A, a) = [(a)ϕ] A MFPS May 2006 Genoa p.7/40

28 A Dual Automaton Given a finite automaton A = (Q, Σ, P, δ, γ). Let T be the set of A -equivalence classes of formulas on A. We define A = (Q, Σ, P, δ, γ ) as follows: Q = T = {[ϕ] A } P = Q δ ([ϕ] A, a) = [(a)ϕ] A γ ([ϕ] A, p) = [ϕ] A MFPS May 2006 Genoa p.7/40

29 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 the states of the old machine the observations of the dual machine. MFPS May 2006 Genoa p.8/40

30 The Double Dual Now consider A = (A ), the dual of the dual. MFPS May 2006 Genoa p.9/40

31 The Double Dual Now consider A = (A ), the dual of the dual. Its states are equivalence classes of A -formulas. MFPS May 2006 Genoa p.9/40

32 The Double Dual Now consider A = (A ), the dual of the dual. Its states are equivalence classes of A -formulas. Each such class is identified with a set [ϕ ] A of A -states by which formulas in that class are satisfied, and MFPS May 2006 Genoa p.9/40

33 The Double Dual Now consider A = (A ), the dual of the dual. Its states are equivalence classes of A -formulas. Each such class is identified with a set [ϕ ] A of A -states by which formulas in that class are satisfied, and each A -state is an equivalence class of A-formulas. MFPS May 2006 Genoa p.9/40

34 The Double Dual Now consider A = (A ), the dual of the dual. Its states are equivalence classes of A -formulas. Each such class is identified with a set [ϕ ] A of A -states by which formulas in that class are satisfied, and each A -state is an equivalence class of A-formulas. Thus we can look at states in A as collections of S-formula equivalence classes. MFPS May 2006 Genoa p.9/40

35 The Double Dual 2 Let A be the double dual, and for any state s Q in the original automaton we define Sat(s) = {[ϕ] A : s = ϕ}. MFPS May 2006 Genoa p.10/40

36 The Double Dual 2 Let A be the double dual, and for any state s Q in the original automaton we define Sat(s) = {[ϕ] A : s = ϕ}. Lemma: For any s Q, Sat(s) is a state in A. MFPS May 2006 Genoa p.10/40

37 The Double Dual 2 Let A be the double dual, and for any state s Q in the original automaton we define Sat(s) = {[ϕ] A : s = ϕ}. Lemma: For any s Q, Sat(s) is a state in A. In fact all the states of the double dual have this form. MFPS May 2006 Genoa p.10/40

38 The Double Dual 2 Let A be the double dual, and for any state s Q in the original automaton we define Sat(s) = {[ϕ] A : s = ϕ}. Lemma: For any s Q, Sat(s) is a state in A. In fact all the states of the double dual have this form. Lemma: Let s = [ϕ] A Q be any state in A. Then s = Sat(s ϕ ) for some state s ϕ Q. MFPS May 2006 Genoa p.10/40

39 The Double Dual 2 Let A be the double dual, and for any state s Q in the original automaton we define Sat(s) = {[ϕ] A : s = ϕ}. Lemma: For any s Q, Sat(s) is a state in A. In fact all the states of the double dual have this form. Lemma: Let s = [ϕ] A Q be any state in A. Then s = Sat(s ϕ ) for some state s ϕ Q. The proof is by an easy induction on ϕ. MFPS May 2006 Genoa p.10/40

40 Minimality Properties If A is reduced then Sat is a bijection from Q to Q. MFPS May 2006 Genoa p.11/40

41 Minimality Properties If A is reduced then Sat is a bijection from Q to Q. The statement above can be strengthened to show that we actually have an isomorphism of automata. MFPS May 2006 Genoa p.11/40

42 Minimality Properties If A is reduced then Sat is a bijection from Q to Q. The statement above can be strengthened to show that we actually have an isomorphism of automata. If we define a notion of bisimulation we can show that a machine and its double dual are bisimilar. MFPS May 2006 Genoa p.11/40

43 Minimality Properties If A is reduced then Sat is a bijection from Q to Q. The statement above can be strengthened to show that we actually have an isomorphism of automata. If we define a notion of bisimulation we can show that a machine and its double dual are bisimilar. The minimality is, of course, due to the use of the equivalence relations in the duality. MFPS May 2006 Genoa p.11/40

44 The Nondeterministic Case Here we consider automata of the type A = (Q, Σ, P, δ : Q Σ 2 Q, γ : Q 2 P ). MFPS May 2006 Genoa p.12/40

45 The Nondeterministic Case Here we consider automata of the type A = (Q, Σ, P, δ : Q Σ 2 Q, γ : Q 2 P ). We use the same formulas but we have a different notion of satisfaction: S Q S = p s S : p γ(s) S = (a)ϕ δ(s, a) = ϕ. MFPS May 2006 Genoa p.12/40

46 The Nondeterministic Case Here we consider automata of the type A = (Q, Σ, P, δ : Q Σ 2 Q, γ : Q 2 P ). We use the same formulas but we have a different notion of satisfaction: S Q S = p s S : p γ(s) S = (a)ϕ δ(s, a) = ϕ. We define an appropriate notion of simulation and prove: A is simulated by A. MFPS May 2006 Genoa p.12/40

47 The Nondeterministic Case Here we consider automata of the type A = (Q, Σ, P, δ : Q Σ 2 Q, γ : Q 2 P ). We use the same formulas but we have a different notion of satisfaction: S Q S = p s S : p γ(s) S = (a)ϕ δ(s, a) = ϕ. We define an appropriate notion of simulation and prove: A is simulated by A. The double dual is always deterministic. MFPS May 2006 Genoa p.12/40

48 Brzozowski s Algorithm 1962 Take a NFA and just reverse all the transitions and interchange initial and final states. MFPS May 2006 Genoa p.13/40

49 Brzozowski s Algorithm 1962 Take a NFA and just reverse all the transitions and interchange initial and final states. Determinize the result. MFPS May 2006 Genoa p.13/40

50 Brzozowski s Algorithm 1962 Take a NFA and just reverse all the transitions and interchange initial and final states. Determinize the result. Reverse all the transitions again and interchange initial and final states. MFPS May 2006 Genoa p.13/40

51 Brzozowski s Algorithm 1962 Take a NFA and just reverse all the transitions and interchange initial and final states. Determinize the result. Reverse all the transitions again and interchange initial and final states. Determinize the result. MFPS May 2006 Genoa p.13/40

52 Brzozowski s Algorithm 1962 Take a NFA and just reverse all the transitions and interchange initial and final states. Determinize the result. Reverse all the transitions again and interchange initial and final states. Determinize the result. This gives the minimal DFA recognizing the same language. The intermediate step can blow up the size of the automaton exponentially before minimizing it. MFPS May 2006 Genoa p.13/40

53 Probabilistic systems Everything is discrete. MFPS May 2006 Genoa p.14/40

54 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). MFPS May 2006 Genoa p.14/40

55 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. MFPS May 2006 Genoa p.14/40

56 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. We could make things continuous but that is orthogonal. MFPS May 2006 Genoa p.14/40

57 Partial Observations Partially Observable Markov Decision Processes (POMDPs). We cannot see the entire state but we can see something. MFPS May 2006 Genoa p.15/40

58 Partial Observations Partially Observable Markov Decision Processes (POMDPs). We cannot see the entire state but we can see something. In process algebra we typically take actions as not always being enabled and we observe whether actions are accepted or rejected. MFPS May 2006 Genoa p.15/40

59 Partial Observations Partially Observable Markov Decision Processes (POMDPs). We cannot see the entire state but we can see something. In process algebra we typically take actions as not always being enabled and we observe whether actions are accepted or rejected. In POMDPs we assume actions are always accepted but with each transition some propositions are true, or some boolean observables are on. MFPS May 2006 Genoa p.15/40

60 Partial Observations Partially Observable Markov Decision Processes (POMDPs). We cannot see the entire state but we can see something. In process algebra we typically take actions as not always being enabled and we observe whether actions are accepted or rejected. In POMDPs we assume actions are always accepted but with each transition some propositions are true, or some boolean observables are on. Note that the observations can depend probabilistically on the action taken and the final state. Many variations are possible. MFPS May 2006 Genoa p.15/40

61 Formal Definition of a POMDP M = (S, Σ, O, δ : S Σ S [0, 1], γ : S Σ O [0, 1]), MFPS May 2006 Genoa p.16/40

62 Formal Definition of a POMDP M = (S, Σ, O, δ : S Σ S [0, 1], γ : S Σ O [0, 1]), where S is a set of states, O is a set of observations, Σ is a set of actions, δ is the transition probability function and γ gives the observation probabilities. MFPS May 2006 Genoa p.16/40

63 Formal Definition of a POMDP M = (S, Σ, O, δ : S Σ S [0, 1], γ : S Σ O [0, 1]), where S is a set of states, O is a set of observations, Σ is a set of actions, δ is the transition probability function and γ gives the observation probabilities. MFPS May 2006 Genoa p.16/40

64 Automata with State-based Observations An automaton with stochastic observations is a quintuple E = (S, Σ, O, δ : S Σ S, γ : S O [0, 1]). Note that this has deterministic transitions and stochastic observations. MFPS May 2006 Genoa p.17/40

65 Automata with State-based Observations An automaton with stochastic observations is a quintuple E = (S, Σ, O, δ : S Σ S, γ : S O [0, 1]). Note that this has deterministic transitions and stochastic observations. A probabilistic automaton with stochastic observations is F = (S, Σ, O, δ : S Σ S [0, 1], γ : S O [0, 1]). MFPS May 2006 Genoa p.17/40

66 Simple Tests Rather than thinking of propositions and formulas we will think of observations and tests. I will look at state-based notions of observations. MFPS May 2006 Genoa p.18/40

67 Simple Tests Rather than thinking of propositions and formulas we will think of observations and tests. I will look at state-based notions of observations. Recall probabilistic automata E = (S, Σ, O, δ, γ), MFPS May 2006 Genoa p.18/40

68 Simple Tests Rather than thinking of propositions and formulas we will think of observations and tests. I will look at state-based notions of observations. Recall probabilistic automata E = (S, Σ, O, δ, γ), where δ : S Σ S [0, 1] is the transition function MFPS May 2006 Genoa p.18/40

69 Simple Tests Rather than thinking of propositions and formulas we will think of observations and tests. I will look at state-based notions of observations. Recall probabilistic automata E = (S, Σ, O, δ, γ), where δ : S Σ S [0, 1] is the transition function and γ : S O [0, 1] is the observation function. MFPS May 2006 Genoa p.18/40

70 Simple Tests 2 We use the same logic as before except that we give a probabilistic semantics and call the formulas tests. I will a.t or at rather than (a)ϕ. MFPS May 2006 Genoa p.19/40

71 Simple Tests 2 We use the same logic as before except that we give a probabilistic semantics and call the formulas tests. I will a.t or at rather than (a)ϕ. Tests define functions from states to [0, 1]. If they define the same function they are equivalent. MFPS May 2006 Genoa p.19/40

72 Simple Tests 2 We use the same logic as before except that we give a probabilistic semantics and call the formulas tests. I will a.t or at rather than (a)ϕ. Tests define functions from states to [0, 1]. If they define the same function 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 ). MFPS May 2006 Genoa p.19/40

73 Simple Tests 2 We use the same logic as before except that we give a probabilistic semantics and call the formulas tests. I will a.t or at rather than (a)ϕ. Tests define functions from states to [0, 1]. If they define the same function 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. MFPS May 2006 Genoa p.19/40

74 Duality with e-tests S = {[t] E } MFPS May 2006 Genoa p.20/40

75 Duality with e-tests S = {[t] E } O = S MFPS May 2006 Genoa p.20/40

76 Duality with e-tests S = {[t] E } O = S γ ([t] E, s) = [t] E (s) MFPS May 2006 Genoa p.20/40

77 Duality with e-tests S = {[t] E } O = S γ ([t] E, s) = [t] E (s) δ ([t] E, a, [at] E ) = 1; 0 otherwise. MFPS May 2006 Genoa p.20/40

78 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 the transpose of γ. MFPS May 2006 Genoa p.20/40

79 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 the transpose of γ. MFPS May 2006 Genoa p.20/40

80 The Double Dual If E is the primal and E is the dual then the states of the double dual, E are E -equivalence classes of tests. MFPS May 2006 Genoa p.21/40

81 The Double Dual If E is the primal and E is the dual then the states of the double dual, E are E -equivalence classes of tests. An atomic test is just an observation of E, which is just a state of E so it has the form [s] E for some s. MFPS May 2006 Genoa p.21/40

82 The Double Dual If E is the primal and E is the dual then the states of the double dual, E are E -equivalence classes of tests. An atomic test is just an observation of E, which is just a state of E 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). MFPS May 2006 Genoa p.21/40

83 The Double Dual If E is the primal and E is the dual then the states of the double dual, E are E -equivalence classes of tests. An atomic test is just an observation of E, which is just a state of E 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: [a 1 a 2 a k o] E ([s] E ) = [a 1 a 2 a k o] E (s). MFPS May 2006 Genoa p.21/40

84 Inadequacy of e-tests There is a loss of information in the previous construction. MFPS May 2006 Genoa p.22/40

85 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 of observations. MFPS May 2006 Genoa p.22/40

86 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 of observations. [o 1 a 1 o 2 a 2 o 3 ] E ([s] E ) = [o 1 ] E ([s] E ) [a 1 o 2 ] E ([s] E ) [a 1 a 2 o 3 ] E ([s] E ). This does not hold in the primal. MFPS May 2006 Genoa p.22/40

87 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 of observations. [o 1 a 1 o 2 a 2 o 3 ] E ([s] E ) = [o 1 ] E ([s] E ) [a 1 o 2 ] E ([s] E ) [a 1 a 2 o 3 ] E ([s] E ). This does not hold in the primal. The double dual does not conditionalize with respect to intermediate observations. MFPS May 2006 Genoa p.22/40

88 More General Tests Recall the definition of a POMDP M = (S, Σ, O, δ a : S S [0, 1], γ a : S O [0, 1]). MFPS May 2006 Genoa p.23/40

89 More General Tests Recall the definition of a POMDP M = (S, Σ, O, δ a : S S [0, 1], γ a : S O [0, 1]). A test t is a non-empty sequence of actions followed by an observation, i.e. t = a 1 a n o, with n 1. MFPS May 2006 Genoa p.23/40

90 More General Tests Recall the definition of a POMDP M = (S, Σ, O, δ a : S S [0, 1], γ a : S O [0, 1]). A test t is a non-empty sequence of actions followed by an observation, i.e. t = a 1 a n o, with n 1. An experiment is a non-empty sequence of tests e = t 1 t m with m 1. MFPS May 2006 Genoa p.23/40

91 More General Tests Recall the definition of a POMDP M = (S, Σ, O, δ a : S S [0, 1], γ a : S O [0, 1]). A test t is a non-empty sequence of actions followed by an observation, i.e. t = a 1 a n o, with n 1. An experiment is a non-empty sequence of tests e = t 1 t m with m 1. MFPS May 2006 Genoa p.23/40

92 Some Notation We need to generalize the transition function to keep track of the final state. δ ɛ (s, s ) = 1 s=s s, s S δ aα (s, s ) = s δ a (s, s )δ α (s, s ) s, s S. MFPS May 2006 Genoa p.24/40

93 Some Notation We need to generalize the transition function to keep track of the final state. δ ɛ (s, s ) = 1 s=s s, s S δ aα (s, s ) = s δ a (s, s )δ α (s, s ) s, s S. We have written 1 s=s for the indicator function. MFPS May 2006 Genoa p.24/40

94 Some Notation We need to generalize the transition function to keep track of the final state. δ ɛ (s, s ) = 1 s=s s, s S δ aα (s, s ) = s δ a (s, s )δ α (s, s ) s, s S. We have written 1 s=s for the indicator function. We define the symbol s t s which gives the probability that the system starts in s, is subjected to the test t and ends up in the state s ; similarly s e s. MFPS May 2006 Genoa p.24/40

95 Notation continued We have s a 1 a n o s = δ α (s, s )γ an (s, o). MFPS May 2006 Genoa p.25/40

96 Notation continued We have s a 1 a n o s = δ α (s, s )γ an (s, o). We define s e = s s e s. MFPS May 2006 Genoa p.25/40

97 Equivalence on Experiments For experiments e 1, e 2, we say e 1 M e 2 s e 1 = s e 2 s S. MFPS May 2006 Genoa p.26/40

98 Equivalence on Experiments For experiments e 1, e 2, we say e 1 M e 2 s e 1 = s e 2 s S. Then [e] M is the M -equivalence class of e. MFPS May 2006 Genoa p.26/40

99 Equivalence on Experiments For experiments e 1, e 2, we say e 1 M e 2 s e 1 = s e 2 s S. Then [e] M is the M -equivalence class of e. The construction of the dual proceeds as before by making equivalence classes of experiments the states of the dual machine and MFPS May 2006 Genoa p.26/40

100 Equivalence on Experiments For experiments e 1, e 2, we say e 1 M e 2 s e 1 = s e 2 s S. Then [e] M is the M -equivalence class of e. The construction of the dual proceeds as before by making equivalence classes of experiments the states of the dual machine and the states of the primal machine become the observations of the dual machine. MFPS May 2006 Genoa p.26/40

101 The Dual Machine We define the dual as M = (S, Σ, O, δ : S Σ S, γ : S O [0, 1]), MFPS May 2006 Genoa p.27/40

102 The Dual Machine We define the dual as M = (S, Σ, O, δ : S Σ S, γ : S O [0, 1]), where S = {[e] M }, O = S MFPS May 2006 Genoa p.27/40

103 The Dual Machine We define the dual as M = (S, Σ, O, δ : S Σ S, γ : S O [0, 1]), where S = {[e] M }, O = S δ ([e] M, a 0 ) = [a 0 e] M and MFPS May 2006 Genoa p.27/40

104 The Dual Machine We define the dual as M = (S, Σ, O, δ : S Σ S, γ : S O [0, 1]), where S = {[e] M }, O = S δ ([e] M, a 0 ) = [a 0 e] M and γ ([e] M, s) = s e. MFPS May 2006 Genoa p.27/40

105 The Double Dual We use the e-test construction to go from the dual to the double dual. MFPS May 2006 Genoa p.28/40

106 The Double Dual We use the e-test construction to go from the dual to the double dual. The double dual is where M = (S, A, O, δ, γ ), MFPS May 2006 Genoa p.28/40

107 The Double Dual We use the e-test construction to go from the dual to the double dual. The double dual is where S = {[t] M }, O = S, M = (S, A, O, δ, γ ), MFPS May 2006 Genoa p.28/40

108 The Double Dual We use the e-test construction to go from the dual to the double dual. The double dual is where S = {[t] M }, O = S, δ ([t] M, a 0 ) = [a 0 e] M and M = (S, A, O, δ, γ ), MFPS May 2006 Genoa p.28/40

109 The Double Dual We use the e-test construction to go from the dual to the double dual. The double dual is M = (S, A, O, δ, γ ), where S = {[t] M }, O = S, δ ([t] M, a 0 ) = [a 0 e] M and γ ([t] M, [t] M ) = [t] M e = s α R t (e = αs). MFPS May 2006 Genoa p.28/40

110 The Main Theorem One has to check that everything is well defined. MFPS May 2006 Genoa p.29/40

111 The Main Theorem One has to check that everything is well defined. The main result is: The probability of a state s in the primal satisfying a experiment e, i.e. s e is given by [s] M [e] M = γ ([s] M ) [e] M, where [s] indicates the equivalence class of the e-test on the dual which has s as an observation and an empty sequence of actions. MFPS May 2006 Genoa p.29/40

112 AI Motivation One can plan when one has the model: value iteration etc., but quite often one does not have the model. MFPS May 2006 Genoa p.30/40

113 AI Motivation One can plan when one has the model: value iteration etc., but quite often one does not have the model. In the absence of a model, one is forced to learn from data. MFPS May 2006 Genoa p.30/40

114 AI Motivation One can plan when one has the model: value iteration etc., but quite 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 space is. MFPS May 2006 Genoa p.30/40

115 AI Motivation One can plan when one has the model: value iteration etc., but quite 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 space is. There should be no such thing as absolute state! State is just a summary of past observations that can be used to make predictions. MFPS May 2006 Genoa p.30/40

116 AI Motivation One can plan when one has the model: value iteration etc., but quite 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 space is. There should be no such thing as absolute state! State is just a summary of past observations that can be used to make predictions. The double dual shows that the state can be regarded as just the summary of the outcomes of experiments. MFPS May 2006 Genoa p.30/40

117 We have a paper in the upcoming AAAI conference showing how to use the double-dual to represent systems with hidden state. MFPS May 2006 Genoa p.31/40

118 Machines Categorically A a set and T : Set Set is the functor T S = S A. MFPS May 2006 Genoa p.32/40

119 Machines Categorically A a set and T : Set Set is the functor T S = S A. A machine M is a pair (δ, γ) where δ : S A S is a T -algebra and γ : S P 2 is a relation in Set. MFPS May 2006 Genoa p.32/40

120 Machines Categorically A a set and T : Set Set is the functor T S = S A. A machine M is a pair (δ, γ) where δ : S A S is a T -algebra and γ : S P 2 is a relation in Set. S is the set of states, A the actions and P the propositions. MFPS May 2006 Genoa p.32/40

121 Morphisms of Machines A morphism m from M 1 = (δ 1 : S 1 A S 1, γ 1 : S 1 P 1 2) to M 2 = (δ21 : S 2 A S 2, γ 2 : S 2 P 2 2) is a pair m = (f : S 1 S 2, g : P 2 P 1 ) making the following diagrams commute MFPS May 2006 Genoa p.33/40

122 Morphisms of Machines A morphism m from M 1 = (δ 1 : S 1 A S 1, γ 1 : S 1 P 1 2) to M 2 = (δ21 : S 2 A S 2, γ 2 : S 2 P 2 2) is a pair m = (f : S 1 S 2, g : P 2 P 1 ) making the following diagrams commute S 1 A f id A S 2 A and S 1 P 2 f id P2 S 2 P 2 δ 1 S 1 f S 2 δ 2 id S1 g S 1 γ 1 S 2 γ 2 MFPS May 2006 Genoa p.33/40

123 The Dual Machine The category of machines is written Mch. MFPS May 2006 Genoa p.34/40

124 The Dual Machine The category of machines is written Mch. Given a machine M we define the formulas of M, F M, to be the set A P. If φ = (w, p) we will write aφ for (aw, p). MFPS May 2006 Genoa p.34/40

125 The Dual Machine The category of machines is written Mch. Given a machine M we define the formulas of M, F M, to be the set A P. If φ = (w, p) we will write aφ for (aw, p). We define satisfaction by s = (w, p) δ (s, w)γp. MFPS May 2006 Genoa p.34/40

126 The Dual Machine The category of machines is written Mch. Given a machine M we define the formulas of M, F M, to be the set A P. If φ = (w, p) we will write aφ for (aw, p). We define satisfaction by s = (w, p) δ (s, w)γp. The contravariant functor sends M to M, the dual defined before, and the morphism (f, g) : M 1 M 2 to (g, f) where g ([(w, p)] M2 ) = [(w, g(p))] M1. MFPS May 2006 Genoa p.34/40

127 The Reduction Functor A machine is state reduced if s 1 s 2 φ such that s 1 = φ and s 2 = φ or vice versa. MFPS May 2006 Genoa p.35/40

128 The Reduction Functor A machine is state reduced if s 1 s 2 φ such that s 1 = φ and s 2 = φ or vice versa. A machine is proposition reduced if p 1, p 2 ( w 1, w 2 A [(w 1, p 1 )] M = [(w 2, p 2 )] M ) p 1 = p 2. MFPS May 2006 Genoa p.35/40

129 The Reduction Functor A machine is state reduced if s 1 s 2 φ such that s 1 = φ and s 2 = φ or vice versa. A machine is proposition reduced if p 1, p 2 ( w 1, w 2 A [(w 1, p 1 )] M = [(w 2, p 2 )] M ) p 1 = p 2. We define the reduction functor to be composed with itself i.e.. MFPS May 2006 Genoa p.35/40

130 The Reduction Functor A machine is state reduced if s 1 s 2 φ such that s 1 = φ and s 2 = φ or vice versa. A machine is proposition reduced if p 1, p 2 ( w 1, w 2 A [(w 1, p 1 )] M = [(w 2, p 2 )] M ) p 1 = p 2. We define the reduction functor to be composed with itself i.e.. if M = M we say that it is completely reduced. MFPS May 2006 Genoa p.35/40

131 The Disappointment It would be very pleasant if we took Q : Mch Mch op and R : Mch op Mch to be the two (covariant) functors that represent and get Q R. MFPS May 2006 Genoa p.36/40

132 The Disappointment It would be very pleasant if we took Q : Mch Mch op and R : Mch op Mch to be the two (covariant) functors that represent and get Q R. But this is not possible the way we have set things up! MFPS May 2006 Genoa p.36/40

133 The Disappointment It would be very pleasant if we took Q : Mch Mch op and R : Mch op Mch to be the two (covariant) functors that represent and get Q R. But this is not possible the way we have set things up! The unit of the adjunction would have to be a morphism η M : M M which would then require MFPS May 2006 Genoa p.36/40

134 The Disappointment It would be very pleasant if we took Q : Mch Mch op and R : Mch op Mch to be the two (covariant) functors that represent and get Q R. But this is not possible the way we have set things up! The unit of the adjunction would have to be a morphism η M : M M which would then require a map g : [F M ] P 2. MFPS May 2006 Genoa p.36/40

135 The Disappointment It would be very pleasant if we took Q : Mch Mch op and R : Mch op Mch to be the two (covariant) functors that represent and get Q R. But this is not possible the way we have set things up! The unit of the adjunction would have to be a morphism η M : M M which would then require a map g : [F M ] P 2. Unless M is proposition reduced there is no reason at all for such a thing to exist. MFPS May 2006 Genoa p.36/40

136 But what did we prove before? We did not quite use the construction of the last two slides. MFPS May 2006 Genoa p.37/40

137 But what did we prove before? We did not quite use the construction of the last two slides. M = (δ, γ : [F ] M P 2). MFPS May 2006 Genoa p.37/40

138 But what did we prove before? We did not quite use the construction of the last two slides. M = (δ, γ : [F ] M P 2). We proved that this machine was state reduced. MFPS May 2006 Genoa p.37/40

139 But what did we prove before? We did not quite use the construction of the last two slides. M = (δ, γ : [F ] M P 2). We proved that this machine was state reduced. We quietly ignored the extra propositions in the double dual. MFPS May 2006 Genoa p.37/40

140 Purgatory I There is another way of decomposing into a pair of (covariant) functors F and G. F modifies only the propositions and G modifies only the states. MFPS May 2006 Genoa p.38/40

141 Purgatory I There is another way of decomposing into a pair of (covariant) functors F and G. F modifies only the propositions and G modifies only the states. F M = (δ : S A S, γ : S [F ] M 2) where s γ [φ] M [φ] M γ s s [φ] M. MFPS May 2006 Genoa p.38/40

142 Purgatory I There is another way of decomposing into a pair of (covariant) functors F and G. F modifies only the propositions and G modifies only the states. F M = (δ : S A S, γ : S [F ] M 2) where s γ [φ] M [φ] M γ s s [φ] M. GM = (δ : [S] M A [S] M, γ : [S] M P 2); where MFPS May 2006 Genoa p.38/40

143 Purgatory I There is another way of decomposing into a pair of (covariant) functors F and G. F modifies only the propositions and G modifies only the states. F M = (δ : S A S, γ : S [F ] M 2) where s γ [φ] M [φ] M γ s s [φ] M. GM = (δ : [S] M A [S] M, γ : [S] M P 2); where [s] M := {s S φ F, s = φ s = φ} and δ([s] M, a) := [δ(s, a)] M and [s] M γp sγp. MFPS May 2006 Genoa p.38/40

144 Purgatory II The following natural isos hold: F 2 = F, G 2 = G, QF = Q, and GF = F G = RQ. MFPS May 2006 Genoa p.39/40

145 Purgatory II The following natural isos hold: F 2 = F, G 2 = G, QF = Q, and GF = F G = RQ. For any machine M the following diagram is a pullback MFPS May 2006 Genoa p.39/40

146 Purgatory II The following natural isos hold: F 2 = F, G 2 = G, QF = Q, and GF = F G = RQ. For any machine M the following diagram is a pullback and a pushout at the same time id S π P F M (π S,id [F] ) F GM M (π S,id P ) GM (id [S],π P ) MFPS May 2006 Genoa p.39/40

147 Purgatory II The following natural isos hold: F 2 = F, G 2 = G, QF = Q, and GF = F G = RQ. For any machine M the following diagram is a pullback and a pushout at the same time id S π P F M (π S,id [F] ) F GM M (π S,id P ) GM (id [S],π P ) MFPS May 2006 Genoa p.39/40

148 Conclusions We need to understand the general framework in which this fits. How is it related to dualities in control theory? [Alexander Kurz, Jan Rutten] MFPS May 2006 Genoa p.40/40

149 Conclusions We need to understand the general framework in which this fits. How is it related to dualities in control theory? [Alexander Kurz, Jan Rutten] We are experimenting with these ideas for practical problems in the RL Lab at McGill; joint with Doina Precup and Joelle Pineau. MFPS May 2006 Genoa p.40/40

150 Conclusions We need to understand the general framework in which this fits. How is it related to dualities in control theory? [Alexander Kurz, Jan Rutten] We are experimenting with these ideas for practical problems in the RL Lab at McGill; joint with Doina Precup and Joelle Pineau. Extension to continuous observation and continuous state spaces. MFPS May 2006 Genoa p.40/40

151 Conclusions We need to understand the general framework in which this fits. How is it related to dualities in control theory? [Alexander Kurz, Jan Rutten] We are experimenting with these ideas for practical problems in the RL Lab at McGill; joint with Doina Precup and Joelle Pineau. 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? MFPS May 2006 Genoa p.40/40

Duality in Logic and Computation

Duality in Logic and Computation Duality in Logic and Computation Prakash Panangaden 1 1 School of Computer Science McGill University IEEE Symposium On Logic In Computer Science, June 2013 Panangaden (McGill University) Duality in Logic

More information

Duality in Logic and Computation

Duality in Logic and Computation Duality in Logic and Computation Prakash Panangaden 1 1 School of Computer Science McGill University IEEE Symposium On Logic In Computer Science, June 2013 Panangaden (McGill University) Duality in Logic

More information

Decision, Computation and Language

Decision, Computation and Language Decision, Computation and Language Non-Deterministic Finite Automata (NFA) Dr. Muhammad S Khan (mskhan@liv.ac.uk) Ashton Building, Room G22 http://www.csc.liv.ac.uk/~khan/comp218 Finite State Automata

More information

Deterministic Finite Automata. Non deterministic finite automata. Non-Deterministic Finite Automata (NFA) Non-Deterministic Finite Automata (NFA)

Deterministic Finite Automata. Non deterministic finite automata. Non-Deterministic Finite Automata (NFA) Non-Deterministic Finite Automata (NFA) Deterministic Finite Automata Non deterministic finite automata Automata we ve been dealing with have been deterministic For every state and every alphabet symbol there is exactly one move that the machine

More information

CMPSCI 250: Introduction to Computation. Lecture #22: From λ-nfa s to NFA s to DFA s David Mix Barrington 22 April 2013

CMPSCI 250: Introduction to Computation. Lecture #22: From λ-nfa s to NFA s to DFA s David Mix Barrington 22 April 2013 CMPSCI 250: Introduction to Computation Lecture #22: From λ-nfa s to NFA s to DFA s David Mix Barrington 22 April 2013 λ-nfa s to NFA s to DFA s Reviewing the Three Models and Kleene s Theorem The Subset

More information

On Prediction and Planning in Partially Observable Markov Decision Processes with Large Observation Sets

On Prediction and Planning in Partially Observable Markov Decision Processes with Large Observation Sets On Prediction and Planning in Partially Observable Markov Decision Processes with Large Observation Sets Pablo Samuel Castro pcastr@cs.mcgill.ca McGill University Joint work with: Doina Precup and Prakash

More information

Lecture three: Automata and the algebra-coalgebra duality

Lecture three: Automata and the algebra-coalgebra duality Lecture three: Automata and the algebra-coalgebra duality Jan Rutten CWI Amsterdam & Radboud University Nijmegen IPM, Tehran - 13 January 2016 This lecture will explain two diagrams: 1 x c ε σ A r x X

More information

Finite Automata. Mahesh Viswanathan

Finite Automata. Mahesh Viswanathan Finite Automata Mahesh Viswanathan In this lecture, we will consider different models of finite state machines and study their relative power. These notes assume that the reader is familiar with DFAs,

More information

Nondeterminism. September 7, Nondeterminism

Nondeterminism. September 7, Nondeterminism September 7, 204 Introduction is a useful concept that has a great impact on the theory of computation Introduction is a useful concept that has a great impact on the theory of computation So far in our

More information

October 6, Equivalence of Pushdown Automata with Context-Free Gramm

October 6, Equivalence of Pushdown Automata with Context-Free Gramm Equivalence of Pushdown Automata with Context-Free Grammar October 6, 2013 Motivation Motivation CFG and PDA are equivalent in power: a CFG generates a context-free language and a PDA recognizes a context-free

More information

6 Coalgebraic modalities via predicate liftings

6 Coalgebraic modalities via predicate liftings 6 Coalgebraic modalities via predicate liftings In this chapter we take an approach to coalgebraic modal logic where the modalities are in 1-1 correspondence with so-called predicate liftings for the functor

More information

Introduction to Kleene Algebras

Introduction to Kleene Algebras Introduction to Kleene Algebras Riccardo Pucella Basic Notions Seminar December 1, 2005 Introduction to Kleene Algebras p.1 Idempotent Semirings An idempotent semiring is a structure S = (S, +,, 1, 0)

More information

Theory of Computation

Theory of Computation Thomas Zeugmann Hokkaido University Laboratory for Algorithmics http://www-alg.ist.hokudai.ac.jp/ thomas/toc/ Lecture 3: Finite State Automata Motivation In the previous lecture we learned how to formalize

More information

Nondeterministic Finite Automata

Nondeterministic Finite Automata Nondeterministic Finite Automata COMP2600 Formal Methods for Software Engineering Katya Lebedeva Australian National University Semester 2, 206 Slides by Katya Lebedeva. COMP 2600 Nondeterministic Finite

More information

Nondeterministic Finite Automata

Nondeterministic Finite Automata Nondeterministic Finite Automata Mahesh Viswanathan Introducing Nondeterminism Consider the machine shown in Figure. Like a DFA it has finitely many states and transitions labeled by symbols from an input

More information

Constructions on Finite Automata

Constructions on Finite Automata Constructions on Finite Automata Informatics 2A: Lecture 4 Alex Simpson School of Informatics University of Edinburgh als@inf.ed.ac.uk 23rd September, 2014 1 / 29 1 Closure properties of regular languages

More information

On a Categorical Framework for Coalgebraic Modal Logic

On a Categorical Framework for Coalgebraic Modal Logic On a Categorical Framework for Coalgebraic Modal Logic Liang-Ting Chen 1 Achim Jung 2 1 Institute of Information Science, Academia Sinica 2 School of Computer Science, University of Birmingham MFPS XXX

More information

Let us first give some intuitive idea about a state of a system and state transitions before describing finite automata.

Let us first give some intuitive idea about a state of a system and state transitions before describing finite automata. Finite Automata Automata (singular: automation) are a particularly simple, but useful, model of computation. They were initially proposed as a simple model for the behavior of neurons. The concept of a

More information

Constructions on Finite Automata

Constructions on Finite Automata Constructions on Finite Automata Informatics 2A: Lecture 4 Mary Cryan School of Informatics University of Edinburgh mcryan@inf.ed.ac.uk 24 September 2018 1 / 33 Determinization The subset construction

More information

Monoidal Categories, Bialgebras, and Automata

Monoidal Categories, Bialgebras, and Automata Monoidal Categories, Bialgebras, and Automata James Worthington Mathematics Department Cornell University Binghamton University Geometry/Topology Seminar October 29, 2009 Background: Automata Finite automata

More information

The efficiency of identifying timed automata and the power of clocks

The efficiency of identifying timed automata and the power of clocks The efficiency of identifying timed automata and the power of clocks Sicco Verwer a,b,1,, Mathijs de Weerdt b, Cees Witteveen b a Eindhoven University of Technology, Department of Mathematics and Computer

More information

(Refer Slide Time: 0:21)

(Refer Slide Time: 0:21) Theory of Computation Prof. Somenath Biswas Department of Computer Science and Engineering Indian Institute of Technology Kanpur Lecture 7 A generalisation of pumping lemma, Non-deterministic finite automata

More information

Algebraic Geometry

Algebraic Geometry MIT OpenCourseWare http://ocw.mit.edu 18.726 Algebraic Geometry Spring 2009 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. 18.726: Algebraic Geometry

More information

CONCATENATION AND KLEENE STAR ON DETERMINISTIC FINITE AUTOMATA

CONCATENATION AND KLEENE STAR ON DETERMINISTIC FINITE AUTOMATA 1 CONCATENATION AND KLEENE STAR ON DETERMINISTIC FINITE AUTOMATA GUO-QIANG ZHANG, XIANGNAN ZHOU, ROBERT FRASER, LICONG CUI Department of Electrical Engineering and Computer Science, Case Western Reserve

More information

Conceptual Connections of Circularity and Category Theory

Conceptual Connections of Circularity and Category Theory 1/64 Conceptual Connections of Circularity and Category Theory Larry Moss Indiana University, Bloomington ESSLLI 2012, Opole 2/64 The conceptual comparison chart Filling out the details is my goal for

More information

Finite Automata. Seungjin Choi

Finite Automata. Seungjin Choi Finite Automata Seungjin Choi Department of Computer Science and Engineering Pohang University of Science and Technology 77 Cheongam-ro, Nam-gu, Pohang 37673, Korea seungjin@postech.ac.kr 1 / 28 Outline

More information

Category Theory. Categories. Definition.

Category Theory. Categories. Definition. Category Theory Category theory is a general mathematical theory of structures, systems of structures and relationships between systems of structures. It provides a unifying and economic mathematical modeling

More information

September 11, Second Part of Regular Expressions Equivalence with Finite Aut

September 11, Second Part of Regular Expressions Equivalence with Finite Aut Second Part of Regular Expressions Equivalence with Finite Automata September 11, 2013 Lemma 1.60 If a language is regular then it is specified by a regular expression Proof idea: For a given regular language

More information

Computer Sciences Department

Computer Sciences Department 1 Reference Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER 3 objectives Finite automaton Infinite automaton Formal definition State diagram Regular and Non-regular

More information

A note on coinduction and weak bisimilarity for while programs

A note on coinduction and weak bisimilarity for while programs Centrum voor Wiskunde en Informatica A note on coinduction and weak bisimilarity for while programs J.J.M.M. Rutten Software Engineering (SEN) SEN-R9826 October 31, 1998 Report SEN-R9826 ISSN 1386-369X

More information

Finite Automata. BİL405 - Automata Theory and Formal Languages 1

Finite Automata. BİL405 - Automata Theory and Formal Languages 1 Finite Automata BİL405 - Automata Theory and Formal Languages 1 Deterministic Finite Automata (DFA) A Deterministic Finite Automata (DFA) is a quintuple A = (Q,,, q 0, F) 1. Q is a finite set of states

More information

NFA and regex. the Boolean algebra of languages. regular expressions. Informatics 1 School of Informatics, University of Edinburgh

NFA and regex. the Boolean algebra of languages. regular expressions. Informatics 1 School of Informatics, University of Edinburgh NFA and regex cl the Boolean algebra of languages regular expressions Informatics The intersection of two regular languages is regular L = even numbers L = odd numbers L = mod L = mod Informatics The intersection

More information

1 The Hyland-Schalke functor G Rel. 2 Weakenings

1 The Hyland-Schalke functor G Rel. 2 Weakenings 1 The Hyland-Schalke functor G Rel Let G denote an appropriate category of games and strategies, and let Rel denote the category of sets and relations. It is known (Hyland, Schalke, 1996) that the following

More information

A categorical model for a quantum circuit description language

A categorical model for a quantum circuit description language A categorical model for a quantum circuit description language Francisco Rios (joint work with Peter Selinger) Department of Mathematics and Statistics Dalhousie University CT July 16th 22th, 2017 What

More information

CSC236 Week 11. Larry Zhang

CSC236 Week 11. Larry Zhang CSC236 Week 11 Larry Zhang 1 Announcements Next week s lecture: Final exam review This week s tutorial: Exercises with DFAs PS9 will be out later this week s. 2 Recap Last week we learned about Deterministic

More information

CS 154, Lecture 2: Finite Automata, Closure Properties Nondeterminism,

CS 154, Lecture 2: Finite Automata, Closure Properties Nondeterminism, CS 54, Lecture 2: Finite Automata, Closure Properties Nondeterminism, Why so Many Models? Streaming Algorithms 0 42 Deterministic Finite Automata Anatomy of Deterministic Finite Automata transition: for

More information

Streams and Coalgebra Lecture 2

Streams and Coalgebra Lecture 2 Streams and Coalgebra Lecture 2 Helle Hvid Hansen and Jan Rutten Radboud University Nijmegen & CWI Amsterdam Representing Streams II, Lorentz Center, Leiden, January 2014 Tutorial Overview Lecture 1 (Hansen):

More information

Categories and functors

Categories and functors Lecture 1 Categories and functors Definition 1.1 A category A consists of a collection ob(a) (whose elements are called the objects of A) for each A, B ob(a), a collection A(A, B) (whose elements are called

More information

Theory of Computation p.1/?? Theory of Computation p.2/?? Unknown: Implicitly a Boolean variable: true if a word is

Theory of Computation p.1/?? Theory of Computation p.2/?? Unknown: Implicitly a Boolean variable: true if a word is Abstraction of Problems Data: abstracted as a word in a given alphabet. Σ: alphabet, a finite, non-empty set of symbols. Σ : all the words of finite length built up using Σ: Conditions: abstracted as a

More information

September 7, Formal Definition of a Nondeterministic Finite Automaton

September 7, Formal Definition of a Nondeterministic Finite Automaton Formal Definition of a Nondeterministic Finite Automaton September 7, 2014 A comment first The formal definition of an NFA is similar to that of a DFA. Both have states, an alphabet, transition function,

More information

Nondeterministic finite automata

Nondeterministic finite automata Lecture 3 Nondeterministic finite automata This lecture is focused on the nondeterministic finite automata (NFA) model and its relationship to the DFA model. Nondeterminism is an important concept in the

More information

COMMUTATIVE ALGEBRA LECTURE 1: SOME CATEGORY THEORY

COMMUTATIVE ALGEBRA LECTURE 1: SOME CATEGORY THEORY COMMUTATIVE ALGEBRA LECTURE 1: SOME CATEGORY THEORY VIVEK SHENDE A ring is a set R with two binary operations, an addition + and a multiplication. Always there should be an identity 0 for addition, an

More information

Boolean Algebras, Boolean Rings and Stone s Representation Theorem

Boolean Algebras, Boolean Rings and Stone s Representation Theorem Boolean Algebras, Boolean Rings and Stone s Representation Theorem Hongtaek Jung December 27, 2017 Abstract This is a part of a supplementary note for a Logic and Set Theory course. The main goal is to

More information

Exercises on chapter 0

Exercises on chapter 0 Exercises on chapter 0 1. A partially ordered set (poset) is a set X together with a relation such that (a) x x for all x X; (b) x y and y x implies that x = y for all x, y X; (c) x y and y z implies that

More information

UNIT-VI PUSHDOWN AUTOMATA

UNIT-VI PUSHDOWN AUTOMATA Syllabus R09 Regulation UNIT-VI PUSHDOWN AUTOMATA The context free languages have a type of automaton that defined them. This automaton, called a pushdown automaton, is an extension of the nondeterministic

More information

Finite Automata. Finite Automata

Finite Automata. Finite Automata Finite Automata Finite Automata Formal Specification of Languages Generators Grammars Context-free Regular Regular Expressions Recognizers Parsers, Push-down Automata Context Free Grammar Finite State

More information

Extended transition function of a DFA

Extended transition function of a DFA Extended transition function of a DFA The next two pages describe the extended transition function of a DFA in a more detailed way than Handout 3.. p./43 Formal approach to accepted strings We define the

More information

Assume the left square is a pushout. Then the right square is a pushout if and only if the big rectangle is.

Assume the left square is a pushout. Then the right square is a pushout if and only if the big rectangle is. COMMUTATIVE ALGERA LECTURE 2: MORE CATEGORY THEORY VIVEK SHENDE Last time we learned about Yoneda s lemma, and various universal constructions initial and final objects, products and coproducts (which

More information

Lecture 1: Finite State Automaton

Lecture 1: Finite State Automaton Lecture 1: Finite State Automaton Instructor: Ketan Mulmuley Scriber: Yuan Li January 6, 2015 1 Deterministic Finite Automaton Informally, a deterministic finite automaton (DFA) has finite number of s-

More information

3. Categories and Functors We recall the definition of a category: Definition 3.1. A category C is the data of two collections. The first collection

3. Categories and Functors We recall the definition of a category: Definition 3.1. A category C is the data of two collections. The first collection 3. Categories and Functors We recall the definition of a category: Definition 3.1. A category C is the data of two collections. The first collection is called the objects of C and is denoted Obj(C). Given

More information

Compilers. Lexical analysis. Yannis Smaragdakis, U. Athens (original slides by Sam

Compilers. Lexical analysis. Yannis Smaragdakis, U. Athens (original slides by Sam Compilers Lecture 3 Lexical analysis Yannis Smaragdakis, U. Athens (original slides by Sam Guyer@Tufts) Big picture Source code Front End IR Back End Machine code Errors Front end responsibilities Check

More information

Theoretical Foundations of the UML

Theoretical Foundations of the UML Theoretical Foundations of the UML Lecture 17+18: A Logic for MSCs Joost-Pieter Katoen Lehrstuhl für Informatik 2 Software Modeling and Verification Group moves.rwth-aachen.de/teaching/ws-1718/fuml/ 5.

More information

Classes and conversions

Classes and conversions Classes and conversions Regular expressions Syntax: r = ε a r r r + r r Semantics: The language L r of a regular expression r is inductively defined as follows: L =, L ε = {ε}, L a = a L r r = L r L r

More information

Lecture 3: Nondeterministic Finite Automata

Lecture 3: Nondeterministic Finite Automata Lecture 3: Nondeterministic Finite Automata September 5, 206 CS 00 Theory of Computation As a recap of last lecture, recall that a deterministic finite automaton (DFA) consists of (Q, Σ, δ, q 0, F ) where

More information

CS21 Decidability and Tractability

CS21 Decidability and Tractability CS21 Decidability and Tractability Lecture 2 January 5, 2018 January 5, 2018 CS21 Lecture 2 1 Outline Finite Automata Nondeterministic Finite Automata Closure under regular operations NFA, FA equivalence

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY 15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY REVIEW for MIDTERM 1 THURSDAY Feb 6 Midterm 1 will cover everything we have seen so far The PROBLEMS will be from Sipser, Chapters 1, 2, 3 It will be

More information

Automata theory. An algorithmic approach. Lecture Notes. Javier Esparza

Automata theory. An algorithmic approach. Lecture Notes. Javier Esparza Automata theory An algorithmic approach Lecture Notes Javier Esparza July 2 22 2 Chapter 9 Automata and Logic A regular expression can be seen as a set of instructions ( a recipe ) for generating the words

More information

Clarifications from last time. This Lecture. Last Lecture. CMSC 330: Organization of Programming Languages. Finite Automata.

Clarifications from last time. This Lecture. Last Lecture. CMSC 330: Organization of Programming Languages. Finite Automata. CMSC 330: Organization of Programming Languages Last Lecture Languages Sets of strings Operations on languages Finite Automata Regular expressions Constants Operators Precedence CMSC 330 2 Clarifications

More information

Inf2A: Converting from NFAs to DFAs and Closure Properties

Inf2A: Converting from NFAs to DFAs and Closure Properties 1/43 Inf2A: Converting from NFAs to DFAs and Stuart Anderson School of Informatics University of Edinburgh October 13, 2009 Starter Questions 2/43 1 Can you devise a way of testing for any FSM M whether

More information

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Lecture 9 Ana Bove April 19th 2018 Recap: Regular Expressions Algebraic representation of (regular) languages; R, S ::= a R + S RS R......

More information

Timo Latvala. February 4, 2004

Timo Latvala. February 4, 2004 Reactive Systems: Temporal Logic LT L Timo Latvala February 4, 2004 Reactive Systems: Temporal Logic LT L 8-1 Temporal Logics Temporal logics are currently the most widely used specification formalism

More information

NOTES ON ATIYAH S TQFT S

NOTES ON ATIYAH S TQFT S NOTES ON ATIYAH S TQFT S J.P. MAY As an example of categorification, I presented Atiyah s axioms [1] for a topological quantum field theory (TQFT) to undergraduates in the University of Chicago s summer

More information

Prime Languages, Orna Kupferman, Jonathan Mosheiff. School of Engineering and Computer Science The Hebrew University, Jerusalem, Israel

Prime Languages, Orna Kupferman, Jonathan Mosheiff. School of Engineering and Computer Science The Hebrew University, Jerusalem, Israel Prime Languages, Orna Kupferman, Jonathan Mosheiff School of Engineering and Computer Science The Hebrew University, Jerusalem, Israel Abstract We say that a deterministic finite automaton (DFA) A is composite

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION FORMAL LANGUAGES, AUTOMATA AND COMPUTATION DECIDABILITY ( LECTURE 15) SLIDES FOR 15-453 SPRING 2011 1 / 34 TURING MACHINES-SYNOPSIS The most general model of computation Computations of a TM are described

More information

Obtaining the syntactic monoid via duality

Obtaining the syntactic monoid via duality Radboud University Nijmegen MLNL Groningen May 19th, 2011 Formal languages An alphabet is a non-empty finite set of symbols. If Σ is an alphabet, then Σ denotes the set of all words over Σ. The set Σ forms

More information

Languages. Non deterministic finite automata with ε transitions. First there was the DFA. Finite Automata. Non-Deterministic Finite Automata (NFA)

Languages. Non deterministic finite automata with ε transitions. First there was the DFA. Finite Automata. Non-Deterministic Finite Automata (NFA) Languages Non deterministic finite automata with ε transitions Recall What is a language? What is a class of languages? Finite Automata Consists of A set of states (Q) A start state (q o ) A set of accepting

More information

Finite Automata (contd)

Finite Automata (contd) Finite Automata (contd) CS 2800: Discrete Structures, Fall 2014 Sid Chaudhuri Recap: Deterministic Finite Automaton A DFA is a 5-tuple M = (Q, Σ, δ, q 0, F) Q is a fnite set of states Σ is a fnite input

More information

Representable presheaves

Representable presheaves Representable presheaves March 15, 2017 A presheaf on a category C is a contravariant functor F on C. In particular, for any object X Ob(C) we have the presheaf (of sets) represented by X, that is Hom

More information

Equivalence notions and model minimization in Markov decision processes

Equivalence notions and model minimization in Markov decision processes Artificial Intelligence 147 (2003) 163 223 www.elsevier.com/locate/artint Equivalence notions and model minimization in Markov decision processes Robert Givan a,, Thomas Dean b, Matthew Greig a a School

More information

An Algebraic View of the Relation between Largest Common Subtrees and Smallest Common Supertrees

An Algebraic View of the Relation between Largest Common Subtrees and Smallest Common Supertrees An Algebraic View of the Relation between Largest Common Subtrees and Smallest Common Supertrees Francesc Rosselló 1, Gabriel Valiente 2 1 Department of Mathematics and Computer Science, Research Institute

More information

Chapter 5. Finite Automata

Chapter 5. Finite Automata Chapter 5 Finite Automata 5.1 Finite State Automata Capable of recognizing numerous symbol patterns, the class of regular languages Suitable for pattern-recognition type applications, such as the lexical

More information

Equivalence Notions and Model Minimization in Markov Decision Processes

Equivalence Notions and Model Minimization in Markov Decision Processes Equivalence Notions and Model Minimization in Markov Decision Processes Robert Givan, Thomas Dean, and Matthew Greig Robert Givan and Matthew Greig School of Electrical and Computer Engineering Purdue

More information

Chapter 2: Finite Automata

Chapter 2: Finite Automata Chapter 2: Finite Automata 2.1 States, State Diagrams, and Transitions Finite automaton is the simplest acceptor or recognizer for language specification. It is also the simplest model of a computer. A

More information

Theory of computation: initial remarks (Chapter 11)

Theory of computation: initial remarks (Chapter 11) Theory of computation: initial remarks (Chapter 11) For many purposes, computation is elegantly modeled with simple mathematical objects: Turing machines, finite automata, pushdown automata, and such.

More information

FUNCTORS AND ADJUNCTIONS. 1. Functors

FUNCTORS AND ADJUNCTIONS. 1. Functors FUNCTORS AND ADJUNCTIONS Abstract. Graphs, quivers, natural transformations, adjunctions, Galois connections, Galois theory. 1.1. Graph maps. 1. Functors 1.1.1. Quivers. Quivers generalize directed graphs,

More information

T (s, xa) = T (T (s, x), a). The language recognized by M, denoted L(M), is the set of strings accepted by M. That is,

T (s, xa) = T (T (s, x), a). The language recognized by M, denoted L(M), is the set of strings accepted by M. That is, Recall A deterministic finite automaton is a five-tuple where S is a finite set of states, M = (S, Σ, T, s 0, F ) Σ is an alphabet the input alphabet, T : S Σ S is the transition function, s 0 S is the

More information

COM364 Automata Theory Lecture Note 2 - Nondeterminism

COM364 Automata Theory Lecture Note 2 - Nondeterminism COM364 Automata Theory Lecture Note 2 - Nondeterminism Kurtuluş Küllü March 2018 The FA we saw until now were deterministic FA (DFA) in the sense that for each state and input symbol there was exactly

More information

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 6 CHAPTER 2 FINITE AUTOMATA 2. Nondeterministic Finite Automata NFA 3. Finite Automata and Regular Expressions 4. Languages

More information

Uses of finite automata

Uses of finite automata Chapter 2 :Finite Automata 2.1 Finite Automata Automata are computational devices to solve language recognition problems. Language recognition problem is to determine whether a word belongs to a language.

More information

Nondeterministic Finite Automata

Nondeterministic Finite Automata Nondeterministic Finite Automata Not A DFA Does not have exactly one transition from every state on every symbol: Two transitions from q 0 on a No transition from q 1 (on either a or b) Though not a DFA,

More information

The State Explosion Problem

The State Explosion Problem The State Explosion Problem Martin Kot August 16, 2003 1 Introduction One from main approaches to checking correctness of a concurrent system are state space methods. They are suitable for automatic analysis

More information

Kleene Algebras and Algebraic Path Problems

Kleene Algebras and Algebraic Path Problems Kleene Algebras and Algebraic Path Problems Davis Foote May 8, 015 1 Regular Languages 1.1 Deterministic Finite Automata A deterministic finite automaton (DFA) is a model of computation that can simulate

More information

Realization of Coinductive Types

Realization of Coinductive Types MFPS 2011 Realization of Coinductive Types Dexter Kozen 1,2 Department of Computer Science Cornell University Ithaca, New York 14853 7501, USA Abstract We give an explicit combinatorial construction of

More information

CSE 135: Introduction to Theory of Computation Nondeterministic Finite Automata (cont )

CSE 135: Introduction to Theory of Computation Nondeterministic Finite Automata (cont ) CSE 135: Introduction to Theory of Computation Nondeterministic Finite Automata (cont ) Sungjin Im University of California, Merced 2-3-214 Example II A ɛ B ɛ D F C E Example II A ɛ B ɛ D F C E NFA accepting

More information

Nondeterministic Finite Automata and Regular Expressions

Nondeterministic Finite Automata and Regular Expressions Nondeterministic Finite Automata and Regular Expressions CS 2800: Discrete Structures, Spring 2015 Sid Chaudhuri Recap: Deterministic Finite Automaton A DFA is a 5-tuple M = (Q, Σ, δ, q 0, F) Q is a finite

More information

Semantics and syntax of higher inductive types

Semantics and syntax of higher inductive types Semantics and syntax of higher inductive types Michael Shulman 1 Peter LeFanu Lumsdaine 2 1 University of San Diego 2 Stockholm University http://www.sandiego.edu/~shulman/papers/stthits.pdf March 20,

More information

Teooriaseminar. TTÜ Küberneetika Instituut. May 10, Categorical Models. for Two Intuitionistic Modal Logics. Wolfgang Jeltsch.

Teooriaseminar. TTÜ Küberneetika Instituut. May 10, Categorical Models. for Two Intuitionistic Modal Logics. Wolfgang Jeltsch. TTÜ Küberneetika Instituut Teooriaseminar May 10, 2012 1 2 3 4 1 2 3 4 Modal logics used to deal with things like possibility, belief, and time in this talk only time two new operators and : ϕ now and

More information

Neighborhood Semantics for Modal Logic Lecture 5

Neighborhood Semantics for Modal Logic Lecture 5 Neighborhood Semantics for Modal Logic Lecture 5 Eric Pacuit ILLC, Universiteit van Amsterdam staff.science.uva.nl/ epacuit August 17, 2007 Eric Pacuit: Neighborhood Semantics, Lecture 5 1 Plan for the

More information

Stochastic Histories. Chapter Introduction

Stochastic Histories. Chapter Introduction Chapter 8 Stochastic Histories 8.1 Introduction Despite the fact that classical mechanics employs deterministic dynamical laws, random dynamical processes often arise in classical physics, as well as in

More information

Finite Universes. L is a fixed-length language if it has length n for some

Finite Universes. L is a fixed-length language if it has length n for some Finite Universes Finite Universes When the universe is finite (e.g., the interval 0, 2 1 ), all objects can be encoded by words of the same length. A language L has length n 0 if L =, or every word of

More information

Chapter Five: Nondeterministic Finite Automata

Chapter Five: Nondeterministic Finite Automata Chapter Five: Nondeterministic Finite Automata From DFA to NFA A DFA has exactly one transition from every state on every symbol in the alphabet. By relaxing this requirement we get a related but more

More information

Lecture 3: Finite Automata. Finite Automata. Deterministic Finite Automata. Summary. Dr Kieran T. Herley

Lecture 3: Finite Automata. Finite Automata. Deterministic Finite Automata. Summary. Dr Kieran T. Herley Lecture 3: Finite Automata Dr Kieran T. Herley Department of Computer Science University College Cork Summary Deterministic finite automata (DFA). Definition and operation of same. DFAs as string classifiers

More information

An Introduction to Markov Decision Processes. MDP Tutorial - 1

An Introduction to Markov Decision Processes. MDP Tutorial - 1 An Introduction to Markov Decision Processes Bob Givan Purdue University Ron Parr Duke University MDP Tutorial - 1 Outline Markov Decision Processes defined (Bob) Objective functions Policies Finding Optimal

More information

(Co-)algebraic Automata Theory

(Co-)algebraic Automata Theory (Co-)algebraic Automata Theory Sergey Goncharov, Stefan Milius, Alexandra Silva Erlangen, 5.11.2013 Chair 8 (Theoretical Computer Science) Short Histrory of Coalgebraic Invasion to Automata Theory Deterministic

More information

Takeaway Notes: Finite State Automata

Takeaway Notes: Finite State Automata Takeaway Notes: Finite State Automata Contents 1 Introduction 1 2 Basics and Ground Rules 2 2.1 Building Blocks.............................. 2 2.2 The Name of the Game.......................... 2 3 Deterministic

More information

MDP Preliminaries. Nan Jiang. February 10, 2019

MDP Preliminaries. Nan Jiang. February 10, 2019 MDP Preliminaries Nan Jiang February 10, 2019 1 Markov Decision Processes In reinforcement learning, the interactions between the agent and the environment are often described by a Markov Decision Process

More information

UNIT-III REGULAR LANGUAGES

UNIT-III REGULAR LANGUAGES Syllabus R9 Regulation REGULAR EXPRESSIONS UNIT-III REGULAR LANGUAGES Regular expressions are useful for representing certain sets of strings in an algebraic fashion. In arithmetic we can use the operations

More information

Deterministic Finite Automaton (DFA)

Deterministic Finite Automaton (DFA) 1 Lecture Overview Deterministic Finite Automata (DFA) o accepting a string o defining a language Nondeterministic Finite Automata (NFA) o converting to DFA (subset construction) o constructed from a regular

More information

Finite Automata Part Two

Finite Automata Part Two Finite Automata Part Two DFAs A DFA is a Deterministic Finite Automaton A DFA is defined relative to some alphabet Σ. For each state in the DFA, there must be exactly one transition defined for each symbol

More information

SYLLABUS. Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 3 : REGULAR EXPRESSIONS AND LANGUAGES

SYLLABUS. Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 3 : REGULAR EXPRESSIONS AND LANGUAGES Contents i SYLLABUS UNIT - I CHAPTER - 1 : AUT UTOMA OMATA Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 2 : FINITE AUT UTOMA OMATA An Informal Picture of Finite Automata,

More information