Brzozowskis algorithm (co)algebraically Jan Rutten CWI & - - PowerPoint PPT Presentation

brzozowski s algorithm co algebraically
SMART_READER_LITE
LIVE PREVIEW

Brzozowskis algorithm (co)algebraically Jan Rutten CWI & - - PowerPoint PPT Presentation

1. Example 2. (Co)algebra 3. Automata 4. Duality 5. Reversing 6. Conclusions Brzozowskis algorithm (co)algebraically Jan Rutten CWI & Radboud University 1. Example 2. (Co)algebra 3. Automata 4. Duality 5. Reversing 6.


slide-1
SLIDE 1
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Brzozowski’s algorithm (co)algebraically

Jan Rutten

CWI & Radboud University

slide-2
SLIDE 2
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Motivation

  • duality between reachability and observability:

beautiful, not very well-known.

  • combined use of algebra and coalgebra.
  • our understanding of automata is still very limited;
  • cf. recent research: universal automata, àtomata, weighted

automata (Sakarovitch, Brzozowski, . . . )

  • joint work with Bonchi, Bonsangue, Silva (CWI, 2011) and

Hansen.

  • based on Arbib and Manes, 1975.
  • Cf. Panangaden, Kupke, Koenig, Adamek, Milius, Gehrke,

Pin, Roumen, , . . .

slide-3
SLIDE 3
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Motivation

  • duality between reachability and observability:

beautiful, not very well-known.

  • combined use of algebra and coalgebra.
  • our understanding of automata is still very limited;
  • cf. recent research: universal automata, àtomata, weighted

automata (Sakarovitch, Brzozowski, . . . )

  • joint work with Bonchi, Bonsangue, Silva (CWI, 2011) and

Hansen.

  • based on Arbib and Manes, 1975.
  • Cf. Panangaden, Kupke, Koenig, Adamek, Milius, Gehrke,

Pin, Roumen, , . . .

slide-4
SLIDE 4
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Overview

  • 1. Brzozowski’s algorithm: example
  • 2. (Co)algebra
  • 3. Automata (co)algebraically
  • 4. The duality between reachability and observability
  • 5. Reversing the automaton
  • 6. Conclusions
slide-5
SLIDE 5
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions
  • 1. Brzozowski’s algorithm: example
slide-6
SLIDE 6
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

A deterministic automaton X = {x, y, z}

x

b

  • a

z

b

  • a
  • y

b

  • a
  • initial state: x
  • final states: y and z
  • L(x) = {a, b}∗ a
slide-7
SLIDE 7
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

A deterministic automaton X = {x, y, z}

x

b

  • a

z

b

  • a
  • y

b

  • a
  • initial state: x
  • final states: y and z
  • L(x) = {a, b}∗ a
slide-8
SLIDE 8
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

A deterministic automaton X = {x, y, z}

x

b

  • a

z

b

  • a
  • y

b

  • a
  • initial state: x
  • final states: y and z
  • L(x) = {a, b}∗ a
slide-9
SLIDE 9
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Reversing the automaton: rev(X)

X =

x

b

  • a

z

b

  • a
  • y

b

  • a
  • rev(X) =

x b

  • b
  • b
  • z

a

  • y

a

  • a
  • transitions are reversed
  • initial states

⇔ final states

  • rev(X) is non-deterministic
slide-10
SLIDE 10
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Reversing the automaton: rev(X)

X =

x

b

  • a

z

b

  • a
  • y

b

  • a
  • rev(X) =

x b

  • b
  • b
  • z

a

  • y

a

  • a
  • transitions are reversed
  • initial states

⇔ final states

  • rev(X) is non-deterministic
slide-11
SLIDE 11
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Reversing the automaton: rev(X)

X =

x

b

  • a

z

b

  • a
  • y

b

  • a
  • rev(X) =

x b

  • b
  • b
  • z

a

  • y

a

  • a
  • transitions are reversed
  • initial states

⇔ final states

  • rev(X) is non-deterministic
slide-12
SLIDE 12
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Reversing the automaton: rev(X)

X =

x

b

  • a

z

b

  • a
  • y

b

  • a
  • rev(X) =

x b

  • b
  • b
  • z

a

  • y

a

  • a
  • transitions are reversed
  • initial states

⇔ final states

  • rev(X) is non-deterministic
slide-13
SLIDE 13
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Reversing the automaton: rev(X)

X =

x

b

  • a

z

b

  • a
  • y

b

  • a
  • rev(X) =

x b

  • b
  • b
  • z

a

  • y

a

  • a
  • transitions are reversed
  • initial states

⇔ final states

  • rev(X) is non-deterministic
slide-14
SLIDE 14
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Making it deterministic again: det(rev(X))

x b

  • b
  • b
  • z

a

  • y

a

  • a
  • x, y

a b x, y, z a, b

  • x, z

b

  • a
  • y, z

b

  • a
  • x

b

  • a
  • y

b

  • a

a, b

  • z

b

  • a
  • new state space: 2X = {V | V ⊆ {x, y, z} }
  • V

a

W

⇔ ∀w ∈ W ∃v ∈ V : v a

w

  • initial state:{y, z}
  • final states: all V with x ∈ V
slide-15
SLIDE 15
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Making it deterministic again: det(rev(X))

x b

  • b
  • b
  • z

a

  • y

a

  • a
  • x, y

a b x, y, z a, b

  • x, z

b

  • a
  • y, z

b

  • a
  • x

b

  • a
  • y

b

  • a

a, b

  • z

b

  • a
  • new state space: 2X = {V | V ⊆ {x, y, z} }
  • V

a

W

⇔ ∀w ∈ W ∃v ∈ V : v a

w

  • initial state:{y, z}
  • final states: all V with x ∈ V
