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)
 
Seemingly by some mathematical coincidence, a hexagon of sides 2,2,7,7, 11, and 11 can be inscribed in a circle of radius 7. The other day I saw a math problem on line, which they said came from a Polish Olympiad, where you compute the length x of the 3rd side which is the same as the radius, so that the sides of length 2,x, and 11 are inscribed on the arc of a semi-circle. The law of cosines applied twice gives the answer for x of exactly 7, but the arithmetic is so complex that the...
Is it possible to arrange six pencils such that each one touches the other five? If so, how? This is an adaption of a Martin Gardner puzzle only I changed it from cigarettes to pencils and left out the clues because PF folks don’t need clues. From the book “My Best Mathematical and Logic Puzzles”. Dover, 1994.
Thread 'Imaginary Pythagoras'
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