MHB John's Cupcake Challenge: Finding the Perfect Distribution

AI Thread Summary
John has 31 cupcakes to distribute among 5 students, requiring each to receive an odd number. A brute-force approach is inefficient, prompting a discussion on the stars and bars combinatorial method. By initially adding 5 cupcakes to ensure each student receives at least one, the problem transforms into distributing 36 cupcakes into 5 portions. The solution involves calculating the combinations of placing 4 dividers among 17 spaces, leading to the formula 17 choose 4. This method provides a more efficient way to determine the number of distributions.
Monoxdifly
MHB
Messages
288
Reaction score
0
John has baked 31 cupcakes for 5 different students. He wants to give them all to his students but he wants to give an odd number of cupcakes to each one. How many ways can he do this?

Brute-forcing will take about a whole day, I think. If 4 students receive 1 cupcake and the other one receive 27, that's already 4 combinations. If there are 3 1's, the other two might be 3 and 25, 5, and 23, 7 and 21, etc. Is there more efficient way?
 
Mathematics news on Phys.org
Hey Mr. Fly,

It's a variation of the stars and bars problem.
See the linked article how it works.

In this particular case we can add 5 cakes first for a total of 36.
Next we divide them in 18 stacks of 2 cakes each.
If we put 4 dividers (bars) in between them, we get 5 portions. We give them to each of the 5 students.
Oh, and before we do so, we take away 1 cake from each portion, so that each student gets an odd number.

How many ways to divide 4 bars over the 17 spaces between the stacks?
 
klaas van aarsen said:
how many ways to divide 4 bars over the 17 spaces between the stacks?

17c4?
 
Monoxdifly said:
17c4?

Yep. (Nod)
 
Suppose ,instead of the usual x,y coordinate system with an I basis vector along the x -axis and a corresponding j basis vector along the y-axis we instead have a different pair of basis vectors ,call them e and f along their respective axes. I have seen that this is an important subject in maths My question is what physical applications does such a model apply to? I am asking here because I have devoted quite a lot of time in the past to understanding convectors and the dual...
Thread 'Imaginary Pythagorus'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...

Similar threads

Replies
15
Views
6K
Replies
9
Views
4K
Replies
125
Views
19K
2
Replies
93
Views
15K
2
Replies
60
Views
11K
Back
Top