CS 373: Theory of Computation
Gul Agha
Mahesh Viswanathan
Fall 2010
1
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
NFA vs. DFA
Expressive Power of NFAs and DFAs
•
Is there a language that is recognized by a DFA but not by any NFAs? No!
•
Is there a language that is recognized by an NFA but not by any DFAs? No!
Main Theorem
Theorem 1.
A language
L
is regular if and only if there is an NFA
N
such that
L
(
N
) =
L
.
In other words:
•
For any DFA
D
, there is an NFA
N
such that
L
(
N
) =
L
(
D
)
, and
•
for any NFA
N
, there is a DFA
D
such that
L
(
D
) =
L
(
N
)
.
2
NFAs for Regular Languages
Converting DFAs to NFAs
Proposition 2.
For any DFA
D
, there is an NFA
N
such that
L
(
N
) =
L
(
D
)
.
Proof.
Is a DFA an NFA? Essentially yes! Syntactically, not quite. The formal deﬁnition of DFA
has
δ
DFA
:
Q
×
Σ
→
Q
whereas
δ
NFA
:
Q
×
(Σ
∪ {
±
}
)
→ P
(
Q
).
For DFA
D
= (
Q,
Σ
,δ
D
,q
0
,F
), deﬁne an “equivalent” NFA
N
= (
Q,
Σ
,δ
N
,q
0
,F
) that has the
exact same set of states, initial state and ﬁnal states. Only diﬀerence is in the transition function.
δ
N
(
q,a
) =
{
δ
D
(
q,a
)
}
for
a
∈
Σ and
δ
N
(
q,±
) =
∅
for all
q
∈
Q
.
3
NFAs recognize Regular Languages
3.1
Simulating an NFA
Simulating an NFA on Your Computer
NFA Acceptance Problem
Given an NFA
N
and an input string
w
, does
N
accept
w
?
How do we write a computer program to solve the NFA Acceptance problem?
This is the end of the preview.
Sign up
to
access the rest of the document.
 Fall '08
 Viswanathan,M
 Mathematical Induction, Mathematical logic

Click to edit the document details