in Theory of Computation retagged by
777 views
1 vote
1 vote

Which of the following statements is correct?

  1. $A=\{a^nb^n\mid n= 0,1,2,3\dots \}$ is regular language
  2. Set $B$ of all strings of equal number of $a$'s and $b$'s defines a regular language
  3. $L(A^*B^*) \cap B$ gives the set $A$
  4. None of these.
in Theory of Computation retagged by
by
777 views

1 comment

C Option is correct
0
0

4 Answers

1 vote
1 vote
Option A and B requires memory to calculate. So they are not regular.

Now coming to Option C they told that the language is intersection of two languages. The property of first language is a's is followed by b's, and the property of second language is No. of a's and No. of b's are equal. Their intersection means the resultant language should have both the properties, which is nothing but set A.

Hence option C is correct.
0 votes
0 votes
Correct answer is C.

As A and B requires stack to count the no. of a and b.
0 votes
0 votes
Here if we look at the options

A :  Here given that {a^n b^n | n >= 0 }

Now this clearly required a stack or a memory to keep track of count hence non regular .

B: This is like the upper case and hence non regular .

C : This is any no of a followed by any no of b and hence requires nothing to keep track of and then further is intersected by B which gives  A and hence true .
0 votes
0 votes
Option C) is correct,

both option A and option B requires comparison (therefore needs stack) ,so not regular.

(A* B*) intersection B gives A .
Answer:

Related questions