Which of the given languages are regular


#1

Which of the given languages are regular?

L1 : The set of all strings over {a,b} containing more a’s than b’s
L2 : The set of strings over {0,1} that have an equal number of 0’s and 1’s; and having an alternating pattern of 0’s and 1’s.
L3 : The set of strings over {0,1} than have an equal number of 0’s and 1’s in any pattern.
L4 : The set of all strings over {0,1}

(A) L4

(B) L2, L4

© L1, L3, L4

(D) L2, L3, L4


#2

Answer must be B. Since
L1. Is not regular since we can’t say whether a is more than b since there is no memory in finite automata

L2. It is a regular since the number of 01 is alternate and we can check it easily the regular Lang is (01)* +(10)*

L3. Is not regular because of no memory

L4. It can be done since regular Lang can be (0+1)*


#3

L2 and L4 are regular