yes the answer is A here you can take a look at my answer
what we sholud notice is that question asks for as any sequences of 110 as 011
in other words
so we need not care and accept anything until the string we are passing through our dfa has an occurrence of
one key property to notice is that adding a 0 to the end of 011 makes it 0110 and acceptable for us.
so we have to ensure that the string we are passing through our dfa is accepting as long as [(011).1*] is not encountered
when that is encountered we move to the dead state IN DEAD STATE if the string still has characters and it implies to our terms we send it to one of our accepting states.
it is essentially a complement of [(011).1*].
no for l2 :
we have a similar condition
but here one thing to observe is that both the substrings are not related to each other hence we can say that we need to implement a counting logic for 111 and 000 and go to a accepting state whenever the condition described above is met.
it is same as
dpda where there are same no. of a’s and same no. of b’s.