Professional Documents
Culture Documents
Dm2 Ch4 Automata
Dm2 Ch4 Automata
TVHoai, HTNguyen,
NAKhuong, LHTrang
Chapter 4
Automata
Mathematical Modeling Contents
Motivation
Regular expression or
rationnal expression
1 Motivation
Motivation
4 Non-deterministic finite automata
Alphabets, words and
languages
5 Deterministic finite automata Regular expression or
rationnal expression
Non-deterministic
6 Recognized languages finite automata
Deterministic finite
7 Determinisation automata
Recognized languages
8 Minimization Determinisation
Minimization
Some applications
10 Some applications
4.2
Automata
Course outcomes
TVHoai, HTNguyen,
NAKhuong, LHTrang
Recognized languages
L.O.3 Be able to compute solutions, parameters of models based on data
L.O.3.1 – Compute/Determine optimal/feasible solutions of integer Determinisation
4.3
Automata
Introduction
TVHoai, HTNguyen,
NAKhuong, LHTrang
Standard states of a process in operating system
Contents
Resource Motivation
Non-deterministic
Resource finite automata
Deterministic finite
CPU automata
Recognized languages
Minimization
DFAs combination
4.4
Automata
Why study automata theory?
TVHoai, HTNguyen,
NAKhuong, LHTrang
A useful model
for many important kinds of software and hardware
Contents
Deterministic finite
4 verifying pratical systems of all types that have a finite automata
Minimization
DFAs combination
Some applications
4.5
Automata
Alphabets, symbols
TVHoai, HTNguyen,
NAKhuong, LHTrang
Definition
Alphabet Σ (bảng chữ cái) is a finite and non-empty set of
symbols (or characters).
For example: Contents
• Σ = {a, b} Motivation
Regular expression or
• The set of all lower-case letters: Σ = {a, b, . . . , z} rationnal expression
Deterministic finite
automata
Remark Recognized languages
Some applications
But nothing prevents to imagine other sets.
4.6
Automata
Strings (words)
TVHoai, HTNguyen,
NAKhuong, LHTrang
Definition
• A string/word u (chuỗi/từ) over Σ is a finite sequence (possibly
empty) of symbols (or characters) in Σ. Contents
Deterministic finite
automata
Recognized languages
Remark
Determinisation
The purpose aims to analyze a string of Σ∗ in order to know Minimization
Some applications
4.7
Automata
Example
TVHoai, HTNguyen,
NAKhuong, LHTrang
Let Σ = {0, 1}
Motivation
• 00, 01, 10 and 11 are the strings with length of 2.
Alphabets, words and
• ∅ is a language over Σ . It’s called the empty language. languages
Regular expression or
rationnal expression
Non-deterministic
finite automata
Deterministic finite
automata
Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.8
Automata
Example
TVHoai, HTNguyen,
NAKhuong, LHTrang
Let Σ = {0, 1}
Motivation
• 00, 01, 10 and 11 are the strings with length of 2.
Alphabets, words and
• ∅ is a language over Σ . It’s called the empty language. languages
Regular expression or
• Σ∗ is a language over Σ . It’s called the universal language. rationnal expression
Some applications
4.8
Automata
String concatenation
TVHoai, HTNguyen,
NAKhuong, LHTrang
Contents
Intuitively, the concatenation of two strings 01 and 10 is 0110. Motivation
Concatenating the empty string ε and the string 110 is the string Alphabets, words and
languages
110.
Regular expression or
rationnal expression
Definition Non-deterministic
finite automata
∗ ∗ ∗
String concatenation is an application of Σ × Σ to Σ . Deterministic finite
Concatenation of two strings u and v in Σ is the string u.v. automata
Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.9
Automata
Languages
TVHoai, HTNguyen,
NAKhuong, LHTrang
Specifying languages
A language can be specified in several ways:
Contents
Motivation
Regular expression or
rationnal expression
Non-deterministic
finite automata
Deterministic finite
automata
Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.10
Automata
Languages
TVHoai, HTNguyen,
NAKhuong, LHTrang
Specifying languages
A language can be specified in several ways:
a enumeration of its words, for example:
• L1 = {ε, 0, 1},
Contents
• L2 = {a, aa, aaa, ab, ba},
Motivation
• L3 = {ε, ab, aabb, aaabbb, aaaabbbb, . . .},
Alphabets, words and
languages
Regular expression or
rationnal expression
Non-deterministic
finite automata
Deterministic finite
automata
Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.10
Automata
Languages
TVHoai, HTNguyen,
NAKhuong, LHTrang
Specifying languages
A language can be specified in several ways:
a enumeration of its words, for example:
• L1 = {ε, 0, 1},
Contents
• L2 = {a, aa, aaa, ab, ba},
Motivation
• L3 = {ε, ab, aabb, aaabbb, aaaabbbb, . . .},
Alphabets, words and
b a property, such that all words of the language have this property languages
• L6 = {u ∈ {a, b}∗ |na (u) = nb (u)} where na (u) denotes the Deterministic finite
automata
number of letter ’a’ in word u. Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.10
Automata
Languages
TVHoai, HTNguyen,
NAKhuong, LHTrang
Specifying languages
A language can be specified in several ways:
a enumeration of its words, for example:
• L1 = {ε, 0, 1},
Contents
• L2 = {a, aa, aaa, ab, ba},
Motivation
• L3 = {ε, ab, aabb, aaabbb, aaaabbbb, . . .},
Alphabets, words and
b a property, such that all words of the language have this property languages
• L6 = {u ∈ {a, b}∗ |na (u) = nb (u)} where na (u) denotes the Deterministic finite
automata
number of letter ’a’ in word u. Recognized languages
DFAs combination
N = {S}, T = {a, b}, P = {S → aSb, S → ab}
i.e. L(G) = {an bn |n ≥ 1} since Some applications
4.10
Automata
Operations on languages
TVHoai, HTNguyen,
NAKhuong, LHTrang
L, L1 , L2 are languages over Σ
• union
L1 ∪ L2 = {u ∈ Σ∗ | u ∈ L1 or u ∈ L2 },
• intersection
L1 ∩ L2 = {u ∈ Σ∗ | u ∈ L1 and u ∈ L2 },
• difference Contents
L1 \ L2 = {u ∈ Σ∗ | u ∈ L1 and u 6∈ L2 }, Motivation
L1 L2 = {uv | u ∈ L1 , v ∈ L2 }, Non-deterministic
finite automata
Deterministic finite
automata
Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.11
Automata
Operations on languages
TVHoai, HTNguyen,
NAKhuong, LHTrang
L, L1 , L2 are languages over Σ
• union
L1 ∪ L2 = {u ∈ Σ∗ | u ∈ L1 or u ∈ L2 },
• intersection
L1 ∩ L2 = {u ∈ Σ∗ | u ∈ L1 and u ∈ L2 },
• difference Contents
L1 \ L2 = {u ∈ Σ∗ | u ∈ L1 and u 6∈ L2 }, Motivation
L1 L2 = {uv | u ∈ L1 , v ∈ L2 }, Non-deterministic
finite automata
• power
Deterministic finite
L0 = {ε}, Ln = Ln−1 L , if n ≥ 1, automata
L+ = Li = L ∪ L2 ∪ · · · ∪ Li ∪ · · · .
i=1
The union, product and iteration are called regular operations.
4.11
Automata
Example
TVHoai, HTNguyen,
NAKhuong, LHTrang
Let Σ = {a, b, c}, L1 = {ab, aa, b}, L2 = {b, ca, bac} Contents
Motivation
a L1 ∪ L2 =?, Alphabets, words and
languages
b L1 ∩ L2 =?,
Regular expression or
c L1 \ L2 =?, rationnal expression
Non-deterministic
d L1 L2 =?, finite automata
Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.12
Automata
Example
TVHoai, HTNguyen,
NAKhuong, LHTrang
Let Σ = {a, b, c}, L1 = {ab, aa, b}, L2 = {b, ca, bac} Contents
Motivation
a L1 ∪ L2 = {ab, aa, b, ca, bac}, Alphabets, words and
languages
b L1 ∩ L2 = {b},
Regular expression or
c L1 \ L2 = {ab, aa}, rationnal expression
Non-deterministic
d L1 L2 = {abb, aab, bb, abca, aaca, bca, abbac, aabac, bbac}, finite automata
e L2 L1 = {bab, baa, bb, caab, caaa, cab, bacab, bacaa, bacb}. Deterministic finite
automata
Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.12
Automata
Example
TVHoai, HTNguyen,
NAKhuong, LHTrang
Motivation
b L1 ∩ L2 = {b},
Alphabets, words and
c L1 \ L2 = {ab, aa}, languages
Regular expression or
d L1 L2 = {abb, aab, bb, abca, aaca, bca, abbac, aabac, bbac}, rationnal expression
e L2 L1 = {bab, baa, bb, caab, caaa, cab, bacab, bacaa, bacb}. Non-deterministic
finite automata
Deterministic finite
automata
2 Determinisation
L =?
Minimization
DFAs combination
Some applications
4.12
Automata
Example
TVHoai, HTNguyen,
NAKhuong, LHTrang
Motivation
d L1 L2 = {abb, aab, bb, abca, aaca, bca, abbac, aabac, bbac},
Alphabets, words and
e L2 L1 = {bab, baa, bb, caab, caaa, cab, bacab, bacaa, bacb}. languages
Regular expression or
rationnal expression
Non-deterministic
Let Σ = {a, b, c} and L = {ab, aa, b, ca, bac} finite automata
Minimization
• bab, baa, bb, bca, bbac,
DFAs combination
• caab, caaa, cab, caca, cabac, Some applications
4.12
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
Let Σ = {a, b, c}
Give at least 5 strings for each of the following languages
1 all strings with exactly one ’a’.
Contents
2 all strings of even length. Motivation
Minimization
9 all strings including at least one ’a’ and whose the first appearance
DFAs combination
of ’a’ is not followed by ’c’.
Some applications
4.13
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
5 2 Minimization
S9 baaaaabaac = ba ba c,
DFAs combination
S10 baca. Some applications
4.14
Automata
Regular expressions
TVHoai, HTNguyen,
NAKhuong, LHTrang
Motivation
Regular operations on the languages
Alphabets, words and
languages
• union ∪ or + Regular expression or
rationnal expression
• product of concatenation Non-deterministic
finite automata
• transitive closure ∗
Deterministic finite
automata
Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.15
Automata
Regular expressions
TVHoai, HTNguyen,
NAKhuong, LHTrang
Motivation
Regular operations on the languages
Alphabets, words and
languages
• union ∪ or + Regular expression or
rationnal expression
• product of concatenation Non-deterministic
finite automata
• transitive closure ∗
Deterministic finite
automata
Recognized languages
Example on the aphabet set Σ = {a, b}
Determinisation
Minimization
• (a + b)∗ represent all the strings
DFAs combination
• a∗ (ba∗ )∗ represent the same language Some applications
∗
• (a + b) aab represent all strings ending with aab.
4.15
Automata
Regular expressions
TVHoai, HTNguyen,
NAKhuong, LHTrang
Regular expression or
rationnal expression
Non-deterministic
finite automata
Deterministic finite
automata
Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.16
Automata
Regular expressions
TVHoai, HTNguyen,
NAKhuong, LHTrang
Recognized languages
x(y + z) ≡ xy + xz Determinisation
∗ ∗ ∗ ∗ DFAs combination
(x + y) ≡ (x y )
Some applications
(x∗ )∗ ≡ x∗
x∗ x ≡ xx∗
xx∗ + ε ≡ x∗ 4.16
Automata
Regular expressions
TVHoai, HTNguyen,
NAKhuong, LHTrang
Contents
Motivation
Kleene’s theorem Alphabets, words and
languages
Language L ⊆ Σ∗ is regular if and only if there exists a regular Regular expression or
expression over Σ representing language L. rationnal expression
Non-deterministic
finite automata
Deterministic finite
automata
Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.17
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
Let Σ = {a, b, c}
Give at least 3 words for each language represented by the
Contents
following regular expressions
Motivation
1 E1 = a∗ + b∗ , Alphabets, words and
languages
2 E2 = a∗ b + b∗ a, Regular expression or
rationnal expression
3 E3 = b(ca + ac)(aa)∗ + a∗ (a + b),
Non-deterministic
4 E4 = (a∗ b + b∗ a)∗ . finite automata
Deterministic finite
automata
Recognized languages
Example
Determinisation
∗ 2 3
a b = {b, ab, a b, a b, . . . , aaa . . . ab}, Minimization
DFAs combination
Some applications
4.18
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
Let Σ = {a, b, c}
Determine regular expression presenting for each of the following
languages.
1 all strings with exactly one ’a’. Contents
Motivation
2 all strings of even length.
Alphabets, words and
languages
3 all strings which the number of appearances of ’b’ is divisible by 3.
Regular expression or
4 all strings ending with ’a’. rationnal expression
Non-deterministic
5 all non-empty strings not ending with ’a’. finite automata
Deterministic finite
6 all strings with at least one ’a’. automata
Determinisation
8 all strings without any ’a’.
Minimization
9 all strings including at least one ’a’ and whose the first appearance DFAs combination
4.19
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
Motivation
2 E2 = b∗ + a∗ aba∗ , Alphabets, words and
languages
3 E3 = aab + cab∗ ac,
Regular expression or
4 E4 = b(ca + ac)(aa)∗ + a∗ (a + b), rationnal expression
Non-deterministic
5 E5 = (a4 ba3 )2∗ c, finite automata
Deterministic finite
6 E6 = b+ ac (b+ = bb∗ ), automata
Determinisation
∗ ∗
8 E8 = (b + c) ab + a(c + a) . Minimization
DFAs combination
Some applications
4.20
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
Motivation
2 E2 = b∗ + a∗ aba∗ , Alphabets, words and
languages
3 E3 = aab + cab∗ ac,
Regular expression or
4 E4 = b(ca + ac)(aa)∗ + a∗ (a + b), rationnal expression
Non-deterministic
5 E5 = (a4 ba3 )2∗ c, finite automata
Deterministic finite
6 E6 = b+ ac (b+ = bb∗ ), automata
Determinisation
∗ ∗
8 E8 = (b + c) ab + a(c + a) . Minimization
DFAs combination
4.20
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
Non-deterministic
5 E5 = aa(b∗ + a) + a(ab∗ + aa), finite automata
Determinisation
Minimization
DFAs combination
Some applications
4.21
Automata
Finite automata
TVHoai, HTNguyen,
NAKhuong, LHTrang
(events). Motivation
Regular expression or
rationnal expression
Non-deterministic
finite automata
Deterministic finite
automata
Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.22
Automata
Finite automata
TVHoai, HTNguyen,
NAKhuong, LHTrang
(events). Motivation
Regular expression or
rationnal expression
Non-deterministic
b finite automata
a, b Deterministic finite
automata
q0 q1 Recognized languages
Determinisation
Minimization
DFAs combination
Regular expression Some applications
∗
b (a + b)
4.22
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
Let Σ = {a, b}
Which of the strings
1 a3 b,
2 aba2 b,
3 a4 b2 ab3 a, Contents
Motivation
4 a4 ba4 , Alphabets, words and
languages
5 ab4 a9 b,
Regular expression or
6 ba5 ba4 b, rationnal expression
Non-deterministic
7 ba5 b2 , finite automata
Deterministic finite
8 bab2 a automata
Recognized languages
are accepted by the following finite automata?
Determinisation
a b Minimization
b DFAs combination
Some applications
a
q0 q1 q2
b
a
4.23
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
Let Σ = {a, b, c}
Propose FA presenting each of the following languages
1 all strings with exactly one ’a’.
Contents
2 all strings of even length. Motivation
Minimization
9 all strings including at least one ’a’ and whose the first appearance
DFAs combination
of ’a’ is not followed by a ’c’.
Some applications
4.24
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
Give regular expression for the following finite automata.
b a, b
b
Contents
a q0 a q1 Motivation
q0 q1 Alphabets, words and
languages
a b Regular expression or
rationnal expression
Non-deterministic
finite automata
b q0 a q1 Deterministic finite
q0 q1 automata
Recognized languages
b
Determinisation
a a, b Minimization
DFAs combination
a Some applications
b
q2 q2
4.25
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
a b
b
a Contents
q0 q1 q2 Motivation
Non-deterministic
finite automata
Deterministic finite
automata
Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.26
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
a b
b
a Contents
q0 q1 q2 Motivation
Non-deterministic
and this one. finite automata
Deterministic finite
automata
b b Recognized languages
a, b Determinisation
Minimization
q0 q1 DFAs combination
Some applications
4.26
Automata
Nondeterministic finite automata
TVHoai, HTNguyen,
NAKhuong, LHTrang
Definition
A nondeterministic finite automata (NFA, Automat hữu hạn phi
đơn định) is mathematically represented by a 5-tuples
Contents
(Q, Σ, q0 , δ, F ) where Motivation
• Q a finite set of states. Alphabets, words and
languages
• Σ is the alphabet of the automata. Regular expression or
rationnal expression
• q0 ∈ Q is the initial state.
Non-deterministic
• δ : Q × Σ → Q is a transition function. finite automata
Deterministic finite
• F ⊆ Q is the set of final/accepting states. automata
Recognized languages
Determinisation
Remark Minimization
Some applications
4.27
Automata
NFA with empty symbol ε
TVHoai, HTNguyen,
NAKhuong, LHTrang
Regular expression or
b a a, b rationnal expression
Non-deterministic
ε b finite automata
Deterministic finite
q0 q1 q2 automata
Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.28
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
Contents
Motivation
Consider the set of strings on {a, b} in which every aa is followed Alphabets, words and
immediately by b. languages
Regular expression or
For example aab, aaba, aabaabbaab are in the language, rationnal expression
but aaab and aabaa are not. Non-deterministic
finite automata
Construct an accepting NFA.
Deterministic finite
automata
Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.29
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
Contents
Let Σ = {a, b, c}
Motivation
Propose NFA presenting each of the following languages Alphabets, words and
languages
1 all strings with exactly one ’a’. Regular expression or
rationnal expression
2 all strings of even number of appearances of ’b’.
Non-deterministic
finite automata
3 all strings which the number of appearances of ’b’ is divisible by 3.
Deterministic finite
automata
Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.30
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
Let Σ = {a, b, c}
Construct an accepting finite automata for languages represented
by the following regular expressions.
• E1 = a∗ c + b∗ a, Contents
∗ ∗
• E2 = b ab + a aba , ∗ Motivation
Regular expression or
• E4 = b(ca + ac)(aa)∗ + a∗ (a + b), rationnal expression
Non-deterministic
• E5 = (ab)2∗ c + bac, finite automata
Determinisation
• E8 = (b + c)∗ ba + a(c + a)∗ ,
Minimization
• E9 = [a(b + c)∗ + bc∗ ]∗ , DFAs combination
4.31
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
Let Σ = {a, b}
Give 3 valid strings & 5 invalid strings in language L2 , with L
represented by the following finite automata.
Contents
a Motivation
Non-deterministic
a finite automata
Deterministic finite
automata
b b Recognized languages
Determinisation
b Minimization
DFAs combination
D a C b
Some applications
4.32
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
Let Σ = {a, b}
Give 3 valid strings & 5 invalid strings in language L2 , with L
represented by the following finite automata.
Contents
a Motivation
Non-deterministic
a finite automata
Deterministic finite
automata
b b Recognized languages
Determinisation
a
Minimization
DFAs combination
D a C b
Some applications
4.33
Automata
Deterministic finite automata
TVHoai, HTNguyen,
NAKhuong, LHTrang
Definition
A deterministic finite automata (DFA, Automat hữu hạn đơn
định) is given by a 5-tuplet (Q, Σ, q0 , δ, F ) with Contents
Recognized languages
Condition Determinisation
Minimization
Transition function δ is an application.
DFAs combination
Some applications
4.34
Automata
Example
TVHoai, HTNguyen,
NAKhuong, LHTrang
Let Σ = {a, b}
Hereinafter, a deterministic and complete automata that
recognizes the set of strings which contain an odd number of a.
Contents
b b Motivation
q0 q1 Regular expression or
rationnal expression
Non-deterministic
a finite automata
Deterministic finite
automata
Recognized languages
Determinisation
• Q = {q0 , q1 }, Minimization
Some applications
• F = {q1 }.
4.35
Automata
Configurations and executions
TVHoai, HTNguyen,
NAKhuong, LHTrang
Let A = (Q, Σ, q0 , δ, F )
A configuration (cấu hình) of automata A is a couple (q, u) where Contents
q ∈ Q and u ∈ Σ∗ . Motivation
We define the relation → of derivation between configurations : Alphabets, words and
Regular expression or
rationnal expression
Non-deterministic
finite automata
An execution (thực thi) of automata A is a sequence of Deterministic finite
automata
configurations
Recognized languages
(q0 , u0 ) . . . (qn , un ) such that
Determinisation
(qi , ui ) → (qi+1 , ui+1 ), for i = 0, 1, . . . , n − 1. Minimization
DFAs combination
Some applications
4.36
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
Let Σ = {0, 1}
Contents
• Give a DFA that accepts all words that contain a number of 0
Motivation
multiple of 3.
Alphabets, words and
• Give an execution of this automata on 1101010. languages
Regular expression or
rationnal expression
Non-deterministic
finite automata
Deterministic finite
automata
Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.37
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
Let Σ = {0, 1}
Contents
• Give a DFA that accepts all words that contain a number of 0
Motivation
multiple of 3.
Alphabets, words and
• Give an execution of this automata on 1101010. languages
Regular expression or
rationnal expression
Non-deterministic
Let Σ = {a, b} finite automata
Deterministic finite
• Give a DFA that accepts all strings containing 2 characters a. automata
Recognized languages
• Give an execution of this automata on aabb, ababb and bbaa.
Determinisation
Minimization
DFAs combination
Some applications
4.37
Automata
Recognized languages
TVHoai, HTNguyen,
NAKhuong, LHTrang
Definition
A language L over an alphabet Σ, defined as a sub-set of Σ∗ , is Contents
Regular expression or
Proposition rationnal expression
Non-deterministic
If L1 and L2 are two recognized languages, then finite automata
Deterministic finite
• L1 ∪ L2 and L1 ∩ L2 are also recognized; automata
Determinisation
Minimization
DFAs combination
Some applications
4.38
Automata
Example
TVHoai, HTNguyen,
NAKhuong, LHTrang
Sub-string ab
Construct a DFA that recognizes the language over the alphabet
{a, b} containing the sub-string ab. Contents
Motivation
Non-deterministic
finite automata
Deterministic finite
automata
Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.39
Automata
Example
TVHoai, HTNguyen,
NAKhuong, LHTrang
Sub-string ab
Construct a DFA that recognizes the language over the alphabet
{a, b} containing the sub-string ab. Contents
Motivation
b a a, b Non-deterministic
finite automata
Transition table Deterministic finite
a b
a b automata
→ q0 q1 q0 q0 q1 q2 Recognized languages
Determinisation
q1 q1 q2
Minimization
q2 ∗ q2 q2 DFAs combination
Some applications
4.39
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
Let Σ = {a, b, c}
Propose DFA presenting each of the following languages
Contents
1 all strings which the number of appearances of ’aa’ and the one of
Motivation
’b’ are the same.
Alphabets, words and
languages
2 all strings which the number of appearances of ’a’ is equal to the
Regular expression or
one of ’b’ plus the one of ’c’. rationnal expression
3 all strings including at least one ’a’ and whose the first appearance Non-deterministic
finite automata
of ’a’ is not followed by a ’c’. Deterministic finite
automata
4 all strings which the difference between number of appearances of
Recognized languages
’a’ and the one of ’c’ is less than 1.
Determinisation
5 all strings which there is at least ’b’ or ’cb’ after ’a’ or ’aa’. Minimization
DFAs combination
Some applications
4.40
Automata
Example
TVHoai, HTNguyen,
NAKhuong, LHTrang
Let Σ = {a, b, c}
Contents
Construct DFAs that recognize the languages represented by the
Motivation
following regular expressions.
Alphabets, words and
• E1 = a∗ + b∗ a, languages
Regular expression or
• E2 = b∗ + a∗ aba∗ , rationnal expression
Determinisation
Minimization
DFAs combination
Some applications
4.41
Automata
From NFA to DFA
TVHoai, HTNguyen,
NAKhuong, LHTrang
Given a NFA
b b
Contents
a
Motivation
Regular expression or
a b rationnal expression
Non-deterministic
finite automata
a Deterministic finite
automata
ε Recognized languages
Determinisation
2 Minimization
DFAs combination
Some applications
4.42
Automata
From NFA to DFA
TVHoai, HTNguyen,
NAKhuong, LHTrang
Given a NFA
b b
Contents
a
Motivation
a b Regular expression or
rationnal expression
→ {0} {1} {0} Non-deterministic
finite automata
a Deterministic finite
automata
ε Recognized languages
Determinisation
2 Minimization
DFAs combination
Some applications
4.42
Automata
From NFA to DFA
TVHoai, HTNguyen,
NAKhuong, LHTrang
Given a NFA
b b
Contents
a
Motivation
Transition table
Alphabets, words and
0 1 languages
a b Regular expression or
→ {0} {1} {0} rationnal expression
Determinisation
2 Minimization
DFAs combination
Some applications
4.42
Automata
From NFA to DFA
TVHoai, HTNguyen,
NAKhuong, LHTrang
Given a NFA
b b
Contents
a
Motivation
Transition table
Alphabets, words and
0 1 languages
a b
Regular expression or
→ {0} {1} {0} rationnal expression
Determinisation
2 Minimization
DFAs combination
Some applications
4.42
Automata
From NFA to DFA
TVHoai, HTNguyen,
Transition table NAKhuong, LHTrang
a b
→ {0} {1} {0}
Given a NFA {1} {0, 2} {1}
{0, 2}∗ {1} {0}
b b Contents
0 1 b b languages
Regular expression or
a rationnal expression
Non-deterministic
finite automata
{0} {1}
a Deterministic finite
automata
Recognized languages
ε Determinisation
a a Minimization
2 DFAs combination
b Some applications
{0, 2}
4.42
Automata
Other example of determinisation
TVHoai, HTNguyen,
NAKhuong, LHTrang
Given a NFA
b b
a, b Contents
Motivation
Regular expression or
a rationnal expression
Non-deterministic
finite automata
a b Recognized languages
DFAs combination
{0, 1}∗ {0, 1} {0, 1}
Some applications
4.43
Automata
Other example of determinisation
TVHoai, HTNguyen,
NAKhuong, LHTrang
Regular expression or
a rationnal expression
a
Non-deterministic
finite automata
a b Recognized languages
DFAs combination
{0, 1}∗ {0, 1} {0, 1}
Some applications
4.43
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
Let Σ = {a, b, c}
Determine DFAs which corresponds to the following NFAs:
b, c b, c a b
a, ε 0 1 2
Contents
Motivation
Regular expression or
rationnal expression
Non-deterministic
finite automata
Deterministic finite
automata
Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.44
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
Let Σ = {a, b, c}
Determine DFAs which corresponds to the following NFAs:
b, c b, c a b
a, ε 0 1 2
Contents
Motivation
a b, c Regular expression or
rationnal expression
a b
Non-deterministic
finite automata
b, ε
b 0 1
Deterministic finite
automata
0 1
Recognized languages
ε Determinisation
Minimization
ε
a, b ε DFAs combination
a Some applications
2
2
4.44
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
Let Σ = {a, b, c}
Determine DFAs which corresponds to the following NFAs:
b Contents
Motivation
Regular expression or
rationnal expression
Non-deterministic
a finite automata
b b Deterministic finite
automata
Recognized languages
Determinisation
3 Minimization
DFAs combination
Some applications
4.45
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
Let Σ = {a, b, c}
Determine DFAs which corresponds to the following NFAs:
b
b, c Contents
a c Motivation
0 1 2 Alphabets, words and
languages
Regular expression or
rationnal expression
c
b Non-deterministic
finite automata
Deterministic finite
a automata
Recognized languages
3 Determinisation
Minimization
DFAs combination
a, c Some applications
4.46
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
Determinisation
Minimization
DFAs combination
Some applications
4.47
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
Let Σ = {a, b, c}
Construct DFAs for languages represented by following expressions.
• E1 = a∗ + b∗ a,
• E2 = b∗ + a∗ aba∗ ,
Contents
• E3 = (aab + ab∗ )∗ , Motivation
∗ ∗ Minimization
• E11 = bb ac + b a,
DFAs combination
• E12 = (b + c)ab + ba(c + ab)∗ , Some applications
4.48
Automata
Example
TVHoai, HTNguyen,
NAKhuong, LHTrang
Contents
Motivation
Regular expression or
rationnal expression
Non-deterministic
finite automata
Deterministic finite
automata
Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.49
Automata
Example
TVHoai, HTNguyen,
NAKhuong, LHTrang
Automata Contents
Motivation
Regular expression or
q0 q1 rationnal expression
Non-deterministic
finite automata
b Deterministic finite
automata
a a a a Recognized languages
Determinisation
b Minimization
DFAs combination
q2 q3 Some applications
b
4.49
Automata
Example
TVHoai, HTNguyen,
NAKhuong, LHTrang
Automata Contents
Motivation
Regular expression or
q0 q1 a b
rationnal expression
Non-deterministic
→ q0∗ q2 q1 finite automata
b q1 q3 q0 Deterministic finite
automata
a a a a q2 q0 q3 Recognized languages
q3 q1 q2 Determinisation
∗ DFAs combination
: final state(s)
q2 q3 Some applications
b
4.49
Automata
From a DFA to a smaller DFA
TVHoai, HTNguyen,
NAKhuong, LHTrang
a b
0 1 2
Contents
b b a a a, b a, b Motivation
Regular expression or
rationnal expression
a b
3 4 5 Non-deterministic
finite automata
Deterministic finite
automata
Determinisation
s 0 1 2 3 4 5
Minimization
cl(s)
DFAs combination
Some applications
4.50
Automata
From a DFA to a smaller DFA
TVHoai, HTNguyen,
NAKhuong, LHTrang
a b
0 1 2
Contents
b b a a a, b a, b Motivation
Regular expression or
rationnal expression
a b
3 4 5 Non-deterministic
finite automata
Deterministic finite
automata
Determinisation
s 0 1 2 3 4 5
Minimization
cl(s) I I I I
DFAs combination
Some applications
4.50
Automata
From a DFA to a smaller DFA
TVHoai, HTNguyen,
NAKhuong, LHTrang
a b
0 1 2
Contents
b b a a a, b a, b Motivation
Regular expression or
rationnal expression
a b
3 4 5 Non-deterministic
finite automata
Deterministic finite
automata
Determinisation
s 0 1 2 3 4 5
Minimization
cl(s) I II I II I I
DFAs combination
Some applications
4.50
Automata
From a DFA to a smaller DFA
TVHoai, HTNguyen,
NAKhuong, LHTrang
a b
0 1 2
Contents
b b a a a, b a, b Motivation
Regular expression or
a b rationnal expression
3 4 5
Non-deterministic
finite automata
Deterministic finite
automata
equivalence relationships Recognized languages
s 0 1 2 3 4 5 Determinisation
cl(s) I II I II I I Minimization
4.50
Automata
From a DFA to a smaller DFA
TVHoai, HTNguyen,
NAKhuong, LHTrang
a b
0 1 2
Contents
b b a a a, b a, b Motivation
Regular expression or
a b rationnal expression
3 4 5
Non-deterministic
finite automata
Deterministic finite
automata
equivalence relationships Recognized languages
s 0 1 2 3 4 5 Determinisation
cl(s) I II I II I I Minimization
4.50
Automata
From a DFA to a smaller DFA
TVHoai, HTNguyen,
NAKhuong, LHTrang
a b
0 1 2
Contents
b b a a a, b a, b Motivation
Regular expression or
a b rationnal expression
3 4 5
Non-deterministic
finite automata
Deterministic finite
automata
equivalence relationships Recognized languages
s 0 1 2 3 4 5 Determinisation
cl(s) I II I II I I Minimization
4.50
Automata
From a DFA to a smaller DFA
TVHoai, HTNguyen,
NAKhuong, LHTrang
a b
0 1 2
Contents
b b a a a, b a, b Motivation
Regular expression or
a b rationnal expression
3 4 5
Non-deterministic
finite automata
Deterministic finite
automata
equivalence relationships Recognized languages
s 0 1 2 3 4 5 Determinisation
cl(s) I II I II I I Minimization
4.50
Automata
From a DFA to a smaller DFA
TVHoai, HTNguyen,
NAKhuong, LHTrang
a b
0 1 2
Contents
b b a a a, b a, b Motivation
Regular expression or
a b rationnal expression
3 4 5
Non-deterministic
finite automata
Deterministic finite
automata
equivalence relationships Recognized languages
s 0 1 2 3 4 5 Determinisation
cl(s) I II I II I I Minimization
4.50
Automata
From a DFA to a smaller DFA
TVHoai, HTNguyen,
NAKhuong, LHTrang
a b
0 1 2
Contents
b b a a a, b a, b Motivation
Regular expression or
a b rationnal expression
3 4 5
Non-deterministic
finite automata
Deterministic finite
automata
equivalence relationships Recognized languages
s 0 1 2 3 4 5 Determinisation
cl(s) I II I II I I Minimization
4.50
Automata
From a DFA to a smaller DFA
TVHoai, HTNguyen,
NAKhuong, LHTrang
a b
0 1 2
Contents
b b a a a, b a, b Motivation
Regular expression or
a b rationnal expression
3 4 5
Non-deterministic
finite automata
Deterministic finite
automata
equivalence relationships Recognized languages
s 0 1 2 3 4 5 Determinisation
cl(s) I II I II I I Minimization
4.50
Automata
From a DFA to a smaller DFA
TVHoai, HTNguyen,
NAKhuong, LHTrang
a b
0 1 2
Contents
b b a a a, b a, b Motivation
Regular expression or
a b rationnal expression
3 4 5
Non-deterministic
finite automata
Deterministic finite
automata
equivalence relationships Recognized languages
s 0 1 2 3 4 5 Determinisation
0 1 2 3 4 5
cl(s) I II I II I I Minimization
I II II
cl(s.a) II I I I II I DFAs combination
4.50
Automata
From a DFA to a smaller DFA
TVHoai, HTNguyen,
NAKhuong, LHTrang
a b
0 1 2
Contents
b b a a a, b a, b Motivation
Regular expression or
a b rationnal expression
3 4 5
Non-deterministic
finite automata
Deterministic finite
automata
equivalence relationships Recognized languages
s 0 1 2 3 4 5 Determinisation
0 1 2 3 4 5
cl(s) I II I II I I Minimization
I II III II
cl(s.a) II I I I II I DFAs combination
4.50
Automata
From a DFA to a smaller DFA
TVHoai, HTNguyen,
NAKhuong, LHTrang
a b
0 1 2
Contents
b b a a a, b a, b Motivation
Regular expression or
a b rationnal expression
3 4 5
Non-deterministic
finite automata
Deterministic finite
automata
equivalence relationships Recognized languages
s 0 1 2 3 4 5 Determinisation
0 1 2 3 4 5
cl(s) I II I II I I Minimization
I II III II IV
cl(s.a) II I I I II I DFAs combination
4.50
Automata
From a DFA to a smaller DFA
TVHoai, HTNguyen,
NAKhuong, LHTrang
a b
0 1 2
Contents
b b a a a, b a, b Motivation
Regular expression or
a b rationnal expression
3 4 5
Non-deterministic
finite automata
Deterministic finite
automata
equivalence relationships Recognized languages
s 0 1 2 3 4 5 Determinisation
0 1 2 3 4 5
cl(s) I II I II I I Minimization
I II III II IV III
cl(s.a) II I I I II I DFAs combination
4.50
Automata
From a DFA to a smaller DFA
TVHoai, HTNguyen,
NAKhuong, LHTrang
a b
0 1 2
Contents
b b a a a, b a, b Motivation
Regular expression or
a b rationnal expression
3 4 5
Non-deterministic
finite automata
Deterministic finite
automata
equivalence relationships Recognized languages
s 0 1 2 3 4 5 0 1 2 3 4 5 Determinisation
4.50
Automata
From a DFA to a smaller DFA
TVHoai, HTNguyen,
NAKhuong, LHTrang
a b
0 1 2
b b a a a, b a, b
Contents
Motivation
a b Alphabets, words and
3 4 5 languages
Regular expression or
rationnal expression
Determinisation
cl(s.b) II I I I I I II III III I III III
Minimization
DFAs combination
s 0 1 2 3 4 5
Some applications
cl(s) I II III IV III
cl(s.a) II IV III II III
cl(s.b) III III III III
4.50
Automata
From a DFA to a smaller DFA
TVHoai, HTNguyen,
NAKhuong, LHTrang
a b
0 1 2
b b a a a, b a, b
Contents
Motivation
a b Alphabets, words and
3 4 5 languages
Regular expression or
rationnal expression
Determinisation
cl(s.b) II I I I I I II III III I III III
Minimization
DFAs combination
s 0 1 2 3 4 5
Some applications
cl(s) I II III V IV III
cl(s.a) II IV III II III
cl(s.b) III III III III
4.50
Automata
From a DFA to a smaller DFA
TVHoai, HTNguyen,
NAKhuong, LHTrang
a b
0 1 2
b b a a a, b a, b
Contents
Motivation
a b Alphabets, words and
3 4 5 languages
Regular expression or
rationnal expression
Determinisation
cl(s.b) II I I I I I II III III I III III
Minimization
DFAs combination
s 0 1 2 3 4 5
Some applications
cl(s) I II III V IV III
cl(s.a) II IV III II III
cl(s.b) V III III III III
4.50
Automata
From a DFA to a smaller DFA
TVHoai, HTNguyen,
NAKhuong, LHTrang
a b
0 1 2
b b a a a, b a, b
Contents
Motivation
a b Alphabets, words and
3 4 5 languages
Regular expression or
rationnal expression
Determinisation
cl(s.b) II I I I I I II III III I III III
Minimization
DFAs combination
s 0 1 2 3 4 5
Some applications
cl(s) I II III V IV III
cl(s.a) II IV III IV II III
cl(s.b) V III III I III III
4.50
Automata
From a DFA to a smaller DFA
TVHoai, HTNguyen,
NAKhuong, LHTrang
a
{0} {1}
a, b
b
b b a a Contents
Motivation
{2, 5}
b Alphabets, words and
languages
a
{3} {4} Regular expression or
rationnal expression
Non-deterministic
finite automata
Deterministic finite
equivalence relationships automata
Recognized languages
Determinisation
s 0 1 2 3 4 5
Minimization
cl(s) I II III V IV III
DFAs combination
cl(s.a) II IV III IV II III
Some applications
cl(s.b) V III III I III III
4.51
Automata
Another example of minimization
TVHoai, HTNguyen,
NAKhuong, LHTrang
a b
a b
0 1 2
Contents
b
a b Motivation
3 4 a 5 Non-deterministic
b finite automata
Deterministic finite
a a automata
Recognized languages
Determinisation
Minimization
equivalence relationships
DFAs combination
s 0 1 2 3 4 5 Some applications
cl(s) I I II I I I
cl(s.a) I I I I I I
cl(s.b) I II II I I II
4.52
Automata
Another example of minimization
TVHoai, HTNguyen,
NAKhuong, LHTrang
a b
a b
0 1 2
Contents
b
a b Motivation
3 4 a 5 Non-deterministic
b finite automata
Deterministic finite
a a automata
Recognized languages
Determinisation
Minimization
equivalence relationships
DFAs combination
s 0 1 2 3 4 5 0 1 2 3 4 5 Some applications
cl(s) I I II I I I I III II I I III
cl(s.a) I I I I I I III I I III I I
cl(s.b) I II II I I II I II II I I II
4.52
Automata
Another example of minimization
TVHoai, HTNguyen,
NAKhuong, LHTrang
a b
a b
0 1 2
Contents
b
a b Motivation
3 4 a 5 Non-deterministic
b finite automata
Deterministic finite
a a automata
Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.53
Automata
Another example of minimization
TVHoai, HTNguyen,
NAKhuong, LHTrang
a b
a b
0 1 2
Contents
b
a b Motivation
3 4 a 5 Non-deterministic
b finite automata
Deterministic finite
a a automata
Recognized languages
Determinisation
Minimization
equivalence relationships
DFAs combination
s 0 1 2 3 4 5 Some applications
cl(s) I III II I I III
cl(s.a) III I I III I I
cl(s.b) I II II I I II
4.53
Automata
Another example of minimization
TVHoai, HTNguyen,
NAKhuong, LHTrang
a b
a b
0 1 2
Contents
b
a b Motivation
3 4 a 5 Non-deterministic
b finite automata
Deterministic finite
a a automata
Recognized languages
Determinisation
Minimization
equivalence relationships
DFAs combination
s 0 1 2 3 4 5 0 1 2 3 4 5 Some applications
cl(s) I III II I I III I III II I IV III
cl(s.a) III I I III I I III IV I III IV IV
cl(s.b) I II II I I II IV II II IV I II
4.53
Automata
Another example of minimization
TVHoai, HTNguyen,
NAKhuong, LHTrang
a
a b
{0, 3} {1, 5} 2
b Contents
b Motivation
a Alphabets, words and
b languages
Regular expression or
rationnal expression
4 Non-deterministic
finite automata
Deterministic finite
automata
a
Recognized languages
Determinisation
DFAs combination
s 0 1 2 3 4 5
Some applications
cl(s) I III II I IV III
cl(s.a) III IV I III IV IV
cl(s.b) IV II II IV I II
4.54
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
Let Σ = {a, b}
Determine minimal DFA which corresponds to the following DFA:
b
b
0 1 8
Contents
b
Motivation
a a a a a Alphabets, words and
languages
b Regular expression or
rationnal expression
b Non-deterministic
2 3 4 finite automata
Deterministic finite
automata
b
Recognized languages
a a b Determinisation
Minimization
b a DFAs combination
Some applications
5 6 7
b a
4.55
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
b a, b
Contents
Motivation
b a
0 1 2 Alphabets, words and
languages
Regular expression or
rationnal expression
a b Non-deterministic
finite automata
Deterministic finite
automata
Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.56
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
b a, b
Contents
Motivation
b a
0 1 2 Alphabets, words and
languages
Regular expression or
rationnal expression
a b Non-deterministic
finite automata
Deterministic finite
automata
Hint Recognized languages
Minimization
DFAs combination
Some applications
4.56
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
σ = {a, b}
Contents
Non-deterministic
finite automata
Deterministic finite
automata
Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.57
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
σ = {a, b}
Contents
Deterministic finite
automata
Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.57
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
σ = {a, b}
Contents
Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.57
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
σ = {a, b}
Contents
Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.57
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
σ = {a, b, c, d}
Contents
Determine minimimal complete DFA regconized the languages
Motivation
consisting of all strings where all ’a’ is followed by a ’b’ and all ’c’ is
Alphabets, words and
followed by a ’b’. languages
Non-deterministic
finite automata
Deterministic finite
automata
Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.58
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
σ = {a, b, c, d}
Contents
Determine minimimal complete DFA regconized the languages
Motivation
consisting of all strings where all ’a’ is followed by a ’b’ and all ’c’ is
Alphabets, words and
followed by a ’b’. languages
Non-deterministic
σ = {a, b} finite automata
Deterministic finite
Give a NFA (as simple as possible) for the language defined by the automata
regular expression ab∗ + a(ba)∗ . Then determine the equivalent DFA. Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.58
Automata
Exercise
TVHoai, HTNguyen,
NAKhuong, LHTrang
Let Σ = {a, b, c}
Determine minimimal DFA regconized the languages represented by the
following regular expressions:
Contents
1 a∗ + b∗ ,
Motivation
2 a∗ b + b∗ a, Alphabets, words and
languages
3 b(ca + ac)(aa)∗ + a∗ (a + b), Regular expression or
rationnal expression
4 (a∗ b + b∗ a)∗ .
Non-deterministic
Deterministic finite
6 b(c + c)(aa)∗ + (a + c)a∗ , automata
Recognized languages
7 aab + cab∗ ac, Determinisation
∗ DFAs combination
9 ab(b + c)ab + ba(c + b) + (b + c)ab(b + c).
Some applications
4.59
Automata
Equivalent automatons
TVHoai, HTNguyen,
NAKhuong, LHTrang
q0 p0 p3 Contents
a Motivation
Non-deterministic
a finite automata
Deterministic finite
q1 q2 p1 a p2
automata
Recognized languages
Determinisation
a Minimization
b b DFAs combination
Some applications
4.60
Automata
Equivalent automatons
TVHoai, HTNguyen,
NAKhuong, LHTrang
q0 p0 p3 Contents
b Motivation
Non-deterministic
a finite automata
Deterministic finite
q1 q2 p1 a p2
automata
Recognized languages
Determinisation
a Minimization
b b DFAs combination
Some applications
4.61
Automata
Combination of two automata
TVHoai, HTNguyen,
NAKhuong, LHTrang
Σ = {a, b}
Contents
a) Given two languages La , Lb defined by regular expressions
Motivation
Ea = a(a + b)∗ and Eb = a∗ (ba)∗
Alphabets, words and
languages
b) Give a DFA for the language La , Lb .
Regular expression or
c) Then, determine a (minimized) DFA for the following languages. rationnal expression
Non-deterministic
1 L1 ◦ Lb
= La T finite automata
2 L2 = La S Lb Deterministic finite
automata
3 L3 = La Lb
Recognized languages
4 L4 = La \ Lb
Determinisation
Minimization
DFAs combination
Some applications
4.62
Automata
Combination of two automata
TVHoai, HTNguyen,
NAKhuong, LHTrang
Σ = {a, b}
Contents
a) Given two languages La , Lb defined by regular expressions
Motivation
Ea = (a∗ b + b∗ a)+ and Eb = (a + b)∗ b(a + b)∗ a
Alphabets, words and
languages
b) Give a DFA for the language La , Lb .
Regular expression or
c) Then, determine a (minimized) DFA for the following languages. rationnal expression
Non-deterministic
1 L1 ◦ Lb
= La T finite automata
2 L2 = La S Lb Deterministic finite
automata
3 L3 = La Lb
Recognized languages
4 L4 = La \ Lb
Determinisation
Minimization
DFAs combination
Some applications
4.62
Automata
Combination of two automata
TVHoai, HTNguyen,
NAKhuong, LHTrang
Σ = {a, b}
Contents
a) Given two languages La , Lb defined by regular expressions
Motivation
Ea = ab∗ + a(ba)∗ and Eb = baa∗ + ab + (a + b)ab∗
Alphabets, words and
languages
b) Give a DFA for the language La , Lb .
Regular expression or
c) Then, determine a (minimized) DFA for the following languages. rationnal expression
Non-deterministic
1 L1 ◦ Lb
= La T finite automata
2 L2 = La S Lb Deterministic finite
automata
3 L3 = La Lb
Recognized languages
4 L4 = La \ Lb
Determinisation
Minimization
DFAs combination
Some applications
4.62
Automata
Odd Parity Detector
TVHoai, HTNguyen,
NAKhuong, LHTrang
Contents
Motivation
Regular expression or
rationnal expression
Non-deterministic
finite automata
Deterministic finite
automata
Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.63
Automata
TCP/IP protocol
TVHoai, HTNguyen,
NAKhuong, LHTrang
Contents
Motivation
Regular expression or
rationnal expression
Non-deterministic
finite automata
Deterministic finite
automata
Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.64
Automata
Application
TVHoai, HTNguyen,
NAKhuong, LHTrang
Contents
Propose an automata to describe a vehicular multi-information
Motivation
display system with a given number of buttons.
Alphabets, words and
languages
For example, digital speedo meter of Honda Lead motor with only Regular expression or
rationnal expression
one button can display information about: petroleum level, speed, Non-deterministic
trip, date, time, engine oil life. finite automata
(Hint: we distinguish two different actions: quickly press the Deterministic finite
automata
button; press the button and hold-down over two seconds.) Recognized languages
Determinisation
Minimization
DFAs combination
Some applications
4.65