Presentation is loading. Please wait.

Presentation is loading. Please wait.

Prof. Busch - LSU1 NFAs accept the Regular Languages.

Similar presentations


Presentation on theme: "Prof. Busch - LSU1 NFAs accept the Regular Languages."— Presentation transcript:

1 Prof. Busch - LSU1 NFAs accept the Regular Languages

2 Prof. Busch - LSU2 Equivalence of Machines Definition: Machine is equivalent to machine if

3 Prof. Busch - LSU3 NFA DFA Example of equivalent machines

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

5 Prof. Busch - LSU5 Languages accepted by NFAs Regular Languages accepted by NFAs Regular Languages we only need to show Proof: AND

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

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

8 Prof. Busch - LSU8 Conversion NFA to DFA NFA DFA

9 Prof. Busch - LSU9 NFA DFA

10 Prof. Busch - LSU10 NFA DFA empty set trap state

11 Prof. Busch - LSU11 NFA DFA union

12 Prof. Busch - LSU12 NFA DFA union

13 Prof. Busch - LSU13 NFA DFA trap state

14 Prof. Busch - LSU14 NFA DFA END OF CONSTRUCTION

15 Prof. Busch - LSU15 General Conversion Procedure Input: an NFA Output: an equivalent DFA with

16 Prof. Busch - LSU16 The NFA has states The DFA has states from the power set

17 Prof. Busch - LSU17 1. Initial state of NFA: Initial state of DFA: Conversion Procedure Steps step

18 Prof. Busch - LSU18 NFA DFA Example

19 Prof. Busch - LSU19 2. For every DFA’s state compute in the NFA add transition to DFA Union step

20 Prof. Busch - LSU20 NFA DFA Example

21 Prof. Busch - LSU21 3. Repeat Step 2 for every state in DFA and symbols in alphabet until no more states can be added in the DFA step

22 Prof. Busch - LSU22 NFA DFA Example

23 Prof. Busch - LSU23 4. For any DFA state if some is accepting state in NFA Then, is accepting state in DFA step

24 Prof. Busch - LSU24 NFA DFA Example

25 Prof. Busch - LSU25 If we convert NFA to DFA then the two automata are equivalent: Lemma: Proof: AND We only need to show:

26 Prof. Busch - LSU26 First we show: We only need to prove:

27 Prof. Busch - LSU27 symbols Consider NFA

28 Prof. Busch - LSU28 denotes a possible sub-path like symbol

29 Prof. Busch - LSU29 We will show that if then NFA DFA state label state label

30 Prof. Busch - LSU30 More generally, we will show that if in : (arbitrary string) then NFA DFA

31 Prof. Busch - LSU31 Proof by induction on Induction Basis: is true by construction of NFA DFA

32 Prof. Busch - LSU32 Induction hypothesis: NFA DFA Suppose that the following hold

33 Prof. Busch - LSU33 Induction Step: NFA DFA Then this is true by construction of

34 Prof. Busch - LSU34 Therefore if NFA DFA then

35 Prof. Busch - LSU35 We have shown: With a similar proof we can show: END OF LEMMA PROOF Therefore:


Download ppt "Prof. Busch - LSU1 NFAs accept the Regular Languages."

Similar presentations


Ads by Google