1.

Which of the following is a correct statement?(a) { If an bn| n = 0,1, 2, 3 ..} is regular language(b) Strings with equal number of a’s and b’s denies a regular language(c) L (A* B*)∩ B gives the set A(d) None of the mentionedI had been asked this question during an interview.This intriguing question comes from The NFA with epsilon topic in section Finite Automata and Regular Expression of Compiler

Answer» RIGHT option is (c) L (A* B*)∩ B gives the set A

Best explanation: If we include A and B in a set and if we write A*it means exceptthen A i.e. Bsame asB*means EXCEPT then B i.e. so if we INTERSECT (A*B*)and Bthen get Abecause in any regular language. If we write A-B then A-B=A intersection B’so if we intersect A and B means A-BSo the intersection of (A*B*) and B= (BA). intersection Bmeans (BA)-B’ and B’=A so (BA) intersection(A)=A.


Discussion

No Comment Found

Related InterviewSolutions