slide-16
SLIDE 16
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Making it deterministic again: det(rev(X))

x b

  • b
  • b
  • z

a

  • y

a

  • a
  • x, y

a b x, y, z a, b

  • x, z

b

  • a
  • y, z

b

  • a
  • x

b

  • a
  • y

b

  • a

a, b

  • z

b

  • a
  • new state space: 2X = {V | V ⊆ {x, y, z} }
  • V

a

W

⇔ ∀w ∈ W ∃v ∈ V : v a

w

  • initial state:{y, z}
  • final states: all V with x ∈ V
slide-17
SLIDE 17
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Making it deterministic again: det(rev(X))

x b

  • b
  • b
  • z

a

  • y

a

  • a
  • x, y

a b x, y, z a, b

  • x, z

b

  • a
  • y, z

b

  • a
  • x

b

  • a
  • y

b

  • a

a, b

  • z

b

  • a
  • new state space: 2X = {V | V ⊆ {x, y, z} }
  • V

a

W

⇔ ∀w ∈ W ∃v ∈ V : v a

w

  • initial state:{y, z}
  • final states: all V with x ∈ V
slide-18
SLIDE 18
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Making it deterministic again: det(rev(X))

x b

  • b
  • b
  • z

a

  • y

a

  • a
  • x, y

a b x, y, z a, b

  • x, z

b

  • a
  • y, z

b

  • a
  • x

b

  • a
  • y

b

  • a

a, b

  • z

b

  • a
  • new state space: 2X = {V | V ⊆ {x, y, z} }
  • V

a

W

⇔ ∀w ∈ W ∃v ∈ V : v a

w

  • initial state:{y, z}
  • final states: all V with x ∈ V
slide-19
SLIDE 19
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

The automaton det(rev(X)) . . .

x, y a b x, y, z a, b

  • x, z

b

  • a
  • y, z

b

  • a
  • x

b

  • a
  • y

b

  • a

a, b

  • z

b

  • a
  • . . . accepts the reverse of the language accepted by X:

L( det(rev(X)) ) = a {a, b}∗ = reverse( L(X) )

  • . . . and is minimal!
slide-20
SLIDE 20
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

The automaton det(rev(X)) . . .

x, y a b x, y, z a, b

  • x, z

b

  • a
  • y, z

b

  • a
  • x

b

  • a
  • y

b

  • a

a, b

  • z

b

  • a
  • . . . accepts the reverse of the language accepted by X:

L( det(rev(X)) ) = a {a, b}∗ = reverse( L(X) )

  • . . . and is minimal!
slide-21
SLIDE 21
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

The automaton det(rev(X)) . . .

x, y a b x, y, z a, b

  • x, z

b

  • a
  • y, z

b

  • a
  • x

b

  • a
  • y

b

  • a

a, b

  • z

b

  • a
  • . . . accepts the reverse of the language accepted by X:

L( det(rev(X)) ) = a {a, b}∗ = reverse( L(X) )

  • . . . and is minimal!
slide-22
SLIDE 22
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Today’s Theorem

If: a deterministic automaton X is reachable and accepts L(X) then: det(rev(X)) is minimal and L( det(rev(X)) ) = reverse( L(X) )

slide-23
SLIDE 23
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Today’s Theorem

If: a deterministic automaton X is reachable and accepts L(X) then: det(rev(X)) is minimal and L( det(rev(X)) ) = reverse( L(X) )

slide-24
SLIDE 24
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Taking the reachable part of det(rev(X))

x, y a b x, y, z a, b

  • x, z

b

  • a
  • y, z

b

  • a
  • x

b

  • a
  • y

b

  • a

a, b

  • z

b

  • a
  • x, y, z

a, b

  • y, z

b

  • a

a, b

  • reach(det(rev(X))) is reachable (by construction)
slide-25
SLIDE 25
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Taking the reachable part of det(rev(X))

x, y a b x, y, z a, b

  • x, z

b

  • a
  • y, z

b

  • a
  • x

b

  • a
  • y

b

  • a

a, b

  • z

b

  • a
  • x, y, z

a, b

  • y, z

b

  • a

a, b

  • reach(det(rev(X))) is reachable (by construction)
slide-26
SLIDE 26
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Taking the reachable part of det(rev(X))

x, y a b x, y, z a, b

  • x, z

b

  • a
  • y, z

b

  • a
  • x

b

  • a
  • y

b

  • a

a, b

  • z

b

  • a
  • x, y, z

a, b

  • y, z

b

  • a

a, b

  • reach(det(rev(X))) is reachable (by construction)
slide-27
SLIDE 27
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Repeating everything, now for reach(det(rev(X)))

x, y, z a, b

  • y, z

b

  • a

a, b

  • s

b

  • a

t

b

  • a
  • . . . gives us reach(det(rev(reach(det(rev(X))))))
  • which is (reachable and) minimal and accepts {a, b}∗ a.
slide-28
SLIDE 28
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Repeating everything, now for reach(det(rev(X)))

x, y, z a, b

  • y, z

b

  • a

a, b

  • s

b

  • a

t

b

  • a
  • . . . gives us reach(det(rev(reach(det(rev(X))))))
  • which is (reachable and) minimal and accepts {a, b}∗ a.
slide-29
SLIDE 29
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Repeating everything, now for reach(det(rev(X)))

x, y, z a, b

  • y, z

b

  • a

a, b

  • s

b

  • a

t

b

  • a
  • . . . gives us reach(det(rev(reach(det(rev(X))))))
  • which is (reachable and) minimal and accepts {a, b}∗ a.
slide-30
SLIDE 30
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Repeating everything, now for reach(det(rev(X)))

x, y, z a, b

  • y, z

b

  • a

a, b

  • s

b

  • a

