Presentation is loading. Please wait.

Presentation is loading. Please wait.

2110711 THEORY OF COMPUTATION 08 KLEENE’S THEOREM.

Similar presentations


Presentation on theme: "2110711 THEORY OF COMPUTATION 08 KLEENE’S THEOREM."— Presentation transcript:

1 THEORY OF COMPUTATION 08 KLEENE’S THEOREM

2 IMPORTANT All three methods of defining languages regular expression, acceptance by finite automata and acceptance by transition graph are equivalent

3 KLEENE’S THEOREM 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.

4 KLEENE’S THEOREM 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.

5 KLEENE’S THEOREM 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 graph Guarantee to finish its job in a finite time.

6 KLEENE’S THEOREM STATEGY Only one initial state. A B C 110 E 01 D

7 KLEENE’S THEOREM STATEGY Only one initial state. … A B S C E D   110
A B S C 110 E 01 D

8 KLEENE’S THEOREM STATEGY Only one final state. 010 A B C 110 E 01 D

9 KLEENE’S THEOREM STATEGY Only one final state. … A B F C E D 010  110
A B F C 110 E 01 D

10 KLEENE’S THEOREM R, S, T be regular expressions.
STATEGY Eliminate all internal states. Let A be any state in a transition graph. r, s and t be any substrings. r s R+S+T A A t R, S, T be regular expressions.

11 KLEENE’S THEOREM STATEGY Eliminate all internal states. Let A,B be states in a transition graph. r, s, t and u be any substrings. r u r u s A B S+T B A t S, T be regular expressions.

12 KLEENE’S THEOREM C B … … A … … B A S, T be regular expressions.
STATEGY Eliminate all internal states. Let A,B be states in a transition graph. r, s, t and u be any substrings. r t C B A s ST B A r S, T be regular expressions.

13 KLEENE’S THEOREM C B … … A … … B A S, T, U be regular expressions.
STATEGY Eliminate all internal states. Let A,B be states in a transition graph. r, s, t and u be any substrings. r t u C B A s SU*T B A r S, T, U be regular expressions.

14 KLEENE’S THEOREM EXAMPLE C 010 110 A B 01 D 00 E

15 KLEENE’S THEOREM EXAMPLE C 010 110 A B 01 D 0(010)*00 E

16 KLEENE’S THEOREM EXAMPLE C 010 110 A B D 0(010)*01 0(010)*00 E

17 KLEENE’S THEOREM … C A B D E EXAMPLE 010 0(010)*110 0(010)*01
A B D 0(010)*01 0(010)*00 E

18 KLEENE’S THEOREM EXAMPLE C 0(010)*110 A D 0(010)*01 0(010)*00 E

19 KLEENE’S THEOREM … C A B D
Eliminate B, by create AC = r1r2*r3 create AD = r1r2*r4 delete AB erase B when B has no input. r2 C r3 r1 A B r4 D

20 KLEENE’S THEOREM Determine the regular expression corresponding to this transition graph. r6 r3 r1 r5 r2 r4 A B C r8 r7 r9

21 KLEENE’S THEOREM 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.

22 CONCLUSION 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*.


Download ppt "2110711 THEORY OF COMPUTATION 08 KLEENE’S THEOREM."

Similar presentations


Ads by Google