Download presentation

Presentation is loading. Please wait.

Published byCael Acomb Modified over 2 years ago

1
1 Non Deterministic Automata

2
2 Alphabet = Nondeterministic Finite Accepter (NFA)

3
3 Two choices Alphabet = Nondeterministic Finite Accepter (NFA)

4
4 No transition Two choices No transition Alphabet = Nondeterministic Finite Accepter (NFA)

5
5 First Choice

6
6

7
7

8
8 “accept” First Choice

9
9 Second Choice

10
10 Second Choice

11
11 Second Choice No transition: the automaton hangs

12
12 Second Choice “reject”

13
13 Observation An NFA accepts a string if there is a computation of the NFA that accepts the string

14
14 Example is accepted by the NFA:

15
15 Lambda Transitions

16
16

17
17

18
18 (read head doesn’t move)

19
19

20
20 “accept” String is accepted

21
21 Language accepted:

22
22 Another NFA Example

23
23

24
24

25
25

26
26 “accept”

27
27 Another String

28
28

29
29

30
30

31
31

32
32

33
33

34
34 “accept”

35
35 Language accepted

36
36 Another NFA Example

37
37 Language accepted

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

39
39 Transition Function

40
40

41
41

42
42

43
43 Extended Transition Function

44
44

45
45

46
46 Formally It holds if and only if there is a walk from to with label

47
47 The Language of an NFA

48
48

49
49

50
50

51
51

52
52 Formally The language accepted by NFA is: where and there is some (final state)

53
53

54
54 Equivalence of NFAs and DFAs

55
55 Equivalence of Machines For DFAs or NFAs: Machine is equivalent to machine if

56
56 Example NFA DFA

57
57 Since machines and are equivalent DFA NFA

58
58 Equivalence of NFAs and DFAs Question: NFAs = DFAs ? Same power? Accept the same languages?

59
59 Equivalence of NFAs and DFAs Question: NFAs = DFAs ? Same power? Accept the same languages? YES!

60
60 We will prove: Languages accepted by NFAs Languages accepted by DFAs

61
61 We will prove: Languages accepted by NFAs Languages accepted by DFAs NFAs and DFAs have the same computation power

62
62 Languages accepted by NFAs Languages accepted by DFAs Step 1

63
63 Languages accepted by NFAs Languages accepted by DFAs Step 1 Proof: Every DFA is also an NFA

64
64 Languages accepted by NFAs Languages accepted by DFAs Step 1 Proof: Every DFA is also an NFA A language accepted by a DFA is also accepted by an NFA

65
65 Languages accepted by NFAs Languages accepted by DFAs Step 2

66
66 Languages accepted by NFAs Languages accepted by DFAs Step 2 Proof: Any NFA can be converted to an equivalent DFA

67
67 Languages accepted by NFAs Languages accepted by DFAs Step 2 Proof: Any NFA can be converted to an equivalent DFA A language accepted by an NFA is also accepted by a DFA

68
68 NFA to DFA NFA DFA

69
69 NFA to DFA NFA DFA

70
70 NFA to DFA NFA DFA

71
71 NFA to DFA NFA DFA

72
72 NFA to DFA NFA DFA

73
73 NFA to DFA NFA DFA

74
74 NFA to DFA NFA DFA

75
75 NFA to DFA: Remarks We are given an NFA We want to convert it to an equivalent DFA With

76
76 If the NFA has states the DFA has states in the powerset

77
77 Procedure NFA to DFA 1. Initial state of NFA: Initial state of DFA:

78
78 Example NFA DFA

79
79 Procedure NFA to DFA 2. For every DFA’s state Compute in the NFA Add transition

80
80 Exampe NFA DFA

81
81 Procedure NFA to DFA Repeat Step 2 for all letters in alphabet, until no more transitions can be added.

82
82 Example NFA DFA

83
83 Procedure NFA to DFA 3. For any DFA state If some is a final state in the NFA Then, is a final state in the DFA

84
84 Example NFA DFA

85
85 Theorem Take NFA Apply procedure to obtain DFA Then and are equivalent :

86
86 Finally We have proven Languages accepted by NFAs Languages accepted by DFAs

87
87 Languages accepted by NFAs Languages accepted by DFAs We have proven Regular Languages

88
88 Languages accepted by NFAs Languages accepted by DFAs We have proven Regular Languages

Similar presentations

Presentation is loading. Please wait....

OK

Biology 2 Plant Kingdom Identification Test Review.

Biology 2 Plant Kingdom Identification Test Review.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on regional transport office ahmedabad Ppt on soft skills development Ppt online shopping project in java Ppt on blue eyes topic Ppt on operator overloading in c++ Ppt on the art of war movie Ppt on 5g wireless system Free ppt on planets in the solar system Ppt on game theory in economics Ppt on depth first search vs breadth