Which claim is always true: L1 and L2 are regular languages, L = L1 - L2, then L
is finite |
||
is regular |
||
is complicated |
||
is infinite |
If L1 and L2 are regular languages, then so is L1 – L2 = strings in L1 but not L2.
Proof: Let A and B be DFA’s whose languages are L and M, respectively. Construct C, the product automaton of A and B make the final states of C be the pairs, where A-state is final but B-state is not.
Observe that L1 - L2 = L1 ∩ L2'. We already know that regular languages are closed under complement and intersection. So, L1 - L2 will also be regular.
So L = L1 - L2 is regular.
Get Answers For Free
Most questions answered within 1 hours.