t

b

  • a
  • . . . gives us reach(det(rev(reach(det(rev(X))))))
  • which is (reachable and) minimal and accepts {a, b}∗ a.
slide-31
SLIDE 31
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

All in all: Brzozowski’s algorithm

x

b

  • a

z

b

  • a
  • y

b

  • a
  • s

b

  • a

t

b

  • a
  • X is reachable and accepts {a, b}∗ a
  • reach(det(rev(reach(det(rev(X)))))) also accepts {a, b}∗ a
  • . . . and is minimal!!
slide-32
SLIDE 32
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

All in all: Brzozowski’s algorithm

x

b

  • a

z

b

  • a
  • y

b

  • a
  • s

b

  • a

t

b

  • a
  • X is reachable and accepts {a, b}∗ a
  • reach(det(rev(reach(det(rev(X)))))) also accepts {a, b}∗ a
  • . . . and is minimal!!
slide-33
SLIDE 33
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

All in all: Brzozowski’s algorithm

x

b

  • a

z

b

  • a
  • y

b

  • a
  • s

b

  • a

t

b

  • a
  • X is reachable and accepts {a, b}∗ a
  • reach(det(rev(reach(det(rev(X)))))) also accepts {a, b}∗ a
  • . . . and is minimal!!
slide-34
SLIDE 34
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

All in all: Brzozowski’s algorithm

x

b

  • a

z

b

  • a
  • y

b

  • a
  • s

b

  • a

t

b

  • a
  • X is reachable and accepts {a, b}∗ a
  • reach(det(rev(reach(det(rev(X)))))) also accepts {a, b}∗ a
  • . . . and is minimal!!
slide-35
SLIDE 35
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

All in all: Brzozowski’s algorithm

x

b

  • a

z

b

  • a
  • y

b

  • a
  • s

b

  • a

t

b

  • a
  • X is reachable and accepts {a, b}∗ a
  • reach(det(rev(reach(det(rev(X)))))) also accepts {a, b}∗ a
  • . . . and is minimal!!
slide-36
SLIDE 36
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions
  • 2. (Co)algebra

algebras: F(X) f

  • X

coalgebras: X f

  • F(X)
slide-37
SLIDE 37
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Examples of algebras

N × N +

  • N

1 + N [0, S]

  • N

≡ 1

  • N

S

  • N

≡ 1

  • N

S

  • N
slide-38
SLIDE 38
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Examples of algebras

N × N +

  • N

1 + N [0, S]

  • N

≡ 1

  • N

S

  • N

≡ 1

  • N

S

  • N
slide-39
SLIDE 39
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Examples of coalgebras

X t

  • P(A × X)

x a

y

⇐ ⇒ a, y ∈ t(x) X Left, label, Right

  • X × A × X
slide-40
SLIDE 40
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Examples of coalgebras

X t

  • P(A × X)

x a

y

⇐ ⇒ a, y ∈ t(x) X Left, label, Right

  • X × A × X
slide-41
SLIDE 41
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Examples of coalgebras

2ω head, tail

  • 2 × 2ω

≡ 2ω head

  • tail
  • 2

2ω ≡ 2 2ω head

  • tail

head((b0, b1, b2, . . .)) = b0 tail((b0, b1, b2, . . .)) = (b1, b2, b3 . . .)

slide-42
SLIDE 42
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Homomorphisms

F(X) f

  • F(h) F(Y)

g

  • X

h

Y

X f

  • h

Y

g

  • F(X)

F(h)

F(Y)

slide-43
SLIDE 43
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Homomorphisms

F(X) f

  • F(h) F(Y)

g

  • X

h

Y

X f

  • h

Y

g

  • F(X)

F(h)

F(Y)

slide-44
SLIDE 44
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Initiality, finality

F(A) α

  • F(h) F(X)

f

  • A

∃ ! h

X

X f

  • ∃ ! h

Z

β

  • F(X)

F(h)

F(Z)

  • initial algebras ⇐

⇒ induction

  • final coalgebras ⇐

⇒ coinduction

slide-45
SLIDE 45
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Initiality, finality

F(A) α

  • F(h) F(X)

f

  • A

∃ ! h

X

X f

  • ∃ ! h

Z

β

  • F(X)

F(h)

F(Z)

  • initial algebras ⇐

⇒ induction

  • final coalgebras ⇐

⇒ coinduction

slide-46
SLIDE 46
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Initiality, finality

F(A) α

  • F(h) F(X)

f

  • A

∃ ! h

X

X f

  • ∃ ! h

Z

β

  • F(X)

F(h)

F(Z)

  • initial algebras ⇐

⇒ induction

  • final coalgebras ⇐

⇒ coinduction

slide-47
SLIDE 47
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions
  • 3. Automata, (co)algebraically
  • Automata are complicated structures:

part of them is algebra - part of them is coalgebra

  • ( . . . in two different ways . . . )
slide-48
SLIDE 48
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions
  • 3. Automata, (co)algebraically
  • Automata are complicated structures:

part of them is algebra - part of them is coalgebra

  • ( . . . in two different ways . . . )
slide-49
SLIDE 49
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

A deterministic automaton

1 i

  • 2

X f

  • t
  • X A

where 1 = {0} 2 = {0, 1} X A = { g | g : A → X } x a

y

⇐ ⇒ t(x)(a) = y i(0) ∈ X is the initial state x is final (or accepting) ⇐ ⇒ f(x) = 1

slide-50
SLIDE 50
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

A deterministic automaton

1 i

  • 2

X f

  • t
  • X A

where 1 = {0} 2 = {0, 1} X A = { g | g : A → X } x a

y

⇐ ⇒ t(x)(a) = y i(0) ∈ X is the initial state x is final (or accepting) ⇐ ⇒ f(x) = 1

