As the title says. Mathematician A is not the same as mathematician B, so the objects are different. The cookies are the
same however.
Here is an example with 5 mathematicians A,B,C,D and E and some examples on the combinations.
Note: All cookies need to be shared out.
A | B | C | D | E |
40 | 1 | 1 | 8 | 1 |
0 | 10 | 10 | 10 | 10 |
39 | 1 | 0 | 0 | 0 |
1 | 1 | 1 | 40 | 8 |
I gave a shot at this question and after messing around with the case of 2,3 and 4 mathematicians I came to the conclusion that the following must be the answer(following the pattern from case 2,3 and 4):
Since if there are 2 mathematicians there are 41 combinations(the second ones amount of cookies is dependent on the first one). In the case of 3 it's 1+2+3...+40+41, and in the case of 4 it's:\(\sum_{a = 1}^{41}(\sum_{b=1}^ab)\)
(I think)
So I expanded that pattern to the following:
\(\sum_{a=1}^{41}(\sum_{b=1}^{a}(\sum_{c=1}^{b}(\sum_{d=1}^{c}(\sum_{e=1}^{d}(\sum_{f=1}^{e}(\sum_{g = 1}^{f}(\sum_{h = 1}^{g} (\sum_{i = 1}^{h}i))))))))\)
So in the end I have 3 questions. Because typing the above expression in my calculator crashes it and trying to brute force a solution in Visual Studio takes forever.
1. Is the above a correct solution to the problem?(Even if not the most efficient one)
2. How can I possibly rewrite the expression above to make it solvable(within a reasonable time frame)
3. How should I actually go about solving that? My teacher mentioned some method but he was pretty vague about it and I didn't understand much of it as he was in a rush so without time to explain it fully. I assume some use of binomial theorem but that's about it.
4. Any links for further research on these kind of problems and similar ones are much appreciated.
Thank you in advance!
Hi Quazars,
I'm still stuck at your box .
If there are only 40 cookies and 5 people how can this happen
They get 40, 1,1,8,and 1 respectively.
I obviously do not understands what you mean. :///
maybe you can do this with the stars and bars method?
Say you have 6 cookies and 3 people (just to make it simpler)
1st 2nd 3rd leftovers
c |c c | c c |c
so that is 9C3 ways = 84 ways to allocate the cookies
so is there were 40 cookies and 5 people then maybe there is
45C5 ways = 1,221,754 ways to divide up the cookies
(there can be some leftover cookies and/or some people who do not get a cookie)
I am not certain that you can do it this way but it seems logical to me....
It is a different scenario to this video clip but.... maybe...
https://www.youtube.com/watch?v=5hF59P8tmQc
Tell me what you think?
(I'm not sure how to edit my post, it's supposed to be 30 instead of 40. Derp)
My reasoning led me to the conclusion that since the last cookie is dependent on the one before it the last one can always be ignored.. to more explain how I mean I'll set up the example with two mathematicians and 10 cookies:
No matter how many cookies x the first one gets(0-10, 11 possibilities) the other one will get 11-x(since all cookies need to be distributed)
0 | 10 |
1 | 9 |
2 | 8 |
3 | 7 |
4 | 6 |
5 | 5 |
6 | 4 |
7 | 3 |
8 | 2 |
9 | 1 |
0 | 10 |
- 11 combinations.
When doing this for three mathematicians I follow the same logic that the last persons cookie count is neglectable.
0 | 0 | 10 |
0 | 1 | 9 |
0 | ... | ... |
0 | 10 | 0 |
These are the combinations for when the first person gets no cookies whatsoever. (still 11)
But when the first person gets a cookie the amount decreases by one. And for each cookie he(or she) gets the amount decreases...
1 | 0 | 9 |
1 | 1 | 8 |
1 | ... | ... |
1 | 9 | 0 |
Continue doing this until the first person gets 10 cookies and the rest none and I ended up with:
1+2+3+4+5+6+7+8+9+10+11. Or \(\sum_{i=1}^{11} i\)
I ended up looking through the case when there are four mathematicians(mostly seeing that depending on the value of cookies the first person had the combination count would be that sum, but 11 would decrease by each cookie the first mathematician had. So I set up the formula you can see in the post. At least that was my reasoning. I don't think N choose K applies here, sorry if I wasn't clear enough in my main post. I also sent you a pm, cheers :)
If you respond you had better send me a private message, with the address, because otherwise I am not likely to see it.
Thanks :)
I probably do not have time right now to look at your logic.
My scenario was different from yours because I allowed for the scenario where some cookies were not allocated.
Still I can still use my method
2 people 10 cookies
10 people 1 divider because all the cookies must be distributed = 11C1 = 11 (We both agree)
3 people 10 cookies
10 cookies 2 dividers = 12C2 = 66 ways
30 cookies 5 people no left over cookies = 34C4 = 46376 ways
Did you look at that stars and bars video. I am almost certain that your problem can be done the same way.
You can use your formula and see if you get the same results.