Star height of regular languages Thomas Lang 14 July 2014 Overview - - PowerPoint PPT Presentation

star height of regular languages
SMART_READER_LITE
LIVE PREVIEW

Star height of regular languages Thomas Lang 14 July 2014 Overview - - PowerPoint PPT Presentation

Star height of regular languages Thomas Lang 14 July 2014 Overview Introduction 1 Star height 2 BMC algorithm 3 Loop complexity 4 Connection between star height and loop complexity 5 References 6 Thomas Lang Star height of regular


slide-1
SLIDE 1

Star height of regular languages

Thomas Lang 14 July 2014

slide-2
SLIDE 2

Overview

1

Introduction

2

Star height

3

BMC algorithm

4

Loop complexity

5

Connection between star height and loop complexity

6

References

Thomas Lang Star height of regular languages July 2014 2 / 29

slide-3
SLIDE 3

Overview

1

Introduction

2

Star height

3

BMC algorithm

4

Loop complexity

5

Connection between star height and loop complexity

6

References

Thomas Lang Star height of regular languages July 2014 3 / 29

slide-4
SLIDE 4

Motivation

Thomas Lang Star height of regular languages July 2014 4 / 29

slide-5
SLIDE 5

Motivation

Let L1, L2 be regular languages.

Thomas Lang Star height of regular languages July 2014 4 / 29

slide-6
SLIDE 6

Motivation

Let L1, L2 be regular languages. Aim: Give meaning to the statement L1 is more complicated than L2.

Thomas Lang Star height of regular languages July 2014 4 / 29

slide-7
SLIDE 7

Motivation

Let L1, L2 be regular languages. Aim: Give meaning to the statement L1 is more complicated than L2. Attempt 1: L1 is more complicated than L2 if |L1| > |L2|

Thomas Lang Star height of regular languages July 2014 4 / 29

slide-8
SLIDE 8

Motivation

Let L1, L2 be regular languages. Aim: Give meaning to the statement L1 is more complicated than L2. Attempt 1: L1 is more complicated than L2 if |L1| > |L2|

◮ Problem: Infinite languages not comparable Thomas Lang Star height of regular languages July 2014 4 / 29

slide-9
SLIDE 9

Motivation

Let L1, L2 be regular languages. Aim: Give meaning to the statement L1 is more complicated than L2. Attempt 1: L1 is more complicated than L2 if |L1| > |L2|

◮ Problem: Infinite languages not comparable

Attempt 2: L1 is more complicated than L2 if the minimal automaton

  • f L1 has more states than the minimal automaton of L2

Thomas Lang Star height of regular languages July 2014 4 / 29

slide-10
SLIDE 10

Motivation

Let L1, L2 be regular languages. Aim: Give meaning to the statement L1 is more complicated than L2. Attempt 1: L1 is more complicated than L2 if |L1| > |L2|

◮ Problem: Infinite languages not comparable

Attempt 2: L1 is more complicated than L2 if the minimal automaton

  • f L1 has more states than the minimal automaton of L2

◮ Problem: {a1000} more complicated than {an|n ∈ N0} Thomas Lang Star height of regular languages July 2014 4 / 29

slide-11
SLIDE 11

Overview

1

Introduction

2

Star height

3

BMC algorithm

4

Loop complexity

5

Connection between star height and loop complexity

6

References

Thomas Lang Star height of regular languages July 2014 5 / 29

slide-12
SLIDE 12

Regular expressions

Let A be an alphabet, then we have:

Thomas Lang Star height of regular languages July 2014 6 / 29

slide-13
SLIDE 13

Regular expressions

Let A be an alphabet, then we have: ∅, ε and a ∈ A are regular expressions.

Thomas Lang Star height of regular languages July 2014 6 / 29

slide-14
SLIDE 14

Regular expressions

Let A be an alphabet, then we have: ∅, ε and a ∈ A are regular expressions. If e and e′ are regular expressions, then

