I have 3 pieces of candy to place in 4 lunch boxes. In how many ways can I do this if: (a) The candies are all different and the lunch boxes are all different? (b) The candies are all the same and the lunch boxes are all the same? (c) The candies are all the same and the lunch boxes are all different? (d) The candies are all different and the lunch boxes are all the same? (e) Exactly two of the candies are the same (but the third is different) and all of the lunch boxes are different?
I see (a) a little differently......
I break this down into 2 tasks.......choose a piece of candy.....choose a luchbox to put it in....
For the first task ...we want to choose one of the 3 candies and one of the 4 lunchboxes to put it in = C(3,1) * C(4,1) = 12 ways to do this
So....after we've chosen the first piece of candy and the first lunchbox....we want to choose one of the 2 remaining pieces of candy and put it into one of the 3 remaining lunchboxes = C(2,1)*C(3,1) = 6 ways to do this
And finally, we just want to choose one of the two remaining lunchboxes to put the last piece of candy into....and there are 2 ways to do this.
So 12 ways x 6 ways x 2 ways = 144 ways
Okay, you did not answer my question but I suppose it is same to assume you want to put the candy in the lunch boxes.
I have 3 pieces of candy to place in 4 lunch boxes.
In how many ways can I do this if:
(a) The candies are all different and the lunch boxes are all different?
Well you can put the first peice in any lunch box that is 4 choices, the same with the second 3rd so
it wll be 4*4*4 = 64 ways
(b) The candies are all the same and the lunch boxes are all the same?
1,1,1,0
2,1,0,0
3,0,0,0
That is 3 ways because the only thing that matters is how many lollies is in each box.
(c) The candies are all the same and the lunch boxes are all different?
3 from above * 4! = 3*4*3*2*1 I think (not really sure )
(d) The candies are all different and the lunch boxes are all the same?
3*3! maybe
(e) Exactly two of the candies are the same (but the third is different) and all of the lunch boxes are different?
3*4! * 3 I'm guessing. :))
The correct and highly accurate solutions presented below for your entertainment and edification . . . .
.a)\; 43=64←No restrictions:
b)\; 3←Enter "IntegerPartitions [3]" \; into \ Wolfram \ alpha. This will show the values and the symbolic partitions.. (You may need to use your brain a little more than normal).
.c)\; 20 ←(Removed errant Binomial from this post)=(N+k−1)!k!⏟Dist. box Indist. candy|\TextN=4k=3
.d)\; 7 ←(33)+(32)+(31)=7(Indist. box; Dist. candy)
.e)\; 40 ←(4!2!)∗(2)+(4!2!)+(4)
Reasoning:All candy in 1 of 4 boxes (4)2 combinations (XX Y\; \&\; XY X) \;distributed to boxes in (2)(4*3) = (2)(4!/2!) \;=\;(12*2) ways;and 1 candy to each box distributed to boxes in (1)(4*3*2)/2 = 4!/2! = (12) ways.Total 4+24+12 = 40 ways.
All this plus or minus CDD . . .
\tiny \textcolor[rgb]{1,,0}{\text {(Corrected error in binomial formula for soultion c)}}\\
But Nauseated, you are confusing me.
.c)\; 20 ←(Nk)=(N+k−1)!k!⏟Dist. box Indist. candy|\TextN=4k=3
nCk=4C3=4!3!1!=4
A little CDD here. The formula is correct: (4+3-1)!/3! = (6!/3!); the binomial is in error.
Now corrected and noted.
I don't know Naus, I still have a problem with this:
.c)\; 20 ←(N+k−1k)=(N+k−1)!k!⏟Dist. box Indist. candy|\TextN=4k=3
(N+k−1)Ck=(N+k−1)!k!(N+k−1−k)!=(N+k−1)!k!(N−1)!
That is still not your formula :/
Technically, the equal sign made it true, but it’s confusing: Remove errant Binomial from my mind and this post.
I see (a) a little differently......
I break this down into 2 tasks.......choose a piece of candy.....choose a luchbox to put it in....
For the first task ...we want to choose one of the 3 candies and one of the 4 lunchboxes to put it in = C(3,1) * C(4,1) = 12 ways to do this
So....after we've chosen the first piece of candy and the first lunchbox....we want to choose one of the 2 remaining pieces of candy and put it into one of the 3 remaining lunchboxes = C(2,1)*C(3,1) = 6 ways to do this
And finally, we just want to choose one of the two remaining lunchboxes to put the last piece of candy into....and there are 2 ways to do this.
So 12 ways x 6 ways x 2 ways = 144 ways