slide-51
SLIDE 51
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Automata: algebra or coalgebra?

  • initial state: algebraic – final states: coalgebraic

1 i

  • 2

X f

  • transition function: both algebraic and coalgebraic

X t

X A

X

(A X)

X × A t

X

slide-52
SLIDE 52
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Automata: algebra or coalgebra?

  • initial state: algebraic – final states: coalgebraic

1 i

  • 2

X f

  • transition function: both algebraic and coalgebraic

X t

X A

X

(A X)

X × A t

X

slide-53
SLIDE 53
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Automata: algebra and coalgebra!

1 ǫ

  • i
  • 2

A∗ r

  • α
  • X

f

  • t
  • 2A∗

β

  • ǫ?
  • (A∗)A

r A

X A

  • A

(2A∗)A

To take home: this picture!! . . . which we’ll explain next . . .

slide-54
SLIDE 54
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Automata: algebra and coalgebra!

1 ǫ

  • i
  • 2

A∗ r

  • α
  • X

f

  • t
  • 2A∗

β

  • ǫ?
  • (A∗)A

r A

X A

  • A

(2A∗)A

To take home: this picture!! . . . which we’ll explain next . . .

slide-55
SLIDE 55
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Automata: algebra and coalgebra!

1 ǫ

  • i
  • 2

A∗ r

  • α
  • X

f

  • t
  • 2A∗

β

  • ǫ?
  • (A∗)A

r A

X A

  • A

(2A∗)A

To take home: this picture!! . . . which we’ll explain next . . .

slide-56
SLIDE 56
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

The “automaton” of languages

2 2A∗ β

  • ǫ?
  • (2A∗)A

ǫ?(L) = 1 ⇐ ⇒ ǫ ∈ L 2A∗ = {g | g : A∗ → 2} ∼ = {L | L ⊆ A∗} β(L)(a) = La = {w ∈ A∗ | a · w ∈ L}

  • We say “automaton”: it does not have an initial state.
slide-57
SLIDE 57
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

The “automaton” of languages

2 2A∗ β

  • ǫ?
  • (2A∗)A

ǫ?(L) = 1 ⇐ ⇒ ǫ ∈ L 2A∗ = {g | g : A∗ → 2} ∼ = {L | L ⊆ A∗} β(L)(a) = La = {w ∈ A∗ | a · w ∈ L}

  • We say “automaton”: it does not have an initial state.
slide-58
SLIDE 58
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

The automaton of languages

  • transitions: L

a

La where

La = {w ∈ A∗ | a · w ∈ L}

  • for instance:

{ab} b

  • a

{b}

a

  • b

{ǫ}

a, b

a, b

  • a∗ b {a, b}∗

b

  • a
  • {a, b}∗

a, b

  • note: every state L accepts . . . . . . the language L !!
slide-59
SLIDE 59
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

The automaton of languages

  • transitions: L

a

La where

La = {w ∈ A∗ | a · w ∈ L}

  • for instance:

{ab} b

  • a

{b}

a

  • b

{ǫ}

a, b

a, b

  • a∗ b {a, b}∗

b

  • a
  • {a, b}∗

a, b

  • note: every state L accepts . . . . . . the language L !!
slide-60
SLIDE 60
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

The automaton of languages

  • transitions: L

a

La where

La = {w ∈ A∗ | a · w ∈ L}

  • for instance:

{ab} b

  • a

{b}

a

  • b

{ǫ}

a, b

a, b

  • a∗ b {a, b}∗

b

  • a
  • {a, b}∗

a, b

  • note: every state L accepts . . . . . . the language L !!
slide-61
SLIDE 61
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

The automaton of languages

  • transitions: L

a

La where

La = {w ∈ A∗ | a · w ∈ L}

  • for instance:

{ab} b

  • a

{b}

a

  • b

{ǫ}

a, b

a, b

  • a∗ b {a, b}∗

b

  • a
  • {a, b}∗

a, b

  • note: every state L accepts . . . . . . the language L !!
slide-62
SLIDE 62
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

The automaton of languages is . . . final

2 X f

  • t
  • ∃! o

2A∗

β

  • ǫ?
  • X A
  • A

(2A∗)A

  • (x)

= {w ∈ A∗ | f(xw) = 1} = the language accepted by x where: xw is the state reached after inputting the word w, and: oA(g) = o ◦ g, all g ∈ X A.

slide-63
SLIDE 63
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

The automaton of languages is . . . final

2 X f

  • t
  • ∃! o

2A∗

β

  • ǫ?
  • X A
  • A

(2A∗)A

  • (x)

= {w ∈ A∗ | f(xw) = 1} = the language accepted by x where: xw is the state reached after inputting the word w, and: oA(g) = o ◦ g, all g ∈ X A.

slide-64
SLIDE 64
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

An aside: a proof by coinduction

Question: a∗ b {a, b}∗ = {a, b}∗ b a∗ ?? Answer: consider a∗ b {a, b}∗ b

  • a
  • {a, b}∗

a, b

  • {a, b}∗ b a∗

b

  • a
  • {a, b}∗ b a∗ + a∗

a, b

  • and conclude: yes, since the relation

R = { a∗ b {a, b}∗, {a, b}∗ b a∗ , {a, b}∗, {a, b}∗ b a∗+a∗ } is a (language!) bisimulation.

slide-65
SLIDE 65
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

An aside: a proof by coinduction

Question: a∗ b {a, b}∗ = {a, b}∗ b a∗ ?? Answer: consider a∗ b {a, b}∗ b

  • a
  • {a, b}∗

a, b

  • {a, b}∗ b a∗

b

  • a
  • {a, b}∗ b a∗ + a∗

a, b

  • and conclude: yes, since the relation