Thomas Lang Star height of regular languages July 2014 6 / 29

slide-15
SLIDE 15

Regular expressions

Let A be an alphabet, then we have: ∅, ε and a ∈ A are regular expressions. If e and e′ are regular expressions, then

◮ (e + e′), Thomas Lang Star height of regular languages July 2014 6 / 29

slide-16
SLIDE 16

Regular expressions

Let A be an alphabet, then we have: ∅, ε and a ∈ A are regular expressions. If e and e′ are regular expressions, then

◮ (e + e′), ◮ (e · e′), Thomas Lang Star height of regular languages July 2014 6 / 29

slide-17
SLIDE 17

Regular expressions

Let A be an alphabet, then we have: ∅, ε and a ∈ A are regular expressions. If e and e′ are regular expressions, then

◮ (e + e′), ◮ (e · e′), ◮ e∗

are regular expressions.

Thomas Lang Star height of regular languages July 2014 6 / 29

slide-18
SLIDE 18

Regular expressions

Let A be an alphabet, then we have: ∅, ε and a ∈ A are regular expressions. If e and e′ are regular expressions, then

◮ (e + e′), ◮ (e · e′), ◮ e∗

are regular expressions. The language described by a regular expression e is denoted by L(e).

Thomas Lang Star height of regular languages July 2014 6 / 29

slide-19
SLIDE 19

Star height of regular expressions

Thomas Lang Star height of regular languages July 2014 7 / 29

slide-20
SLIDE 20

Star height of regular expressions

Let e be a regular expression over an alphabet A, then its star height is defined as

Thomas Lang Star height of regular languages July 2014 7 / 29

slide-21
SLIDE 21

Star height of regular expressions

Let e be a regular expression over an alphabet A, then its star height is defined as If e = ∅, e = ε or e = a ∈ A, then

Thomas Lang Star height of regular languages July 2014 7 / 29

slide-22
SLIDE 22

Star height of regular expressions

Let e be a regular expression over an alphabet A, then its star height is defined as If e = ∅, e = ε or e = a ∈ A, then h(e) := 0.

Thomas Lang Star height of regular languages July 2014 7 / 29

slide-23
SLIDE 23

Star height of regular expressions

Let e be a regular expression over an alphabet A, then its star height is defined as If e = ∅, e = ε or e = a ∈ A, then h(e) := 0. If e = e′ + e′′ or e = e′ · e′′, then

Thomas Lang Star height of regular languages July 2014 7 / 29

slide-24
SLIDE 24

Star height of regular expressions

Let e be a regular expression over an alphabet A, then its star height is defined as If e = ∅, e = ε or e = a ∈ A, then h(e) := 0. If e = e′ + e′′ or e = e′ · e′′, then h(e) := max(h(e′), h(e′′)).

Thomas Lang Star height of regular languages July 2014 7 / 29

slide-25
SLIDE 25

Star height of regular expressions

Let e be a regular expression over an alphabet A, then its star height is defined as If e = ∅, e = ε or e = a ∈ A, then h(e) := 0. If e = e′ + e′′ or e = e′ · e′′, then h(e) := max(h(e′), h(e′′)). If e = e′∗, then

Thomas Lang Star height of regular languages July 2014 7 / 29

slide-26
SLIDE 26

Star height of regular expressions

Let e be a regular expression over an alphabet A, then its star height is defined as If e = ∅, e = ε or e = a ∈ A, then h(e) := 0. If e = e′ + e′′ or e = e′ · e′′, then h(e) := max(h(e′), h(e′′)). If e = e′∗, then h(e) := 1 + h(e′).

Thomas Lang Star height of regular languages July 2014 7 / 29

slide-27
SLIDE 27

Examples

Thomas Lang Star height of regular languages July 2014 8 / 29

slide-28
SLIDE 28

Examples

