Presentation is loading. Please wait.

Presentation is loading. Please wait.

These material has been reproduced and presented to you by KM Khan Afridi for IDEA only. Do not forget me in DUA Warning: The information herein is for.

Similar presentations


Presentation on theme: "These material has been reproduced and presented to you by KM Khan Afridi for IDEA only. Do not forget me in DUA Warning: The information herein is for."— Presentation transcript:

1 These material has been reproduced and presented to you by KM Khan Afridi for IDEA only. Do not forget me in DUA Warning: The information herein is for idea purposes only and I cannot guarantee the accuracy of any information provided in this presentation.. I makes no warranties, express, implied or statutory, as to the information in this presentation. This Presentation is protected by copyright laws and VU Plagiarism Policy. Unauthorized reproduction or distribution of this Presentation, or any portion of it, may result in severe civil and criminal penalties, and will be prosecuted to the maximum extent possible under law.

2 Converting Finite Automata into Regular Expressions CS402

3 Kleene’s Theorem Regular Expression Finite Automaton NFA-  GTG TGNFA

4 First Three Proofs Every Finite Automaton is a NFA Every NFA is a Transition Graph. Every Transition Graph is a Generalised Transition Graph.

5 How to convert a Generalised Transition Graph into a Regular Expression

6 Make a unique Start State with no input transitions Are there any Final States ? Make a unique Final State with no output transitions Eliminate multiple loops Eliminate multiple edges Is the number of states > 2? Eliminate a state which is NOT the Start state or the Final state Is the GTG connected? Write  Write the label NO YES

7 Make a unique Start State - -...

8 Make a unique Start State - -... -  

9 Make a unique Start State... -  

10 Make a unique Final State + +...

11 Make a unique Final State + +... +  

12 Make a unique Final State... +  

13 Eliminate multiple loops... R1R1 R2R2 R3R3 R 1 + R 2 + R 3

14 Eliminate multiple edges... R1R1 R2R2 R3R3 R 1 + R 2 + R 3...

15 State Elimination

16 ... R1R1 R2R2 12 R 1 R 2 1 2

17 ... R 1 (S)* R 2 1 2... R1R1 R2R2 12 S

18 R1R1 R2R2 13 S 2 4 R3R3 R4R4 R 1 (S )* R 3 1 3 4 2... R 1 (S )* R 2 R 1 (S )* R 4

19 ... R1R1 R2R2 13 S 2 R3R3 R4R4 R 1 (S )* R 3 1 3 2... R 1 (S )* R 2 R 1 (S )* R 4

20 ... R1R1 R2R2 1 3 S 2 4 R3R3 R4R4 5 R5R5 R 1 (S )* R 3 1 3 4 2... R 1 (S )* R 4... 5 R 1 (S )* R 2 R 5 (S )* R 2 R 5 (S )* R 4 R 5 (S )* R 3

21 ... R1R1 R2R2 1 3 S 2 4 R3R3 R4R4 5 R5R5 1 3 2 4 5

22 R1R1 R2R2 1 3 S 2 4 R3R3 R4R4 5 R5R5 1 3 2 4 5

23 Revision Know Kleene’s Theorem Be able to convert FAs into Regular Expressions Preparation Read –Lectures 11 and 12, Practice on Example


Download ppt "These material has been reproduced and presented to you by KM Khan Afridi for IDEA only. Do not forget me in DUA Warning: The information herein is for."

Similar presentations


Ads by Google