150 for first and 6 for the second?

The Gateway to Computer Science Excellence

0 votes

How is the problem..

Distribute 5 toys such that each of 3 child get atleast 1

Different from sum of 3 no. X+y+z=5 such that each digit >= 1.

Plz explain ?

Distribute 5 toys such that each of 3 child get atleast 1

Different from sum of 3 no. X+y+z=5 such that each digit >= 1.

Plz explain ?

0

How do we need to approach both problems differently plz give some insight..

Do we need to take candies to be distinct or how do we approach?

Do we need to take candies to be distinct or how do we approach?

0

1. For the first one, I have considered toys to be different. When objects to be distributed are greater than the available persons and each should get at least one, we cannot do give one to each and then permute remaining anyhow. Here comes the concept of grouping and distribution.

2. The second one is the permutation of star and bars with extra criteria of having at least one from each. Take one from each which makes the equation as X' + Y' + Z' = 2 (Two stars and two bars)

2. The second one is the permutation of star and bars with extra criteria of having at least one from each. Take one from each which makes the equation as X' + Y' + Z' = 2 (Two stars and two bars)

0 votes

don't over think

this can be done manually

give all student one toy first

x= 1

y=1

z=1

now you are left with 2 more toys i think you can distribute 2 among three easily

x y z

2 0 0

0 2 0

0 0 2

1 1 0

1 0 1

0 1 1

ANS=6

correct me if I am wrong.....

this can be done manually

give all student one toy first

x= 1

y=1

z=1

now you are left with 2 more toys i think you can distribute 2 among three easily

x y z

2 0 0

0 2 0

0 0 2

1 1 0

1 0 1

0 1 1

ANS=6

correct me if I am wrong.....

52,345 questions

60,489 answers

201,830 comments

95,297 users