Lesson_10.pptx data science technology to create self-driving cars
1. Lecture # 10 Recap lecture 9
TGs accepting the languages: containing aaa
or bbb, beginning and ending in different
letters, beginning and ending in same letters,
EVEN-EVEN, a’s occur in even clumps and
ends in three or more b’s, example showing
different paths traced by one string,
Definition of GTG
2. Task Solution …
Build a TG accepting the language L of
strings, defined over Σ={a, b}, beginning
with and ending in the same letters
Solution:The language L may be expressed
by
a+b+a(a + b)*
a + b(a + b)*
b
The language L may be accepted by the
following TG
4. Generalized Transition Graphs
A generalized transition graph (GTG) is a
collection of three things
1) Finite number of states, at least one of
which is start state and some (maybe
none) final states.
2) Finite set of input letters (Σ) from which
input strings are formed.
3) Directed edges connecting some pair of
states labeled with regular expression.
It may be noted that in GTG, the labels of
transition edges are corresponding
regular expressions
5. Example
Consider the language L of strings, defined
over Σ={a , b}, containing double a or double
b. The language L can be expressed by the
following regular expression
(a + b)*
(aa + bb) (a + b)*
The language L may be accepted by the
following GTG.
7. Example
Consider the Language L of strings, defined
over Σ = {a, b}, beginning with and ending
in same letters.
The language L may be expressed by the
following regular expression
(a + b) + a(a + b)*
a + b(a + b)*
b
This language may be accepted by the
following GTG
9. Example
Consider the language L of strings of, defined
over Σ = {a, b}, beginning and ending in
different letters.
The language L may be expressed by RE
a(a + b)*
b + b(a + b)*
a
The language L may be accepted by the
following GTG
12. Example
Consider the language L of strings, defined
over Σ={a, b}, having triple a or triple b.
The language L may be expressed by RE
(a+b)*
(aaa + bbb) (a+b)*
This language may be accepted by the
following GTG
14. Nondeterminism
TGs and GTGs provide certain relaxations i.e.
there may exist more than one path for a
certain string or there may not be any path
for a certain string, this property creates
nondeterminism and it can also help in
differentiating TGs or GTGs from FAs. Hence
an FA is also called a Deterministic Finite
Automaton (DFA).
15. Kleene’s Theorem
If a language can be expressed by
1. FA or
2. TG or
3. RE
then it can also be expressed by other two
as well.
It may be noted that the theorem is proved,
proving the following three parts
16. Kleene’s Theorem continued …
Kleene’s Theorem Part I
If a language can be accepted by an FA then it
can be accepted by a TG as well.
Kleene’s Theorem Part II
If a language can be accepted by a TG then it
can be expressed by an RE as well.
Kleene’s Theorem Part III
If a language can be expressed by a RE then it
can be accepted by an FA as well.
17. Kleene’s Theorem continued …
Proof(Kleene’s Theorem Part I)
Since every FA can be considered to be a TG
as well, therefore there is nothing to prove.
18. Summing Up
Definition of GTG, examples of GTG accepting
the languages of strings: containing aa or bb,
beginning with and ending in same letters,
beginning with and ending in different
letters, containing aaa or bbb,
Nondeterminism, Kleene’s theorem (part I,
part II, part III), proof of Kleene’s theorem
part I