NFAs accept the Regular Languages - PowerPoint PPT Presentation

1 / 35
About This Presentation
Title:

NFAs accept the Regular Languages

Description:

NFAs accept the Regular Languages Prof. Busch ... LSU * If we convert NFA to DFA then the two automata are equivalent : Lemma ... Languages and Finite Automata ... – PowerPoint PPT presentation

Number of Views:102
Avg rating:3.0/5.0
Slides: 36
Provided by: Costa167
Category:

less

Transcript and Presenter's Notes

Title: NFAs accept the Regular Languages


1
NFAs accept the Regular Languages

2
Equivalence of Machines
  • Definition
  • Machine is equivalent to machine
  • if

3
Example of equivalent machines

NFA
DFA
4
Theorem
Languages accepted by NFAs
Regular Languages
Languages accepted by DFAs
NFAs and DFAs have the same computation
power, accept the same set of languages
5
Proof
we only need to show
Languages accepted by NFAs
Regular Languages
AND
Languages accepted by NFAs
Regular Languages
6
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
7
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
8
Conversion NFA to DFA

NFA
DFA
9

NFA
DFA
10
empty set

NFA
DFA
trap state
11

NFA
union
DFA
12

NFA
union
DFA
13

NFA
DFA
trap state
14
END OF CONSTRUCTION

NFA
DFA
15
General Conversion Procedure
  • Input an NFA
  • Output an equivalent DFA
  • with

16
  • The NFA has states
  • The DFA has states from the power set

17
Conversion Procedure Steps
  • 1. Initial state of NFA
  • Initial state of DFA

step
18
Example

NFA
DFA
19
step
  • 2. For every DFAs state
  • compute in the NFA
  • add transition to DFA

Union
20
Example

NFA
DFA
21
  • 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
Example

NFA
DFA
23
step
  • 4. For any DFA state
  • if some is accepting state in NFA
  • Then,
  • is accepting state in DFA

24
Example

NFA
DFA
25
Lemma

If we convert NFA to DFA then the two
automata are equivalent
Proof
We only need to show
AND
26
First we show
We only need to prove
27
NFA
Consider
symbols
28
symbol
denotes a possible sub-path like
symbol
29
We will show that if
NFA
then
DFA
state label
state label
30
More generally, we will show that if in
(arbitrary string)
NFA
then
DFA
31
Proof by induction on
Induction Basis
NFA
DFA
is true by construction of
32
Induction hypothesis
Suppose that the following hold
NFA
DFA
33
Induction Step
Then this is true by construction of
NFA
DFA
34
Therefore if
NFA
then
DFA
35
We have shown
With a similar proof we can show
Therefore
END OF LEMMA PROOF
Write a Comment
User Comments (0)
About PowerShow.com