1 Non-Deterministic Finite Automata. 2 Alphabet = Nondeterministic Finite Automaton (NFA)

Slides:



Advertisements
Similar presentations
1 Non Deterministic Automata. 2 Alphabet = Nondeterministic Finite Accepter (NFA)
Advertisements

1 Non Deterministic Automata. 2 Alphabet = Nondeterministic Finite Accepter (NFA)
Lecture 6 Nondeterministic Finite Automata (NFA)
Pushdown Automata Section 2.2 CSC 4170 Theory of Computation.
Nondeterministic Finite Automata CS 130: Theory of Computation HMU textbook, Chapter 2 (Sec 2.3 & 2.5)
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 2 Mälardalen University 2005.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
CS21 Decidability and Tractability
Lecture 3UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 3.
CS5371 Theory of Computation
Costas Busch - RPI1 Pushdown Automata PDAs. Costas Busch - RPI2 Pushdown Automaton -- PDA Input String Stack States.
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
Courtesy Costas Busch - RPI1 Pushdown Automata PDAs.
Finite Automata Finite-state machine with no output. FA consists of States, Transitions between states FA is a 5-tuple Example! A string x is recognized.
Fall 2006Costas Busch - RPI1 Deterministic Finite Automata And Regular Languages.
Lecture 3 Goals: Formal definition of NFA, acceptance of a string by an NFA, computation tree associated with a string. Algorithm to convert an NFA to.
1 Finite Automata. 2 Finite Automaton Input “Accept” or “Reject” String Finite Automaton Output.
Fall 2004COMP 3351 Pushdown Automata PDAs. Fall 2004COMP 3352 Pushdown Automaton -- PDA Input String Stack States.
Fall 2006Costas Busch - RPI1 Pushdown Automata PDAs.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Nondeterminism.
Lecture 3 Goals: Formal definition of NFA, acceptance of a string by an NFA, computation tree associated with a string. Algorithm to convert an NFA to.
Fall 2006Costas Busch - RPI1 Non-Deterministic Finite Automata.
1 Non-Deterministic Automata Regular Expressions.
Finite Automata Costas Busch - RPI.
Fall 2004COMP 3351 Another NFA Example. Fall 2004COMP 3352 Language accepted (redundant state)
Costas Busch - LSU1 Non-Deterministic Finite Automata.
Prof. Busch - LSU1 Pushdown Automata PDAs. Prof. Busch - LSU2 Pushdown Automaton -- PDA Input String Stack States.
Fall 2005Costas Busch - RPI1 Pushdown Automata PDAs.
Nondeterminism (Deterministic) FA required for every state q and every symbol  of the alphabet to have exactly one arrow out of q labeled . What happens.
Nondeterministic Finite Automata CS 130: Theory of Computation HMU textbook, Chapter 2 (Sec 2.3 & 2.5)
REGULAR LANGUAGES.
Fall 2006Costas Busch - RPI1 Deterministic Finite Automaton (DFA) Input Tape “Accept” or “Reject” String Finite Automaton Output.
4b 4b Lexical analysis Finite Automata. Finite Automata (FA) FA also called Finite State Machine (FSM) –Abstract model of a computing entity. –Decides.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2010.
Lecture # 12. Nondeterministic Finite Automaton (NFA) Definition: An NFA is a TG with a unique start state and a property of having single letter as label.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
NFA defined. NFA A Non-deterministic Finite-state Automata (NFA) is a language recognizing system similar to a DFA. It supports a level of non-determinism.
CSC3315 (Spring 2009)1 CSC 3315 Lexical and Syntax Analysis Hamid Harroud School of Science and Engineering, Akhawayn University
CSCI 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Pushdown.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2007.
Formal Languages Finite Automata Dr.Hamed Alrjoub 1FA1.
CS 154 Formal Languages and Computability February 9 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron.
Algorithms for hard problems Automata and tree automata Juris Viksna, 2015.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2006.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
WELCOME TO A JOURNEY TO CS419 Dr. Hussien Sharaf Dr. Mohammad Nassef Department of Computer Science, Faculty of Computers and Information, Cairo University.
Costas Busch - LSU1 Deterministic Finite Automata And Regular Languages.
Fall 2004COMP 3351 Finite Automata. Fall 2004COMP 3352 Finite Automaton Input String Output String Finite Automaton.
WELCOME TO A JOURNEY TO CS419 Dr. Hussien Sharaf Dr. Mohammad Nassef Department of Computer Science, Faculty of Computers and Information, Cairo University.
Finite Automata.
Nondeterminism The Chinese University of Hong Kong Fall 2011
Non Deterministic Automata
Pushdown Automata PDAs
Pushdown Automata PDAs
Pushdown Automata PDAs
Pushdown Automata PDAs
Chapter 2 FINITE AUTOMATA.
CSE322 Finite Automata Lecture #2.
Deterministic Finite Automata And Regular Languages Prof. Busch - LSU.
Non-Deterministic Finite Automata
Principles of Computing – UFCFA3-30-1
COSC 3340: Introduction to Theory of Computation
Non-Deterministic Finite Automata
CSE322 Definition and description of finite Automata
Non Deterministic Automata
Finite Automata.
Chapter # 5 by Cohen (Cont…)
Non Deterministic Automata
Nondeterminism The Chinese University of Hong Kong Fall 2010
Presentation transcript:

1 Non-Deterministic Finite Automata

2 Alphabet = Nondeterministic Finite Automaton (NFA)

3 Two choices Alphabet =

4 No transition Two choices No transition Alphabet =

5 First Choice

6

7

8 “accept” First Choice All input is consumed

9 Second Choice

10 Second Choice

11 Second Choice No transition: the automaton hangs

12 Second Choice “reject” Input cannot be consumed

13 An NFA accepts a string: when there is a computation of the NFA that accepts the string all the input is consumed and the automaton is in an accepting state There is a computation:

14 Example is accepted by the NFA: “accept” “reject” because this computation accepts

15 Rejection example

16 First Choice

17 First Choice “reject”

18 Second Choice

19 Second Choice

20 Second Choice “reject”

21 An NFA rejects a string: when there is no computation of the NFA that accepts the string. All the input is consumed and the automaton is in a non final state The input cannot be consumed OR For each computation:

22 Example is rejected by the NFA: “reject” All possible computations lead to rejection

23 Rejection example

24 First Choice

25 First Choice No transition: the automaton hangs

26 “reject” First Choice Input cannot be consumed

27 Second Choice

28 Second Choice

29 Second Choice No transition: the automaton hangs

30 Second Choice “reject” Input cannot be consumed

31 is rejected by the NFA: “reject” All possible computations lead to rejection

32 Language accepted:

33 Lambda Transitions

34

35

36 (read head does not move)

37

38 “accept” String is accepted all input is consumed

39 Rejection Example

40

41 (read head doesn’t move)

42 No transition: the automaton hangs

43 “reject” String is rejected Input cannot be consumed

44 Language accepted:

45 Another NFA Example

46

47

48

49 “accept”

50 Another String

51

52

53

54

55

56

57 “accept”

58 Language accepted

59 Another NFA Example

60 Language accepted (redundant state)

61 Remarks: The symbol never appears on the input tape Simple automata:

62 NFA FA NFAs are interesting because we can express languages easier than FAs

63 Formal Definition of NFAs Set of states, i.e. Input aplhabet, i.e. Transition function Initial state Accepting states

64 Transition Function

65

66

67

68 Extended Transition Function

69

70

71 Formally : there is a walk from to with label

72 The Language of an NFA

73

74

75

76

77 Formally The language accepted by NFA is: where and there is some (accepting state)

78