LECTURE 4
THEORY OF
@ AUTOMATAFINITE AUTOMATON (FA)
o FA corresponding to finite languages.
o Example
* Consider the language L = {A, b, ab, bb}, defined over E ={a,
b}, expressed by A+ b+ ab+bb ORA+b(A+atb).
+ The language L may be accepted by the following FA
~S
abFINITE AUTOMATON (FA)
o Dead State
« It is to be noted that the states x and y are called
Dead States, Waste Baskets, as the moment one
enters these states there is no way to leave it.
o Tree structure
« To build an FA accepting the language having less
number of strings, the tree structure may also help in
this regard, which can be observed in the following
transition diagram for the Language L, discussed in the
above exampleFINITE AUTOMATON (FA)
o Tree structureTRANSITION GRAPH
o Definition:
o A Transition graph (TG), is a collection of the
followings
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 (Z) from which input
strings are formed.
8) Finite set of transitions that show how to go from
one state to another based on reading specified
substrings of input letters, possibly even the null
string (A).TRANSITION GRAPH
o In TG there may exist more than one paths for
certain string, while there may not exist any path
for certain string as well.
o If there exists at least one path for a certain
string, starting from initial state and ending ina
final state, the string is supposed to be accepted
by the TG, otherwise the string is supposed to be
rejected.
o Obviously collection of accepted strings is the
language accepted by the TG.TRANSITION GRAPH
o Example
« Consider the Language L , defined over ¥ = {a, b} of all
strings including A. The language L may be
accepted by the following TG
: g
ab
ofTRANSITION GRAPH
o Example
« Consider the following TGs
« TG:
+ TG2: = ih @
* TG3 OQ.TRANSITION GRAPH
o Every FA is a TG as well, but the converse
may not be true
« Thus none of TG1, TG2 and TG3 accepts any string,
i.e. these TGs accept empty language. It may be noted
that
« TG1 and TG2 are TGs but not FA, while TG3 is both
TG and FA as well.
« Every FA is a TG as well, but the converse may not
be true, i.e. every TG may not be an FA.TRANSITION GRAPH
o Example
« Consider the language L of strings, defined over D={a,
b}, starting with b. The language L may be
expressed by RE b(a + b)* , may be accepted by the
following TG
Q——
abTRANSITION GRAPH
o Example
« Consider the language L of strings, defined over U={a,
b}, not ending in b. The language L may be
expressed by RE: A + (a + b)*a , may be accepted by
the following TGGENERALIZED TRANSITION GRAPHS
o A generalized transition graph (GTG) is a
collection of three things
Db
Finite number of states, at least one of which is
start state and some (maybe none) final states.
Finite set of input letters (Z) from which input
strings are formed.
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.GENERALIZED TRANSITION GRAPHS
o Example
« Consider the language L of strings, defined over E =
{a,b}, containing double a or double b. The
language L can be expressed by the following
regular expression (at+b)* (aa + bb) (a+b)*
« The language L may be accepted by the following
GTG.
ath ath
: arb “GENERALIZED TRANSITION GRAPHS
o 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
C2
ee
C-
al atb)"b
Cc)GENERALIZED TRANSITION GRAPHS
o The language L may be accepted by the following
GTG as well
bath) a+ af atb) bNONDETERMINISM
o 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).