Presentation is loading. Please wait.

Presentation is loading. Please wait.

Non-Deterministic Finite Automata

Similar presentations


Presentation on theme: "Non-Deterministic Finite Automata"— Presentation transcript:

1 Non-Deterministic Finite Automata
Prof. Busch - LSU

2 Alphabet = Two choices No transition No transition Prof. Busch - LSU

3 An NFA accepts a string: if there is a computation of the NFA
that accepts the string i.e., all the input string is processed and the automaton is in an accepting state Prof. Busch - LSU

4 is accepted by the NFA: “accept” “reject” because this computation
accepts this computation is ignored Prof. Busch - LSU

5 Rejection example Prof. Busch - LSU

6 Another Rejection example
Prof. Busch - LSU

7 OR An NFA rejects a string: if there is no computation of the NFA
that accepts the string. For each computation: All the input is consumed and the automaton is in a non accepting state OR The input cannot be consumed Prof. Busch - LSU

8 Language accepted: Prof. Busch - LSU

9 Lambda Transitions Prof. Busch - LSU

10 Language accepted: Prof. Busch - LSU

11 Another NFA Example Prof. Busch - LSU

12 Language accepted Prof. Busch - LSU

13 Formal Definition of NFAs
Set of states, i.e. Input aplhabet, i.e. Transition function Initial state Accepting states Prof. Busch - LSU

14 Prof. Busch - LSU

15 Prof. Busch - LSU

16 Prof. Busch - LSU

17 In general : there is a walk from to with label Prof. Busch - LSU

18 The Language of an NFA The language accepted by is: where
and there is some (accepting state) Prof. Busch - LSU

19 Prof. Busch - LSU

20 Equivalence of Machines
Definition: Machine is equivalent to machine if Prof. Busch - LSU

21 Example of equivalent machines
NFA DFA Prof. Busch - LSU

22 Theorem: Languages accepted Regular by NFAs Languages Languages
by DFAs NFAs and DFAs have the same computation power, accept the same set of languages Prof. Busch - LSU

23 Every DFA is trivially an NFA
Proof-Step 1 Languages accepted by NFAs Regular Languages Every DFA is trivially an NFA Any language accepted by a DFA is also accepted by an NFA Prof. Busch - LSU

24 Any NFA can be converted to an equivalent DFA
Proof-Step 2 Languages accepted by NFAs Regular Languages Any NFA can be converted to an equivalent DFA Any language accepted by an NFA is also accepted by a DFA Prof. Busch - LSU

25 Conversion NFA to DFA NFA DFA Prof. Busch - LSU

26 NFA DFA Prof. Busch - LSU

27 END OF CONSTRUCTION NFA DFA Prof. Busch - LSU


Download ppt "Non-Deterministic Finite Automata"

Similar presentations


Ads by Google