Athasit Surarerks 2110711 THEORY OF COMPUTATION 08 KLEENE’S THEOREM.
-
Upload
suzan-arlene-floyd -
Category
Documents
-
view
223 -
download
2
Transcript of Athasit Surarerks 2110711 THEORY OF COMPUTATION 08 KLEENE’S THEOREM.
Athasit Surarerks
2110711THEORY OF COMPUTATION
08 KLEENE’S THEOREM
IMPORTANT2
All three methods of defining languages regular expression, acceptance by finite automata and acceptance by transition
graph are equivalent
KLEENE’S THEOREM3
Language accepted by a deterministic finite automaton can be defined by a transition graph.
Language accepted by a transition graph can be defined by a regular expression.
Language generated by a regular expression can be defined by a deterministic finite automaton.
KLEENE’S THEOREM4
Language accepted by a deterministic finite automaton can be defined by a transition graph.
Language accepted by a transition graph can be defined by a regular expression.
Language generated by a regular expression can be defined by a deterministic finite automaton.
KLEENE’S THEOREM5
Proof:Language accepted by a transition graph can be defined by a regular expression.
Given a transition graph TG.Find a regular expression that defines the same language.Construct an algorithm that satisfies two criteria.Work for every conceivable transition graphGuarantee to finish its job in a finite time.
KLEENE’S THEOREM6
STATEGYOnly one initial state.
A
C
D
B
E
…
0
01
110
KLEENE’S THEOREM7
STATEGYOnly one initial state.
A
C
D
B
E
…
0
01
110S
KLEENE’S THEOREM8
STATEGYOnly one final state.
A
C
D
B
E
…
0
01
110
010
KLEENE’S THEOREM9
STATEGYOnly one final state.
A
C
D
B
E
…
0
01
110
010
F
KLEENE’S THEOREM1
0
STATEGYEliminate all internal states.
Let A be any state in a transition graph.r, s and t be any substrings.
A
t
r s
… … A
R+S+T
… …
R, S, T be regular expressions.
KLEENE’S THEOREM1
1
STATEGYEliminate all internal states.
Let A,B be states in a transition graph.r, s, t and u be any substrings.
B
t
r
s
……
A
u
B
r
S+T……A
u
S, T be regular expressions.
KLEENE’S THEOREM1
2
STATEGYEliminate all internal states.
Let A,B be states in a transition graph.r, s, t and u be any substrings.
r
… AB
t
…C
S, T be regular expressions.
s
A B…r
…ST
KLEENE’S THEOREM1
3
STATEGYEliminate all internal states.
Let A,B be states in a transition graph.r, s, t and u be any substrings.
r
… AB
t
…C
S, T, U be regular expressions.
s
A B…r
…SU*T
u
KLEENE’S THEOREM1
4
EXAMPLE
A
C
DB
E
…0
01
110010
00
KLEENE’S THEOREM1
5
EXAMPLE
A
C
DB
E
…0
01
110010
0(010)*00
KLEENE’S THEOREM1
6
EXAMPLE
A
C
DB
E
…0
0(010)*01
110010
0(010)*00
KLEENE’S THEOREM1
7
EXAMPLE
A
C
DB
E
…0
0(010)*01
0(010)*110010
0(010)*00
KLEENE’S THEOREM1
8
EXAMPLE
A
C
D
E
…0(010)*01
0(010)*110
0(010)*00
KLEENE’S THEOREM1
9
Eliminate B, by create AC = r1r2*r3
create AD = r1r2*r4
delete ABerase B when B has no input.
A
C
DB
…r1
r4
r3
r2
KLEENE’S THEOREM2
0
Determine the regular expression corresponding to this transition graph.
A CB
r1
r2
r3
r4
r5
r6
r7r8
r9
KLEENE’S THEOREM2
1
Proof:Language generated by a regular expression can be defined by a deterministic finite automaton.
Given a regular expression.Find an automaton that defines the same language.Construct an algorithm that satisfies two criteria.Accepts any particular letter of the alphabet. (or )Close under +, concatenation and Kleene’s star.
CONCLUSION2
2
Let FA1 accepts the language defined by regular expression r1,
FA2 accepts the language defined by regular expression r2.
Then there is a FA3 accepts the language (r1+r2).
Then there is a FA4 accepts the language r1r2.
Then there is a FA5 accepts the language r*.