R = { a∗ b {a, b}∗, {a, b}∗ b a∗ , {a, b}∗, {a, b}∗ b a∗+a∗ } is a (language!) bisimulation.

slide-66
SLIDE 66
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

An aside: a proof by coinduction

Question: a∗ b {a, b}∗ = {a, b}∗ b a∗ ?? Answer: consider a∗ b {a, b}∗ b

  • a
  • {a, b}∗

a, b

  • {a, b}∗ b a∗

b

  • a
  • {a, b}∗ b a∗ + a∗

a, b

  • and conclude: yes, since the relation

R = { a∗ b {a, b}∗, {a, b}∗ b a∗ , {a, b}∗, {a, b}∗ b a∗+a∗ } is a (language!) bisimulation.

slide-67
SLIDE 67
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

An aside: a proof by coinduction

Question: a∗ b {a, b}∗ = {a, b}∗ b a∗ ?? Answer: consider a∗ b {a, b}∗ b

  • a
  • {a, b}∗

a, b

  • {a, b}∗ b a∗

b

  • a
  • {a, b}∗ b a∗ + a∗

a, b

  • and conclude: yes, since the relation

R = { a∗ b {a, b}∗, {a, b}∗ b a∗ , {a, b}∗, {a, b}∗ b a∗+a∗ } is a (language!) bisimulation.

slide-68
SLIDE 68
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Back to today’s picture

1 ǫ

  • i
  • 2

A∗ r

  • α
  • X

f

  • t
  • 2A∗

β

  • ǫ?
  • (A∗)A

r A

X A

  • A

(2A∗)A

On the right: final coalgebra On the left: initial algebra . . .

slide-69
SLIDE 69
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Back to today’s picture

1 ǫ

  • i
  • 2

A∗ r

  • α
  • X

f

  • t
  • 2A∗

β

  • ǫ?
  • (A∗)A

r A

X A

  • A

(2A∗)A

On the right: final coalgebra On the left: initial algebra . . .

slide-70
SLIDE 70
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Back to today’s picture

1 ǫ

  • i
  • 2

A∗ r

  • α
  • X

f

  • t
  • 2A∗

β

  • ǫ?
  • (A∗)A

r A

X A

  • A

(2A∗)A

On the right: final coalgebra On the left: initial algebra . . .

slide-71
SLIDE 71
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

The “automaton” of words

1 ǫ

  • A∗

α

  • (A∗)A

ǫ is initial state α(w)(a) = w · a that is, transitions: w a

w · a

slide-72
SLIDE 72
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

The automaton of words is . . . initial

1 ǫ

  • i
  • A∗

∃! r

  • α
  • X

t

  • (A∗)A

r A

X A

i ∈ X = initial state (to be precise: i(0)) r(w) = iw = the state reached from i after inputting w

  • Proof: easy exercise.
  • Proof: formally, because A∗ is an initial 1 + A × (−)-algebra!
slide-73
SLIDE 73
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions
  • 4. Duality
  • Reachability and observability are dual:

Arbib and Manes, 1975.

  • (here observable = minimal)
slide-74
SLIDE 74
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Reachability and observability

1 ǫ

  • i
  • 2

A∗ r

  • α
  • X

f

  • t
  • 2A∗

β

  • ǫ?
  • (A∗)A

r A

X A

  • A

(2A∗)A

r(w) = state reached

  • n input w
  • (x)

= language accepted by x

  • We call X reachable if r is surjective.
  • We call X observable (= minimal) if o is injective.
slide-75
SLIDE 75
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Reachability and observability

1 ǫ

  • i
  • 2

A∗ r

  • α
  • X

f

  • t
  • 2A∗

β

  • ǫ?
  • (A∗)A

r A

X A

  • A

(2A∗)A

r(w) = state reached

  • n input w
  • (x)

= language accepted by x

  • We call X reachable if r is surjective.
  • We call X observable (= minimal) if o is injective.
slide-76
SLIDE 76
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Reachability and observability

1 ǫ

  • i
  • 2

A∗ r

  • α
  • X

f

  • t
  • 2A∗

β

  • ǫ?
  • (A∗)A

r A

X A

  • A

(2A∗)A

r(w) = state reached

  • n input w
  • (x)

= language accepted by x

  • We call X reachable if r is surjective.
  • We call X observable (= minimal) if o is injective.
slide-77
SLIDE 77
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Reachability and observability

1 ǫ

  • i
  • 2

A∗ r

  • α
  • X

f

  • t
  • 2A∗

β

  • ǫ?
  • (A∗)A

r A

X A

  • A

(2A∗)A

r(w) = state reached

  • n input w
  • (x)

= language accepted by x

  • We call X reachable if r is surjective.
  • We call X observable (= minimal) if o is injective.
slide-78
SLIDE 78
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions
  • 5. Reversing the automaton
  • Reachability ⇐

⇒ observability

  • Being precise about homomorphisms is crucial.
  • Forms the basis for proof Brzozowski’s algorithm.
slide-79
SLIDE 79
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Powerset construction

V g

  • 2V

2(−) : → W 2W 2g

  • where 2V = {S | S ⊆ V} and, for all S ⊆ W,

2g(S) = g−1(S) ( = {v ∈ V | g(v) ∈ S} )

  • This construction is contravariant !!
  • Note: if g is surjective, then 2g is injective.
slide-80
SLIDE 80
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Powerset construction

V g

  • 2V

2(−) : → W 2W 2g

  • where 2V = {S | S ⊆ V} and, for all S ⊆ W,

2g(S) = g−1(S) ( = {v ∈ V | g(v) ∈ S} )

  • This construction is contravariant !!
  • Note: if g is surjective, then 2g is injective.
slide-81
SLIDE 81
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Powerset construction