e1 := a∗(ba∗)∗ ⇒ h(e1) =

Thomas Lang Star height of regular languages July 2014 8 / 29

slide-29
SLIDE 29

Examples

e1 := a∗(ba∗)∗ ⇒ h(e1) = 2

Thomas Lang Star height of regular languages July 2014 8 / 29

slide-30
SLIDE 30

Examples

e1 := a∗(ba∗)∗ ⇒ h(e1) = 2 e2 := a∗ + ((b∗ab∗)∗a)∗ ⇒ h(e2) =

Thomas Lang Star height of regular languages July 2014 8 / 29

slide-31
SLIDE 31

Examples

e1 := a∗(ba∗)∗ ⇒ h(e1) = 2 e2 := a∗ + ((b∗ab∗)∗a)∗ ⇒ h(e2) = 3

Thomas Lang Star height of regular languages July 2014 8 / 29

slide-32
SLIDE 32

Examples

e1 := a∗(ba∗)∗ ⇒ h(e1) = 2 e2 := a∗ + ((b∗ab∗)∗a)∗ ⇒ h(e2) = 3 Caution: L(a∗) = L((a∗)∗), but

Thomas Lang Star height of regular languages July 2014 8 / 29

slide-33
SLIDE 33

Examples

e1 := a∗(ba∗)∗ ⇒ h(e1) = 2 e2 := a∗ + ((b∗ab∗)∗a)∗ ⇒ h(e2) = 3 Caution: L(a∗) = L((a∗)∗), but h(a∗) = 1 = 2 = h((a∗)∗)

Thomas Lang Star height of regular languages July 2014 8 / 29

slide-34
SLIDE 34

Star height of regular languages

Thomas Lang Star height of regular languages July 2014 9 / 29

slide-35
SLIDE 35

Star height of regular languages

Let L be a regular language, then its star height is defined as

Thomas Lang Star height of regular languages July 2014 9 / 29

slide-36
SLIDE 36

Star height of regular languages

Let L be a regular language, then its star height is defined as h(L) := min({h(e) | L(e) = L}).

Thomas Lang Star height of regular languages July 2014 9 / 29

slide-37
SLIDE 37

Overview

1

Introduction

2

Star height

3

BMC algorithm

4

Loop complexity

5

Connection between star height and loop complexity

6

References

Thomas Lang Star height of regular languages July 2014 10 / 29

slide-38
SLIDE 38

Description

Thomas Lang Star height of regular languages July 2014 11 / 29

slide-39
SLIDE 39

Description

Brzozowski-McCluskey algorithm

Thomas Lang Star height of regular languages July 2014 11 / 29

slide-40
SLIDE 40

Description

Brzozowski-McCluskey algorithm Operates on generalized automaton A, i.e. an automaton whose edges are labeled with regular expressions

Thomas Lang Star height of regular languages July 2014 11 / 29

slide-41
SLIDE 41

Description

Brzozowski-McCluskey algorithm Operates on generalized automaton A, i.e. an automaton whose edges are labeled with regular expressions Computes regular expression e with L(e) = L(A)

Thomas Lang Star height of regular languages July 2014 11 / 29

slide-42
SLIDE 42

BMC algorithm

Thomas Lang Star height of regular languages July 2014 12 / 29

slide-43
SLIDE 43

BMC algorithm

1 Insert new state i and ε-transitions from i to all initial states Thomas Lang Star height of regular languages July 2014 12 / 29

slide-44
SLIDE 44

BMC algorithm

1 Insert new state i and ε-transitions from i to all initial states 2 Insert new state t and ε-transitions from all final states to t Thomas Lang Star height of regular languages July 2014 12 / 29

slide-45
SLIDE 45

BMC algorithm

1 Insert new state i and ε-transitions from i to all initial states 2 Insert new state t and ε-transitions from all final states to t 3 Successively remove the states of A, updating the edges in the

following manner:

Thomas Lang Star height of regular languages July 2014 12 / 29

slide-46
SLIDE 46

BMC algorithm

1 Insert new state i and ε-transitions from i to all initial states 2 Insert new state t and ε-transitions from all final states to t 3 Successively remove the states of A, updating the edges in the

following manner: A X B e1 e2 e3

Thomas Lang Star height of regular languages July 2014 12 / 29

slide-47
SLIDE 47

BMC algorithm

1 Insert new state i and ε-transitions from i to all initial states 2 Insert new state t and ε-transitions from all final states to t 3 Successively remove the states of A, updating the edges in the

following manner: A X B e1 e2 e3 A B e1e∗

2e3

Thomas Lang Star height of regular languages July 2014 12 / 29

slide-48
SLIDE 48

BMC algorithm

1 Insert new state i and ε-transitions from i to all initial states 2 Insert new state t and ε-transitions from all final states to t 3 Successively remove the states of A, updating the edges in the

following manner: A X B e1 e2 e3 A B e1e∗

2e3

4 Join all expressions on edges from i to t using ’+’ Thomas Lang Star height of regular languages July 2014 12 / 29

slide-49
SLIDE 49

Example

Thomas Lang Star height of regular languages July 2014 13 / 29

slide-50
SLIDE 50

Example

1 start 2 3 a b a

Thomas Lang Star height of regular languages July 2014 13 / 29

slide-51
SLIDE 51

Example

1 start 2 3 a b a i start X 2 3 t ε a b a ε

Thomas Lang Star height of regular languages July 2014 13 / 29

slide-52
SLIDE 52

Example

1 start 2 3 a b a i start X 2 3 t ε a b a ε i start 2 3 t a ba a ε

Thomas Lang Star height of regular languages July 2014 13 / 29

slide-53
SLIDE 53

Example continued

i start X 3 t a ba a ε

Thomas Lang Star height of regular languages July 2014 14 / 29

slide-54
SLIDE 54

Example continued

i start X 3 t a ba a ε i start 3 t a(ba)∗a ε

Thomas Lang Star height of regular languages July 2014 14 / 29

slide-55
SLIDE 55

Example continued

i start X t a(ba)∗a ε

Thomas Lang Star height of regular languages July 2014 15 / 29

slide-56
SLIDE 56

Example continued

i start X t a(ba)∗a ε i start t a(ba)∗a

Thomas Lang Star height of regular languages July 2014 15 / 29

slide-57
SLIDE 57

Overview

1

Introduction

2

Star height

3

BMC algorithm

4

Loop complexity

5

Connection between star height and loop complexity

6

References

Thomas Lang Star height of regular languages July 2014 16 / 29

slide-58
SLIDE 58

Graph-theoretic concepts

Thomas Lang Star height of regular languages July 2014 17 / 29

slide-59
SLIDE 59

Graph-theoretic concepts

A set of vertices V of a graph is called

Thomas Lang Star height of regular languages July 2014 17 / 29

slide-60
SLIDE 60

Graph-theoretic concepts

A set of vertices V of a graph is called strongly connected, if every vertex in V is reachable by every other vertex in V .

Thomas Lang Star height of regular languages July 2014 17 / 29

slide-61
SLIDE 61

Graph-theoretic concepts

A set of vertices V of a graph is called strongly connected, if every vertex in V is reachable by every other vertex in V . a ball, if V is strongly connected and has at least one edge.

Thomas Lang Star height of regular languages July 2014 17 / 29

slide-62
SLIDE 62

Examples

Figure : A graph

Thomas Lang Star height of regular languages July 2014 18 / 29

slide-63
SLIDE 63

Examples

Figure : A graph Figure : Its strongly connected components

Thomas Lang Star height of regular languages July 2014 18 / 29

slide-64
SLIDE 64

Examples

Figure : A graph Figure : Its strongly connected components Figure : Its ball

