lec-2
lec-2
Last time:
- Finite automata, regular languages
- Regular operations
- Regular expressions
- Closure under
Today:
- Nondeterminism
- Closure under and
- Regular expressions → finite automata
Goal: Show finite automata equivalent to regular expressions
1
Closure Properties for Regular Languages
Theorem: If are regular languages, so is (closure under )
Recall proof attempt: Let recognize
recognize
Construct recognizing
𝑀1 𝑀2
3
Nondeterministic Finite Automata(NFA)
𝑁1 a a
b a,ε
𝑞1 𝑞2 𝑞3 𝑞4
b
4mathematically.
NFA – Formal Definition
𝑁1 a a
b a,ε
𝑞1 𝑞2 𝑞3 𝑞4
b
7
Closure under (concatenation)
Theorem: If are regular languages, so is
Proof sketch: Given DFAs and recognizing and
Construct NFA recognizing
𝑀
𝑀1 𝑀2
ε
should accept input
ε if where
accepts and accepts .
𝑤=¿ 𝑥 𝑦
Nondeterministic has the option to
jump to when accepts.
8
Closure under (star/kleen)
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)
9
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
ε
10 ε
Quick review of today
Check-in 2.4
11