V g

  • 2V

2(−) : → W 2W 2g

  • where 2V = {S | S ⊆ V} and, for all S ⊆ W,

2g(S) = g−1(S) ( = {v ∈ V | g(v) ∈ S} )

  • This construction is contravariant !!
  • Note: if g is surjective, then 2g is injective.
slide-82
SLIDE 82
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Powerset construction

V g

  • 2V

2(−) : → W 2W 2g

  • where 2V = {S | S ⊆ V} and, for all S ⊆ W,

2g(S) = g−1(S) ( = {v ∈ V | g(v) ∈ S} )

  • This construction is contravariant !!
  • Note: if g is surjective, then 2g is injective.
slide-83
SLIDE 83
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Reversing transitions

X t X A X × A

  • X

✤ 2(−)

2X×A 2X

  • (2X)A

2X

  • 2X

2t

  • (2X)A
slide-84
SLIDE 84
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Reversing transitions

X t X A X × A

  • X

✤ 2(−)

2X×A 2X

  • (2X)A

2X

  • 2X

2t

  • (2X)A
slide-85
SLIDE 85
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Reversing transitions

X t X A X × A

  • X

✤ 2(−)

2X×A 2X

  • (2X)A

2X

  • 2X

2t

  • (2X)A
slide-86
SLIDE 86
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Reversing transitions

X t X A X × A

  • X

✤ 2(−)

2X×A 2X

  • (2X)A

2X

  • 2X

2t

  • (2X)A
slide-87
SLIDE 87
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Reversing transitions

X t X A X × A

  • X

✤ 2(−)

2X×A 2X

  • (2X)A

2X

  • 2X

2t

  • (2X)A
slide-88
SLIDE 88
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Initial ⇐ ⇒ final

1 i

  • X

✤ 2(−)

2 2X 2i

  • 2

X f

  • 1

f

  • 2X
slide-89
SLIDE 89
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Initial ⇐ ⇒ final

1 i

  • X

✤ 2(−)

2 2X 2i

  • 2

X f

  • 1

f

  • 2X
slide-90
SLIDE 90
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Initial ⇐ ⇒ final

1 i

  • X

✤ 2(−)

2 2X 2i

  • 2

X f

  • 1

f

  • 2X
slide-91
SLIDE 91
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Initial ⇐ ⇒ final

1 i

  • X

✤ 2(−)

2 2X 2i

  • 2

X f

  • 1

f

  • 2X
slide-92
SLIDE 92
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Reversing the entire automaton

1 i

  • 2

X f

  • t
  • X A

✤ 2(−)

1 f

  • 2

2X 2i

  • 2t
  • (2X)A
  • Initial and final are exchanged . . .
  • transitions are reversed . . .
  • and the result is again deterministic!
slide-93
SLIDE 93
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Reversing the entire automaton

1 i

  • 2

X f

  • t
  • X A

✤ 2(−)

1 f

  • 2

2X 2i

  • 2t
  • (2X)A
  • Initial and final are exchanged . . .
  • transitions are reversed . . .
  • and the result is again deterministic!
slide-94
SLIDE 94
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Reversing the entire automaton

1 i

  • 2

X f

  • t
  • X A

✤ 2(−)

1 f

  • 2

2X 2i

  • 2t
  • (2X)A
  • Initial and final are exchanged . . .
  • transitions are reversed . . .
  • and the result is again deterministic!
slide-95
SLIDE 95
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Reversing the entire automaton

1 i

  • 2

X f

  • t
  • X A

✤ 2(−)

1 f

  • 2

2X 2i

  • 2t
  • (2X)A
  • Initial and final are exchanged . . .
  • transitions are reversed . . .
  • and the result is again deterministic!
slide-96
SLIDE 96
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Reversing the entire automaton

1 i

  • 2

X f

  • t
  • X A

✤ 2(−)

1 f

  • 2

2X 2i

  • 2t
  • (2X)A
  • Initial and final are exchanged . . .
  • transitions are reversed . . .
  • and the result is again deterministic!
slide-97
SLIDE 97
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Our previous example

X =

x

b

  • a

z

b

  • a
  • y

b

  • a
  • 2X =

x, y a b x, y, z a, b

  • x, z

b

  • a
  • y, z

b

  • a
  • x

b

  • a
  • y

b

  • a

a, b

  • z

b

  • a
  • Note that X has been reversed and determinized:

2X = det(rev(X))

slide-98
SLIDE 98
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Our previous example

X =

x

b

  • a

z

b

  • a
  • y

b

  • a
  • 2X =

x, y a b x, y, z a, b

  • x, z

b

  • a
  • y, z

b

  • a
  • x

b

  • a
  • y

b

  • a

a, b

  • z

b

  • a
  • Note that X has been reversed and determinized:

2X = det(rev(X))

slide-99
SLIDE 99
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Our previous example

X =

x

b

  • a

z

b

  • a
  • y

b

  • a
  • 2X =

x, y a b x, y, z a, b

  • x, z

b

  • a
  • y, z

b

  • a
  • x

b

  • a
  • y

b

  • a

a, b

  • z

b

  • a
  • Note that X has been reversed and determinized:

2X = det(rev(X))

slide-100
SLIDE 100
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Proving today’s Theorem

If: a deterministic automaton X is reachable and accepts L(X) then: 2X ( = det(rev(X)) ) is minimal/observable and L( 2X ) = reverse( L(X) )

slide-101
SLIDE 101
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Proving today’s Theorem

If: a deterministic automaton X is reachable and accepts L(X) then: 2X ( = det(rev(X)) ) is minimal/observable and L( 2X ) = reverse( L(X) )

slide-102
SLIDE 102
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Proof: by reversing A∗ r

X

