https://web2.0calc.com/questions/counting-and-probability-question-please-help
I looked at this problem, and I didn't understand what the Stirling Numbers is. This is the question:
(a) While travelling abroad, I bought 7 identical bags of candy for 3 friends. How many ways can I distribute the candy to my 3 friends, so that each friend gets at least one bag of candy?
(b) I also bought 7 different postcards. How many ways can I send the postcards to my 3 friends, so that each friend gets at least one postcard?
I want to know if there's a different way of explaining the answer, without using Stirling Numbers.
I answered these questions recently by the way. I've never actually heard of stirling numbers before but i see Chris has answered part B easily using stirling numbers so maybe I should do some homework.
Part A is fairly easy just using stars and bars which is a method that I often use.
(a) While travelling abroad, I bought 7 identical bags of candy for 3 friends. How many ways can I distribute the candy to my 3 friends, so that each friend gets at least one bag of candy?
I'd give one bag of candy to each friend leaving 4 bags to distribut between the 3 of them.
I'd use stars and bars method now.
there are 4 bags which are the stars.
I want them divided into 3 groups which means inerting 2 bars somewhere within the 4 stars
Person one gets the bags at the front, person 3 gets the bags at the end and person 2 gets the bags in the middle
eg
*|***| person1 =1bag person 2 = 3 bags person 3=0 bags.
There will be 6C2 = 15 ways to do this.
----------------
Part b is much harder and I was not sure if my answer last time was correct.
I just redid part B my own way and it agrees with CPhil's answer ... but his is much easier.
Anyway, here is my logic
(b) I also bought 7 different postcards. How many ways can I send the postcards to my 3 friends, so that each friend gets at least one postcard?
The original answer was 15, that was if all the cards were the same.
possible numbers of bags each (total 7) | |||||
5 | 1 | 1 | 3 ways if all the same | 7*6=42 | 3*42=126 |
4 | 2 | 1 | 6 ways if all the same | 7*6C2=105 | 6*105=630 |
3 | 3 | 1 | 3 ways if all the same | 7*6C3=140 | 3*140=420 |
3 | 2 | 2 | 3 ways if all the same | 7C2*5C2=210 | 3*210=630 |
Total | 15 ways if all the same | 1806 ways if all are different |
So my answer agrees with CPhill's 1806 ways
For your answer to part b, the graph you showed me. When you said "3 ways all the same" or "6 ways all the same". Is that assuming that the postcards were the same?
Thanks!
5,1,1
Means 1 person got 5 and the other 2 people got 1.
There are 3 ways that this can happen becasue the 5 can go to person A,B or C.
then the other two get the same number each.
4,2,1
Means 1 person got 4, one got 2 and 1 got only one.
The 4 can go to person AB or C that is 3 possible ways, then there are two people left. Either of those can get the single card, so that is 2 ways, the last person gets the others. So that is 3*2=6 ways.
So far I have not paid attention to the fact that the cards are different from each other. I dealt with that afterwards.
----------
Try digesting that and then if you need me to I can continue to explain the next bit.
how does the c(n, r) work, like how but mainly why do you have to do c(n, r) with those specific numbers and where did you get those numbers?
nCr is a little formula, (which most times you do not even have to know, the formula I mean)
Anyway
nCr which is available on just about any calculator means
how many ways can r objects be chosen from n objects.
So if you have 10 people and you want to know how many different groups of three you can make that would be 10C3 ways.
----------------
Now look at the first question i did.
(a) While travelling abroad, I bought 7 identical bags of candy for 3 friends. How many ways can I distribute the candy to my 3 friends, so that each friend gets at least one bag of candy?
7 identical bags shared between 3 friends but they all get at least one each.
So really it is how many ways can 4 bags be given to three different people.
Here are the 4 bags ****
I need to break them up into 3 groups. I will use bars to seperate them. I need 2 bars.
Person 1 gets the bags in front of the first bar
Person 3 gets the bags behind the last bar
Person 2 gets the bags in the middle.
eg
||****
This would be one possibility. Person 1 and 2 get none and person 3 gets all four of the bags.
The bars can go anywhere.
So the number of possibilities is 6 items, choose 2. Those two will be the bars, (people)
6C2 ways.
this is called the stars and bars method by the way.
I can explain more but I want to stress that I am not sure if this is completely correct.
My answer is the same as CPhill got with his formula but I am still not convinced that my method is right.
It is the things you are questioning that i am not sure about but here is your explanation.
(b) I also bought 7 different postcards. How many ways can I send the postcards to my 3 friends, so that each friend gets at least one postcard?
The original answer was 15, that was if all the cards were the same.
possible numbers of bags each (total 7)
511 3 ways if all the same 7*6=42 3*42=126
the first person can get any of the 7 postcards, the second person gets any of the 6 remaining, the 3rd person gets the rest.
Hence 7*6* the number of ways if the cards had been all the same.
---------------
421 6 ways if all the same 7*6C2=105 6*105=630
the first person can get any of the 7 postcards, the second person gets any 2 of the 6 remaining, the 3rd person gets the rest.
Hence 7*6C2 times the number of ways if the cards had been all the same.
------------------
331 3 ways if all the same 7*6C3=140 3*140=420
The first person can get any of the 7 postcards, the second person gets any 3 of the 6 remaining, the 3rd person gets the rest.
Hence 7*6C3 times the number of ways if the cards had been all the same.
-------------------
322 3 ways if all the same 7C2*5C2=210 3*210=630
The first person can get any 2 of the 7 postcards, the second person gets any 2 of the 5 remaining, the 3rd person gets the rest.
Hence 7C2*5C2 = 210 times the number of ways if the cards had been all the same.
-------------------
Total 15 ways if all the same 1806 ways if all are different