Presentation is loading. Please wait.

Presentation is loading. Please wait.

COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.

Similar presentations


Presentation on theme: "COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University."— Presentation transcript:

1 COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University pursuant to Part VB of the Copyright Act 1968 (the Act). The material in this communication may be subject to copyright under the Act. Any further reproduction or communication of this material by you may be the subject of copyright protection under the Act. Do not remove this notice.

2 Converting Regular Expressions into Finite Automata CSE2303 Formal Methods I Lecture 5

3 Overview Questions Kleene’s Theorem Consequences Convert Regular Expressions to NFA-  Convert NFA-  to FA

4 Questions Can every language which is represented by a regular expression be described by a finite automaton? Can every language which is described by a finite automaton be represented by a regular expression? Can every language be represented by a regular expression or a finite automaton?

5 Kleene’s Theorem Any language which can be defined by –Regular Expressions –Finite Automaton –Nondeterministic Finite Automaton (NFA) –NFA-  –Transition Graphs –Generalised Transistion Graphs can be defined by any of the other methods

6 The Complement of Regular Language is a Regular Language Outline of Proof: –Suppose we have a Regular Language. –Therefore we have a regular expression that defines the language. –So, by Kleene’s Theorem, there is a FA that defines this language. –We can convert this FA into one that defines the complement the language. –So, by Kleene’s Theorem, there is a regular expression that defines the complement.

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

8 How to convert a Regular Expression into a NFA- 

9 Converting Regular Expression to NFA-  Start with the graph. -+ Regular Expression

10 Apply the following rules until all edges are labeled with a letter or . 1. Delete any edge labeled with   Transform any edge like RS R into S

11 3. Transform any edge like: into R + S R S

12 4. Transform any edge like: into R* R 

13 1- a b  23+ 4 5    67   a a (a* + aa*b)*

14 How to convert a NFA-  into a FA

15 a b b - a,b a 3 2 41+

16 1- ab  2345+ 

17 1- a b  23+ 4 5    67   a a

18 Revision Understand Kleene’s Theorem Be able to convert Regular Expressions into NFA-  Be able to convert NFA-  into a Finite Automaton Read –Text Book Chapter 8


Download ppt "COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University."

Similar presentations


Ads by Google