1 ǫ

  • i
  • A∗

r

  • α
  • X

t

  • (A∗)A

X A ✤ 2(−)

2 2X 2i

  • 2t
  • 2r

2A∗

  • (2X)A

(2A∗)A

  • X becomes 2X
  • initial automaton A∗ becomes (almost) final automaton 2A∗
  • r is surjective

⇒ 2r is injective

slide-103
SLIDE 103
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Proof: by reversing A∗ r

X

1 ǫ

  • i
  • A∗

r

  • α
  • X

t

  • (A∗)A

X A ✤ 2(−)

2 2X 2i

  • 2t
  • 2r

2A∗

  • (2X)A

(2A∗)A

  • X becomes 2X
  • initial automaton A∗ becomes (almost) final automaton 2A∗
  • r is surjective

⇒ 2r is injective

slide-104
SLIDE 104
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Proof: by reversing A∗ r

X

1 ǫ

  • i
  • A∗

r

  • α
  • X

t

  • (A∗)A

X A ✤ 2(−)

2 2X 2i

  • 2t
  • 2r

2A∗

  • (2X)A

(2A∗)A

  • X becomes 2X
  • initial automaton A∗ becomes (almost) final automaton 2A∗
  • r is surjective

⇒ 2r is injective

slide-105
SLIDE 105
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Proof: by reversing A∗ r

X

1 ǫ

  • i
  • A∗

r

  • α
  • X

t

  • (A∗)A

X A ✤ 2(−)

2 2X 2i

  • 2t
  • 2r

2A∗

  • (2X)A

(2A∗)A

  • X becomes 2X
  • initial automaton A∗ becomes (almost) final automaton 2A∗
  • r is surjective

⇒ 2r is injective

slide-106
SLIDE 106
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Proof: by reversing A∗ r

X

1 ǫ

  • i
  • A∗

r

  • α
  • X

t

  • (A∗)A

X A ✤ 2(−)

2 2X 2i

  • 2t
  • 2r

2A∗

  • (2X)A

(2A∗)A

  • X becomes 2X
  • initial automaton A∗ becomes (almost) final automaton 2A∗
  • r is surjective

⇒ 2r is injective

slide-107
SLIDE 107
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Reachable becomes observable

1 ǫ

  • i
  • A∗

r

  • α
  • X

t

  • (A∗)A

X A ✤ 2(−)

2 2X 2i

  • 2t
  • 2r

2A∗

  • rev

2A∗

β

  • ǫ?
  • (2X)A

(2A∗)A (2A∗)A

  • If r is surjective then (2r and hence) rev ◦ 2r is injective.
  • That is, 2X is observable (= minimal).
slide-108
SLIDE 108
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Reachable becomes observable

1 ǫ

  • i
  • A∗

r

  • α
  • X

t

  • (A∗)A

X A ✤ 2(−)

2 2X 2i

  • 2t
  • 2r

2A∗

  • rev

2A∗

β

  • ǫ?
  • (2X)A

(2A∗)A (2A∗)A

  • If r is surjective then (2r and hence) rev ◦ 2r is injective.
  • That is, 2X is observable (= minimal).
slide-109
SLIDE 109
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Reachable becomes observable

1 ǫ

  • i
  • A∗

r

  • α
  • X

t

  • (A∗)A

X A ✤ 2(−)

2 2X 2i

  • 2t
  • 2r

2A∗

  • rev

2A∗

β

  • ǫ?
  • (2X)A

(2A∗)A (2A∗)A

  • If r is surjective then (2r and hence) rev ◦ 2r is injective.
  • That is, 2X is observable (= minimal).
slide-110
SLIDE 110
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Reachable becomes observable

1 ǫ

  • i
  • A∗

r

  • α
  • X

t

  • (A∗)A

X A ✤ 2(−)

2 2X 2i

  • 2t
  • 2r

2A∗

  • rev

2A∗

β

  • ǫ?
  • (2X)A

(2A∗)A (2A∗)A

  • If r is surjective then (2r and hence) rev ◦ 2r is injective.
  • That is, 2X is observable (= minimal).
slide-111
SLIDE 111
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Summarizing

1 ǫ

  • i
  • 2

A∗ r

  • α
  • X

f

  • t
  • (A∗)A

X A

1 f

  • 2

2X 2i

  • 2t
  • rev ◦ 2r 2A∗

β

  • ǫ?
  • (2X)A

(2A∗)A

  • If: X is reachable, i.e., r is surjective

then: rev ◦ 2r is injective, i.e., 2X is observable = minimal.

  • And: rev(2r(f)) = rev(o(i)), i.e., L( 2X ) = reverse( L(X) )
slide-112
SLIDE 112
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Summarizing

1 ǫ

  • i
  • 2

A∗ r

  • α
  • X

f

  • t
  • (A∗)A

X A

1 f

  • 2

2X 2i

  • 2t
  • rev ◦ 2r 2A∗

β

  • ǫ?
  • (2X)A

(2A∗)A

  • If: X is reachable, i.e., r is surjective

then: rev ◦ 2r is injective, i.e., 2X is observable = minimal.

  • And: rev(2r(f)) = rev(o(i)), i.e., L( 2X ) = reverse( L(X) )
slide-113
SLIDE 113
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Summarizing

1 ǫ

  • i
  • 2

A∗ r

  • α
  • X

f

  • t
  • (A∗)A

X A

1 f

  • 2

2X 2i

  • 2t
  • rev ◦ 2r 2A∗

β

  • ǫ?
  • (2X)A

(2A∗)A

  • If: X is reachable, i.e., r is surjective

then: rev ◦ 2r is injective, i.e., 2X is observable = minimal.

  • And: rev(2r(f)) = rev(o(i)), i.e., L( 2X ) = reverse( L(X) )
