a) A is regular , A U B is regular , then B is not necessary regular
example :- A = (a+b)* B = Any non regular language A U B is (a+b)* , while B is not regular.
B)
Algorithm ->
Using DFA for M1 & M2 , create product DFA. Make two copies of it.
Suppose A is final state for M1 & B is final state of M2. Assume that C is some non final state for M1 & D is some non final state for M2.
To check for subset ->
Now make A as final state whenever it is associated with some non final state for M2. If A is associated with final state of M2, then make that product state non final. This way we will calculate M1-M2. This DFA should accept Empty language otherwise L(M1) is not subset of L(M2)
To check for proper subset ->
Make B as final state, whenever it is associated with some non final state of M1. If A is associated with final state of M1, then make that product state non final. This way we will calculate M2-M1. This DFA should accept non Empty language otherwise L(M1) is not proper subset of L(M2)
if both tests pass then we can say L(M1) is proper subset of L(M2).