Lecture 2 Final
Lecture 2 Final
840 Lecture 2
𝑀1 𝑀2
mathematically.
NFA – Formal Definition
𝑁1 a a
b a,ε
𝑞1 𝑞2 𝑞3 𝑞4
b
𝑀
𝑀1 𝑀2
ε
should accept input
ε if where
accepts and accepts .
𝑤=¿ 𝑥 𝑦
Nondeterministic has the option to
jump to when accepts.
Closure under (star)
Theorem: If is a regular language, so is
Proof sketch: Given DFA recognizing
Construct NFA recognizing
𝑀′
Check-in 2.3
𝑀 ε should accept input
ε If has states,
if how many states does
ε
have bywhere
this construction?
and accepts each
(a)
(b) 𝑤=¿
𝑥1 𝑥 2 𝑥 3 𝑥4
Make sure accepts ε (c)
Check-in 2.3
Regular Expressions NFA
Theorem: If is a regular expr and then is regular
Proof: Convert to equivalent NFA :
}
: ε a
Use closure constructions ε a ε b
:
a ε
ε ε a ε b
ε
ε
Quick review of today
1. Nondeterministic fi nite automata (NFA)
2. Proved: NFA and DFA are equivalent in power
3. Proved: Class of regular languages is closed
under
4. Conversion of regular expressions to NFA
Check-in 2.4
Recitations start tomorrow online (same link as for lectures).
They are optional, unless you need more help.
You may attend any recitation(s).
Which do you think you’ll attend? (you may check several)
(a) 10:00 (b) 11:00 (c) 12:00
(d) 1:00 (e) 2:00 (f) I prefer a different time (please Check-in 2.4
post on piazza, but no promises)