Lesson 17
Lesson 17
a
1- a a
, b
3 b a
5
Solution of the Task
2 4+
a
a
1- a a
, b
3 b a
5
1- a 4+
+b ba*a
3
+b a(+aa*a)
a(+aa*a)
3 4+
ba*a
a(+aa*a)+(+b)(a(+aa*a)+ba*a)
1- 4+
b b
1- 2 3+
Solution of the Task
a, b a, b
b b
1- 2 3+
b a
a b a
b b
x1- x2 x3+
z1- b
z2 z3+ z4+
a b
NFA and Kleene’s Theorem
It has been discussed that, by Kleene’s theorem part
III, there exists an FA corresponding to a given RE.
If the given RE is as simple as r=aa+bbb or
r=a(a+b)*, the corresponding FAs can easily be
constructed. However, for a complicated RE, the RE
can be decomposed into simple REs corresponding to
which the FAs can easily be constructed and hence,
using the method, constructing the FAs
corresponding to sum, concatenation and closure of
FAs, the required FA can also be constructed. It is to
be noted that NFAs also help in proving Kleene’s
theorem part III, as well. Two methods are discussed
in the following.
NFA and Kleene’s Theorem
b +
-
• NFA2
• NFA3
NFA and Kleene’s Theorem
(method 1 ) continued …
Step 2:
As discussed earlier for every NFA there
is an FA equivalent to it, hence there must
be FAs for the above mentioned NFAs as
well. The corresponding FAs can be
considered as follows
NFA and Kleene’s Theorem
(method 1 ) continued …
b a +
–– + ––
FA1 a
a,b FA2 b a,b
1 1
a,b a,b
a,b
a,b
1
FA3
NFA and Kleene’s Theorem
method 2
It may be observed that if an NFA can be built
corresponding to union, concatenation and
closure of FAs corresponding to the REs,
then converting the NFA, thus, obtained into
an equivalent FA, this FA will correspond to
the given RE.
Followings are the procedures showing how
to obtain NFAs equivalent to union,
concatenation and closure of FAs
NFA corresponding to Union
of FAs
Method:
Introduce a new start state and connect it
with the states originally connected with the
old start state with the same transitions as
the old start state, then remove the –ve sign
of old start state. This creates non-
determinism and hence results in an NFA.
Example b
a
x1- x2
• FA1
a b b a
a
x4+ x3
b
a a, b
• FA2 b
y1- y2+
a b
x1 a
- x2
b b
a b a
a b a
x4+ x3
a a, b
b
y1 y2+