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 - - 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
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
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
Motivation
Thomas Lang Star height of regular languages July 2014 4 / 29
Motivation
Let L1, L2 be regular languages.
Thomas Lang Star height of regular languages July 2014 4 / 29
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
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
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
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
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
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
Regular expressions
Let A be an alphabet, then we have:
Thomas Lang Star height of regular languages July 2014 6 / 29
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
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
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
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
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
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
Star height of regular expressions
Thomas Lang Star height of regular languages July 2014 7 / 29
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
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
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
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
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
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
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
Examples
Thomas Lang Star height of regular languages July 2014 8 / 29
Examples
e1 := a∗(ba∗)∗ ⇒ h(e1) =
Thomas Lang Star height of regular languages July 2014 8 / 29
Examples
e1 := a∗(ba∗)∗ ⇒ h(e1) = 2
Thomas Lang Star height of regular languages July 2014 8 / 29
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
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
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
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
Star height of regular languages
Thomas Lang Star height of regular languages July 2014 9 / 29
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
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
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
Description
Thomas Lang Star height of regular languages July 2014 11 / 29
Description
Brzozowski-McCluskey algorithm
Thomas Lang Star height of regular languages July 2014 11 / 29
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
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
BMC algorithm
Thomas Lang Star height of regular languages July 2014 12 / 29
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
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
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
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
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
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
Example
Thomas Lang Star height of regular languages July 2014 13 / 29
Example
1 start 2 3 a b a
Thomas Lang Star height of regular languages July 2014 13 / 29
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
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
Example continued
i start X 3 t a ba a ε
Thomas Lang Star height of regular languages July 2014 14 / 29
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
Example continued
i start X t a(ba)∗a ε
Thomas Lang Star height of regular languages July 2014 15 / 29
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
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
Graph-theoretic concepts
Thomas Lang Star height of regular languages July 2014 17 / 29
Graph-theoretic concepts
A set of vertices V of a graph is called
Thomas Lang Star height of regular languages July 2014 17 / 29
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
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
Examples
Figure : A graph
Thomas Lang Star height of regular languages July 2014 18 / 29
Examples
Figure : A graph Figure : Its strongly connected components
Thomas Lang Star height of regular languages July 2014 18 / 29
Examples
Figure : A graph Figure : Its strongly connected components Figure : Its ball
Thomas Lang Star height of regular languages July 2014 18 / 29
Loop complexity
Thomas Lang Star height of regular languages July 2014 19 / 29
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
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
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
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
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
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
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
Examples
Figure : A graph G
Thomas Lang Star height of regular languages July 2014 20 / 29
Examples
Figure : A graph G
We have lc(G) = 1.
Thomas Lang Star height of regular languages July 2014 20 / 29
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
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
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
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
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
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
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
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
Minimal automata
Thomas Lang Star height of regular languages July 2014 25 / 29
Minimal automata
Consider now a regular language L.
Thomas Lang Star height of regular languages July 2014 25 / 29
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
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
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
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
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
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
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
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
Computability
Thomas Lang Star height of regular languages July 2014 27 / 29
Computability
Is the star height of a regular language computable?
Thomas Lang Star height of regular languages July 2014 27 / 29
Computability
Is the star height of a regular language computable? Not in general
Thomas Lang Star height of regular languages July 2014 27 / 29
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
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
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