23

10 Feb 2017 - 7:17am

1 indian and (0 or 1 or 2 or 3 ) Chinese=>3C1*(3C0+3C1+3C2+3C3)

=3*8=24

2 indian and (0 or 1 or 2 or 3 ) Chinese=>3C2*(3C0+3C1+3C2+3C3)

=3*8

3 indian and (0 or 1 or 2 or 3 ) Chinese=>3C3*(3C0+3C1+3C2+3C3)

=1*8

9 Feb 2017 - 10:20pm

Yeah! I got it

I read this before few days...

Btw thanks..

9 Feb 2017 - 11:16am

void function(int n){
if(n < 2) return;
else counter = 0;
for i = 1 to 8 do
function(n/2);
for i = 1 to n^3 do
counter = counter + 1;
}

Recurrence relation of this function is T(n)=8T(n/2) + n3

Answer is n3logn by Master theorem.

9 Feb 2017 - 10:32am

We can't generate abb from given grammar

8 Feb 2017 - 5:55pm

No. Of a's is equal to no. Of b's

By tracing we get set of strings derived from a grammar

8 Feb 2017 - 5:19pm

@dashish

A to B is many to one that means in every relationship only one entity of B can participate and many entity  of A is participate in one relationship. So, 1000 triples

Same for A to C. So, 10  triples

B and C is one to one. So, only 10 triples are possible.

Maximum no of triples is 1000

6 Feb 2017 - 2:23pm

@dashish

Thank you... Now I understood

6 Feb 2017 - 2:18pm

If beta is non-terminal then we have to define closure of beta

So to determine lookaheads of new production it is useful.

So, look ahead has effects on items....

6 Feb 2017 - 12:21pm

A to B and A to C is many to one relationship that means

Every B and every C is participate in a relationship therefore 1000 triples or 10 triples.

Maximum no. Of triples of entities are 1000

6 Feb 2017 - 10:54am