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 Transition Graphs, NFA and NFA-  CSE2303 Formal Methods I Lecture 4

3 Overview Nondeterministic Finite Automata (NFA) NFA-  Transition Graphs Generalised Transition Graphs

4 A Finite Automaton is a collection of: A finite set of states –One called the Start State –Some (maybe none) called Final States An alphabet of possible input letters A finite set of transitions –That tell for each state and each letter in the alphabet which state to go to next. Note: There is an unique transition from any state for each letter in the alphabet.

5 Some Generalizations of Finite Automaton For every state and letter there is not an unique transition. Change state without reading any letter. Read more than one letter at a time. Read strings which match regular expressions.

6 NFA Definition Like an FA except for transitions Transitions –For some states and letters there is a transition. So for a given letter and state there may be: –No transition –More than one transition

7 aba - + FA aab a b b a,b - + aab NFA a,b

8 ab + abb + baa - + + + a a aa b bb b

9 Is abbbabbbabba accepted? b a a,b a b - + a a b bb a a b b

10 Properties If there is no transition for the current letter and state the machine crashes. Paths from the Start State to a Final State for a given input: –One –None –Several (Nondeterministic) Accept a string if there is at least one path from the Start State to a Final State. Reject a string if there are no paths from the Start State to a Final State.

11 NFA-  Definition Like an NFA except for transitions Transitions –For some states and letters there is a transition. –The labels may include the empty word . NFA NFA- . In some books what they call NFA is what we call NFA- .

12  a a a b b b - + a(aa + bb)*b   

13 Transition Graph Definition Like an NFA except for start states and transitions Transitions –Go from some states to some other states. –Labeled by strings of letters from the alphabet. –The labels may include the empty word . Start states –Maybe more than one.

14 EVEN-EVEN ab, ba aa bb 

15 Is abbbabbbabba accepted? bbb a a,b ab b - + a a bbb bb a a b b

16 Generalised Transition Graph Definition Like an TG except for transitions Transitions –Go from some states to some other states. –Labeled by regular expressions formed from the letters from the alphabet.

17 b + ab(bb)*a - + Is aabababbaa accepted? b + a(bb)*ba ab(bb)* (bb)*a a(bb)*(bb)* (bb)*ba ab(bb)*ba a(bb)*a

18 Types of Automata FA –For each state and letter there is a unique transition. NFA –For some states and letters there is a transition. NFA-  –For some states and letters and  is a transition.

19 Types of Transition Graphs TG –For some states and strings there is a transition. –Maybe more than one start state. GTG –For some states and regular expressions there is a transition. –Maybe more than one start state.

20 Revision For NFA, NFA- , TG, and GTG you need to know: –What they are and how to use them. Preparation Read –Text Book Chapter 7


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