Closure Prop Dfa
Closure Prop Dfa
Sipser pages 44 - 47
1. L3 = complement L1 { x | x ∉ L1 }
2. L3 = L1 ∪ L2 { x | x ∈ L1 or x ∈ L2 }
3. L3 = L1 ∩ L2 { x | x ∈ L1 and x ∈ L2 }
4. L3 = L1*
5. L3 = L1 • L2 (The first 3 are easy, we’ll wait on 4 and 5)
Complement
Complementation
Take a DFA for L and change the status - final
or non-final - of all its states. The resulting
DFA will accept exactly those strings that the
first one rejects. It is, therefore, a DFA for the
Complent(L).
Contains a “0”
Contains only “1”
2nd Complement Example
Just “abc”
p
→ p '
a
q
→
a
q'
in A and B. The start state is the pair of original
start states; the final states are pairs of original
final states. The transition function
δA∩Β(q,a) = ( δA(q,a), δB(q,a) )
This is called the product construction.
Example 1 aa+aaa+aaaa
a+aa+aaa
What is the
intersection?
Intersection
{a,aa,aaa} ∩ {aa,aaa,aaaa}
Example 2
1
p 0 q A – string contains a 0
0,1
0
1
r s
0,1 B – string contains a 1
C – string contains a
0 and a 1
Automata and Formal Languages
Contains a “0”
Contains both a
“1” and a “0”
Contains a “1”
The identity:
L - M = L ∩ C(M)
L - M = L ∩ C(M)
- =
Union
Then: A ∪ B =((Qa×Qb),Σ,δ,(sa,sb),Final)
B={bc}
A={ab}
A ∪ B ={ab,bc}