Thomas Lang Star height of regular languages July 2014 18 / 29

slide-65
SLIDE 65

Loop complexity

Thomas Lang Star height of regular languages July 2014 19 / 29

slide-66
SLIDE 66

Loop complexity

Let G be a graph, then its loop complexity is defined as follows:

Thomas Lang Star height of regular languages July 2014 19 / 29

slide-67
SLIDE 67

Loop complexity

Let G be a graph, then its loop complexity is defined as follows: If G contains no ball

Thomas Lang Star height of regular languages July 2014 19 / 29

slide-68
SLIDE 68

Loop complexity

Let G be a graph, then its loop complexity is defined as follows: If G contains no ball lc(G) := 0

Thomas Lang Star height of regular languages July 2014 19 / 29

slide-69
SLIDE 69

Loop complexity

Let G be a graph, then its loop complexity is defined as follows: If G contains no ball lc(G) := 0 If G is not a ball

Thomas Lang Star height of regular languages July 2014 19 / 29

slide-70
SLIDE 70

Loop complexity

Let G be a graph, then its loop complexity is defined as follows: If G contains no ball lc(G) := 0 If G is not a ball lc(G) := max({lc(B)|B is a ball of G})

Thomas Lang Star height of regular languages July 2014 19 / 29

slide-71
SLIDE 71

Loop complexity

Let G be a graph, then its loop complexity is defined as follows: If G contains no ball lc(G) := 0 If G is not a ball lc(G) := max({lc(B)|B is a ball of G}) If G is a ball

Thomas Lang Star height of regular languages July 2014 19 / 29

slide-72
SLIDE 72

Loop complexity

Let G be a graph, then its loop complexity is defined as follows: If G contains no ball lc(G) := 0 If G is not a ball lc(G) := max({lc(B)|B is a ball of G}) If G is a ball lc(G) := 1 + min({lc(G \ {v})|v is a vertex of G})

Thomas Lang Star height of regular languages July 2014 19 / 29

slide-73
SLIDE 73

Examples

Figure : A graph G

Thomas Lang Star height of regular languages July 2014 20 / 29

slide-74
SLIDE 74

Examples

Figure : A graph G

We have lc(G) = 1.

Thomas Lang Star height of regular languages July 2014 20 / 29

slide-75
SLIDE 75

Overview

1

Introduction

2

Star height

3

BMC algorithm

4

Loop complexity

5

Connection between star height and loop complexity

6

References

Thomas Lang Star height of regular languages July 2014 21 / 29

slide-76
SLIDE 76

Theorem

The loop complexity of a trim automaton A is equal to the minimum of the star heights of the expressions obtained by the different possible runs

  • f the BMC algorithm on A.

Thomas Lang Star height of regular languages July 2014 22 / 29

slide-77
SLIDE 77

Theorem

The loop complexity of a trim automaton A is equal to the minimum of the star heights of the expressions obtained by the different possible runs

  • f the BMC algorithm on A.

In general, given an automaton A and two total orders on its states ω1 and ω2, we have

Thomas Lang Star height of regular languages July 2014 22 / 29

slide-78
SLIDE 78

Theorem

The loop complexity of a trim automaton A is equal to the minimum of the star heights of the expressions obtained by the different possible runs

  • f the BMC algorithm on A.

In general, given an automaton A and two total orders on its states ω1 and ω2, we have h(BMC(A, ω1)) = h(BMC(A, ω2)) as the following example shows:

Thomas Lang Star height of regular languages July 2014 22 / 29

slide-79
SLIDE 79

Example

1 start 2 3 4 a b a b a b a b

Thomas Lang Star height of regular languages July 2014 23 / 29

slide-80
SLIDE 80

Example

1 start 2 3 4 a b a b a b a b Star height of result of BMC algorithm: 3

Thomas Lang Star height of regular languages July 2014 23 / 29

slide-81
SLIDE 81

Example continued

