Lesson 11
Lesson 11
1
Kleene’s Theorem continued …
2
Kleene’s Theorem part II
continued …
b
b
1- 3+
aa
a
a
2- 4+
bb
4
Example Continued ...
b
b
1 3+
Λ aa
- a
Λ a
2 4+
bb
5
Kleene’s Theorem part II
continued …
Step 2:
If a TG has more than one final states, then
introduce a new final state, connecting the old
final states to the new final state by the
transitions labeled by Λ.
This step can be shown by the previous
example of TG, where the step 1 has already
been processed
6
Example
b
b
1 3+
Λ aa
- a
Λ a
2 4+
bb
7
Example continued …
b
b
1 3
Λ aa Λ
- a +
Λ a Λ
2 4
bb
8
Kleene’s Theorem part II
continued …
Step 3:
If a state has two (more than one) incoming
transition edges labeled by the corresponding
REs, from the same state (including the
possibility of loops at a state), then replace all
these transition edges with a single transition
edge labeled by the sum of corresponding REs.
This step can be shown by a part of TG in the
following example
9
Example
r3
r1
…. 4 5 ….
r2
r4
r3+r4
r1+r2
…. 4 5 ….
10
Note
The step 3 can be generalized to any finite
number of transitions as shown below
r1
r2
…. 5 ….
….
rn
The above TG can be reduced to
r1+r2 + … +rn
…. 5 ….
11
Kleene’s Theorem part II
continued …
12
Example
r3
r2 r4
…. 4 5 6 ….
r2r3*r4
…. 4 6 ….
r1r2*r3
…. 2 4 ….
14
Example
15
Example continued ...
…. ….
2 4
r6 + r8r5*r4
(r1 +r3 r5* r4 )+(r2 +r3 r5* r7 )(r9 +r8 r5* r7 )*(r6 +r8 r5* r4 )
…. ….
2 16
Note
17
Example
aa,b
2+
aaa
ab,ba
- 1
bba
3+
18
Example continued …
aa+b
2
aaa Λ
ab+ba
- 1
4+
bba Λ
3
- (ab+ba)(aa+b)*(aaa+bba)
+
20
Summing Up
21