All your questions are already there in GO.. :)

Awesome q2a theme

0 votes

Let A= (a + b)* ab (a + b)*, B= a*b* and C= (a + b)*. Then the relation between A, B and C:

A. A+B= C

B. $A^{R}+B^{R}=C$

C. $A^{R}$+B= C

D. None of these

A. A+B= C

B. $A^{R}+B^{R}=C$

C. $A^{R}$+B= C

D. None of these

0 votes

0 votes

Option c is the answer.

A generates strings with ab as substring and B generates strings of form a*b*.

Reversal of A be AR:

Let A = X(YX) where X = ( a + b )* and Y = ab

AR = ( X(YX))R = (YX)R XR = XR YR XR = (a+b)*R (ab)R ( a+b)*R = (a+b)*ba (a+b)*

AR = ( a+ b)*ba( a+b)*

Now do the union of AR and B u will get all the strings in ( a+b)* i.e. in C.

Because in A + B u will never get ba which is in C. So, just reverse A and u will get strings containing ba.

A generates strings with ab as substring and B generates strings of form a*b*.

Reversal of A be AR:

Let A = X(YX) where X = ( a + b )* and Y = ab

AR = ( X(YX))R = (YX)R XR = XR YR XR = (a+b)*R (ab)R ( a+b)*R = (a+b)*ba (a+b)*

AR = ( a+ b)*ba( a+b)*

Now do the union of AR and B u will get all the strings in ( a+b)* i.e. in C.

Because in A + B u will never get ba which is in C. So, just reverse A and u will get strings containing ba.

- All categories
- General Aptitude 21
- Engineering Mathematics 95
- Digital Logic 59
- Programming & DS 147
- Algorithms 108
- Theory of Computation 144
- Compiler Design 35
- Databases 50
- CO & Architecture 62
- Computer Networks 80
- Non GATE 0
- Others 44
- Admissions 10
- Exam Queries 10
- Tier 1 Placement Questions 2
- Job Queries 1
- Projects 0

932 questions

596 answers

1,885 comments

81,474 users