1 start 3 2 4 a b a b a b a b

Thomas Lang Star height of regular languages July 2014 24 / 29

slide-82
SLIDE 82

Example continued

1 start 3 2 4 a b a b a b a b Star height of result of BMC algorithm: 2

Thomas Lang Star height of regular languages July 2014 24 / 29

slide-83
SLIDE 83

Minimal automata

Thomas Lang Star height of regular languages July 2014 25 / 29

slide-84
SLIDE 84

Minimal automata

Consider now a regular language L.

Thomas Lang Star height of regular languages July 2014 25 / 29

slide-85
SLIDE 85

Minimal automata

Consider now a regular language L. Does the loop complexity of its minimal automaton correspond to h(L)?

Thomas Lang Star height of regular languages July 2014 25 / 29

slide-86
SLIDE 86

Minimal automata

Consider now a regular language L. Does the loop complexity of its minimal automaton correspond to h(L)? Not necessarily, as the following example shows.

Thomas Lang Star height of regular languages July 2014 25 / 29

slide-87
SLIDE 87

Example

Figure : Minimal automata A, B, C for their respective languages1

1LoSa00, On the star height of regular languages Thomas Lang Star height of regular languages July 2014 26 / 29

slide-88
SLIDE 88

Example

Figure : Minimal automata A, B, C for their respective languages1

lc(A) = 3,

1LoSa00, On the star height of regular languages Thomas Lang Star height of regular languages July 2014 26 / 29

slide-89
SLIDE 89

Example

Figure : Minimal automata A, B, C for their respective languages1

lc(A) = 3, lc(B) = 2,

1LoSa00, On the star height of regular languages Thomas Lang Star height of regular languages July 2014 26 / 29

slide-90
SLIDE 90

Example

Figure : Minimal automata A, B, C for their respective languages1

lc(A) = 3, lc(B) = 2, lc(C) = 1

1LoSa00, On the star height of regular languages Thomas Lang Star height of regular languages July 2014 26 / 29

slide-91
SLIDE 91

Example

Figure : Minimal automata A, B, C for their respective languages1

lc(A) = 3, lc(B) = 2, lc(C) = 1 But: L(A) = L(B) ∪ L(C)

1LoSa00, On the star height of regular languages Thomas Lang Star height of regular languages July 2014 26 / 29

slide-92
SLIDE 92

Example

Figure : Minimal automata A, B, C for their respective languages1

lc(A) = 3, lc(B) = 2, lc(C) = 1 But: L(A) = L(B) ∪ L(C) Therefore: h(L(A)) ≤ 2 < 3 = lc(A)

1LoSa00, On the star height of regular languages Thomas Lang Star height of regular languages July 2014 26 / 29

slide-93
SLIDE 93

Computability

Thomas Lang Star height of regular languages July 2014 27 / 29

slide-94
SLIDE 94

Computability

Is the star height of a regular language computable?

Thomas Lang Star height of regular languages July 2014 27 / 29

slide-95
SLIDE 95

Computability

Is the star height of a regular language computable? Not in general

Thomas Lang Star height of regular languages July 2014 27 / 29

slide-96
SLIDE 96

Computability

Is the star height of a regular language computable? Not in general But: For a subset of the regular languages (pure-group languages) it is computable

Thomas Lang Star height of regular languages July 2014 27 / 29

slide-97
SLIDE 97

Overview

1

Introduction

2

Star height

3

BMC algorithm

4

Loop complexity

5

Connection between star height and loop complexity

6

References

Thomas Lang Star height of regular languages July 2014 28 / 29

slide-98
SLIDE 98

References

[LoSa00] Lombardy, S.; Sakarovitch, J.: On the star height of ra- tional languages. In: Proceedings of the 3rd International Conference on Words, Languages and Combinatorics, Kyoto (Japan), March 2000

Thomas Lang Star height of regular languages July 2014 29 / 29