slide-114
SLIDE 114
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Summarizing

1 ǫ

  • i
  • 2

A∗ r

  • α
  • X

f

  • t
  • (A∗)A

X A

1 f

  • 2

2X 2i

  • 2t
  • rev ◦ 2r 2A∗

β

  • ǫ?
  • (2X)A

(2A∗)A

  • If: X is reachable, i.e., r is surjective

then: rev ◦ 2r is injective, i.e., 2X is observable = minimal.

  • And: rev(2r(f)) = rev(o(i)), i.e., L( 2X ) = reverse( L(X) )
slide-115
SLIDE 115
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Summarizing

1 ǫ

  • i
  • 2

A∗ r

  • α
  • X

f

  • t
  • (A∗)A

X A

1 f

  • 2

2X 2i

  • 2t
  • rev ◦ 2r 2A∗

β

  • ǫ?
  • (2X)A

(2A∗)A

  • If: X is reachable, i.e., r is surjective

then: rev ◦ 2r is injective, i.e., 2X is observable = minimal.

  • And: rev(2r(f)) = rev(o(i)), i.e., L( 2X ) = reverse( L(X) )
slide-116
SLIDE 116
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Corollary: Brzozowski’s algorithm

  • X becomes 2X, accepting reverse(L(X))
  • take reachable part: Y = reachable(2X)
  • Y becomes 2Y, which is minimal and accepts

reverse(reverse(L(X))) = L(X)

slide-117
SLIDE 117
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Corollary: Brzozowski’s algorithm

  • X becomes 2X, accepting reverse(L(X))
  • take reachable part: Y = reachable(2X)
  • Y becomes 2Y, which is minimal and accepts

reverse(reverse(L(X))) = L(X)

slide-118
SLIDE 118
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Corollary: Brzozowski’s algorithm

  • X becomes 2X, accepting reverse(L(X))
  • take reachable part: Y = reachable(2X)
  • Y becomes 2Y, which is minimal and accepts

reverse(reverse(L(X))) = L(X)

slide-119
SLIDE 119
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions
  • 6. Conclusions

1 ǫ

  • i
  • 2

A∗ r

  • α
  • X

f

  • t
  • 2A∗

β

  • ǫ?
  • (A∗)A

r A

X A

  • A

(2A∗)A

slide-120
SLIDE 120
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions
  • 6. Conclusions

1 ǫ

  • i
  • 2

A∗ r

  • α
  • X

f

  • t
  • 2A∗

β

  • ǫ?
  • (A∗)A

r A

X A

  • A

(2A∗)A

slide-121
SLIDE 121
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Generalizations

1 ǫ

  • i
  • 2

A∗ r

  • α
  • X

f

  • t
  • 2A∗

β

  • ǫ?
  • (A∗)A

r A

X A

  • A

(2A∗)A

1 ǫ

  • i
  • B

A∗ r

  • α
  • X

f

  • t
  • BA∗
  • (A∗)A

r A

X A

  • A

(BA∗)A

  • A Brzozowski minimization algorithm for Moore automata.
  • Non-deterministic and weighted automata: under way (with

Bonsangue et al).

  • Probabilistic systems: under investigation.
slide-122
SLIDE 122
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Generalizations

1 ǫ

  • i
  • 2

A∗ r

  • α
  • X

f

  • t
  • 2A∗

β

  • ǫ?
  • (A∗)A

r A

X A

  • A

(2A∗)A

1 ǫ

  • i
  • B

A∗ r

  • α
  • X

f

  • t
  • BA∗
  • (A∗)A

r A

X A

  • A

(BA∗)A

  • A Brzozowski minimization algorithm for Moore automata.
  • Non-deterministic and weighted automata: under way (with

Bonsangue et al).

  • Probabilistic systems: under investigation.
slide-123
SLIDE 123
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Generalizations

1 ǫ

  • i
  • 2

A∗ r

  • α
  • X

f

  • t
  • 2A∗

β

  • ǫ?
  • (A∗)A

r A

X A

  • A

(2A∗)A

1 ǫ

  • i
  • B

A∗ r

  • α
  • X

f

  • t
  • BA∗
  • (A∗)A

r A

X A

  • A

(BA∗)A

  • A Brzozowski minimization algorithm for Moore automata.
  • Non-deterministic and weighted automata: under way (with

Bonsangue et al).

  • Probabilistic systems: under investigation.
slide-124
SLIDE 124
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Generalizations

1 ǫ

  • i
  • 2

A∗ r

  • α
  • X

f

  • t
  • 2A∗

β

  • ǫ?
  • (A∗)A

r A

X A

  • A

(2A∗)A

1 ǫ

  • i
  • B

A∗ r

  • α
  • X

f

  • t
  • BA∗
  • (A∗)A

r A

X A

  • A

(BA∗)A

  • A Brzozowski minimization algorithm for Moore automata.
  • Non-deterministic and weighted automata: under way (with

Bonsangue et al).

  • Probabilistic systems: under investigation.
slide-125
SLIDE 125
  • 1. Example
  • 2. (Co)algebra
  • 3. Automata
  • 4. Duality
  • 5. Reversing
  • 6. Conclusions

Generalizations

1 ǫ

  • i
  • 2

A∗ r

  • α
  • X

f

  • t
  • 2A∗

β

  • ǫ?
  • (A∗)A

r A

X A

  • A

(2A∗)A

1 ǫ

  • i
  • B

A∗ r

  • α
  • X

f

  • t
  • BA∗
  • (A∗)A

r A

X A

  • A

(BA∗)A

  • A Brzozowski minimization algorithm for Moore automata.
  • Non-deterministic and weighted automata: under way (with

Bonsangue et al).

  • Probabilistic systems: under investigation.