Code UE: JEIN8602
Solutions to the subject: Formal languages theory Date: March 2018
Duration: 3H
Documents: authorized
Lectures by: Mr G´eraud S´enizergues
Exercice 1 [/4] We consider the finite automaton A described on figure 1.
0 1 2 3
a a a
a b
b b
Figure 1: finite automaton A 0- The following sequences are successful computations of A:
0, a, 1, a, 2, a, 3 0, b, 2, a, 3 0, a, 1, b, 3, b, 0, b, 2, a, 3 0, b, 2, a, 3, b, 0, b, 2, a, 3
0, e, 3
1- We transform A into a normalized extended f.a. A
1where i (resp. t) is the initial (resp.
terminal) state. We then eliminate successively states in the ordering: 0, 1, 2, 3. We obtain the sequence of extended automata shown on figure 2.
It follows that:
[ab ∪ (b ∪ aa)a] · [bab ∪ (baa ∪ bb ∪ a)a]
∗is a regular expression for L
A.
Exercice 2 [/4] Let us consider the regular expression:
e := (ac)
∗b(a ∪ (bc)
∗)
∗Let us apply Glushkov’s method.
The locally testable language associated to e is:
L
′:= (a
1c
1)
∗b
1(a
2∪ (b
2c
2)
∗)
∗3 1 2
0
3
1 2 t
t i
i
3 t 2
i
ε
ε a
ε
ε
i i
t ε t
3 b
b
a
b
a
a
a a a
b
b ba
a+bb
b+aa a
baa+a
a+bb ab
ab+ (b+aa)a
bab+ (baa+bb+a)a bab
[ab+ (b+aa)a]·[bab+ (baa+bb+a)a]∗
Figure 2: sequence of extended automata, ex. 2 We compute
Ini(L
′) = {a
1, b
1}, F in(L
′) = {a
2, c
2, b
1},
Dig(L
′) = {a
1c
1, c
1a
1, c
1b
1, b
1a
2, b
1b
2, b
2c
2, c
2b
2, a
2a
2, c
2a
2, a
2b
2} This gives the finite automaton represented on figure 3, where the set of states is
{0, a
1, a
2, b
1, b
2, c
1, c
2}
0 is the unique initial state and the set final states is { a
2, c
2, b
1}.
Exercice 3 [/4]
1- The f.a. A, with set of states {S
0, S
1, S
2}, initial state S
0, final state S
2and the following
0
a1 c1
b1 a2
b2
c2 a
a
a a b b b
b c
c b