Friends and Chicken ( re-revised )

4 friends together purchase 11 pieces of chicken in total. Each person at least purchases 1 piece. They can order 4 types: Wing, Leg, Breast, or Thigh in any amount or combination of types that satisfies the total ( Example: person A may order 4 Wings, person B - 2 Legs, 1 Breast, person C - 3 Thigh, Person D - 1 Leg etc... ) . In how many ways can this be done?


The answer is 5093920.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Mark Hennings
Feb 12, 2021

Firstly count the number of ways that the four friends could order eleven pieces of chicken, if it does not matter if any of the friends does not order anything. This is equal to the number of ways of putting 11 11 objects into 16 16 boxes, which is equal to ( 26 11 ) \binom{26}{11} by a standard stars-and-bars argument.

Let X 1 X_1 be the number of ways of buying eleven pieces of chicken if one specific friend does not get anything. This is simply the number of ways of distributing the 11 11 pieces of chicken amongst the other three friends, which is the number of ways of putting 11 11 objects into 12 12 boxes, which is ( 22 11 ) \binom{22}{11} .

Let X 2 X_2 be the number of ways of buying eleven pieces of chicken if two specific friends do not get anything. This is simply the number of ways of distributing the 11 11 pieces of chicken amongst the other two friends, which is the number of ways of putting 11 11 objects into 8 8 boxes, which is ( 18 11 ) \binom{18}{11} .

Let X 3 X_3 be the number of ways of buying eleven pieces of chicken if three specific friends do not get anything. This is simply the number of ways of the fourth friend buying all the chicken, which is the number of ways of putting 11 11 objects into 4 4 boxes, which is ( 14 11 ) \binom{14}{11} .

It is not possible for all four friends not to buy chicken.

Using the Inclusion-Exclusion Principle, the number of ways of buying the chicken pieces, with at least one friend not getting any chicken, is 4 X 1 6 X 2 + 4 X 3 4X_1 - 6X_2 + 4X_3 and hence the number of ways pf buying the chicken pieces, with every friend getting at least one piece of chicken is ( 26 11 ) 4 ( 22 11 ) + 6 ( 18 11 ) 4 ( 14 11 ) = 5093920 \binom{26}{11} -4\binom{22}{11} + 6\binom{18}{11} - 4\binom{14}{11} = \boxed{5093920}


More generally, let N ( a , b , c ) N(a,b,c) be the number of ways in which a a friends can by a total of b a b \ge a pieces of chicken, which can can come in c c different types, with each friend getting at least one piece of chicken.

Let S S be the collection of a a -tuples ( u 1 , u 2 , . . . , u a ) (u_1,u_2,...,u_a) of positive integers which add to b b . Then S S is the set of possible distributions of total number of chicken pieces amongst the a a friends. For each such distribution, the first friend has to arrange his u 1 u_1 pieces of chicken into the c c different types that are available, and this can be done in ( u 1 + c 1 c 1 ) \binom{u_1+c-1}{c-1} ways. The other friends have to do the same. Thus N ( a , b , c ) = ( u 1 , u 2 , . . . , u a ) S ( u 1 + c 1 c 1 ) ( u 2 + c 1 c 1 ) ( u a + c 1 c 1 ) N(a,b,c) \; = \; \sum_{(u_1,u_2,...,u_a) \in S} \binom{u_1+c-1}{c-1}\binom{u_2+c-1}{c-1} \cdots \binom{u_a+c-1}{c-1} and this is the coefficient of X b X^b in the power series expansion of ( u 1 ( u + c 1 c 1 ) X u ) a \left(\sum_{u \ge 1}\binom{u+c-1}{c-1}X^u\right)^a Now u 1 ( u + c 1 c 1 ) X u = 1 ( c 1 ) ! d c 1 d u c 1 u = 1 X u + c 1 = 1 ( c 1 ) ! d c 1 d u c 1 X c 1 X = 1 ( 1 X ) c 1 \sum_{u \ge 1}\binom{u+c-1}{c-1}X^u \; = \; \frac{1}{(c-1)!}\frac{d^{c-1}}{du^{c-1}} \sum_{u=1}^\infty X^{u+c-1} \; = \; \frac{1}{(c-1)!} \frac{d^{c-1}}{du^{c-1}} \frac{X^c}{1-X} \; = \; \frac{1}{(1-X)^c} - 1 and so N ( a , b , c ) N(a,b,c) is the coefficient of X b X^b in the power series expansion of ( 1 ( 1 X ) c 1 ) a \left(\frac{1}{(1-X)^c} - 1\right)^a Again, we obtain N ( 4 , 11 , 4 ) = 5093920 N(4,11,4) = 5093920 .

Hey Mark,

Would you expand on how 4 friends ordering 11 pieces of chicken ( I assume from the 4 types ) turns into 11 things into 16 boxes, which then turns into ( 26 11 ) { 26 \choose 11 } . I'm trying to understand, but I can't see this ( its obviously just the start of what I can't see..but one step at a time ).

Thanks

Eric Roberts - 3 months, 3 weeks ago

Log in to reply

Four friends means 4 × 4 = 16 4\times4=16 “boxes” of the different types of chicken each friend can get. We need to distribute 11 11 orders of chicken into those 16 16 boxes.

Now mix up 11 11 “stars” and 15 15 “bars”. For example

* * * | | * | | | | * * * | | | | | * | * | | * * |

The stars are the bits of chicken, and the bars separate them into 16 boxes. The above arrangement means that there are 3,0,1,0,0,0,3,0,0,0,0,1,1,0,2,0 bits of chicken in the sixteen different boxes. There are ( 26 11 ) \binom{26}{11} ways of sorting out these stars and bars...

Mark Hennings - 3 months, 3 weeks ago

Log in to reply

It took me too long to see this but I think I finally get this portion. The 16 boxes would be labeled with either Wing, Leg, Breast ,Thigh ( in some order ), and there is a group of four boxes for each friend, and the numbers inside the boxes are the numbers of pieces ordered of a particular type for a each friend ( totaling 11 for the group). So to figure out what each friend ordered you could look at it groups of four. I hope that's right...

Eric Roberts - 3 months, 3 weeks ago

Clearly better than brute force. Key insight is expanding 4 types times 4 people. Rather than breaking things into cases times cases, we just need 16 non-negative integers (in order) that sum to 11. (With the constraint that each person gets at least one piece.)

Richard Desper - 3 months, 3 weeks ago

Log in to reply

Yeah, I still am not getting that part...Its like a brick wall.

Eric Roberts - 3 months, 3 weeks ago
Eric Roberts
Feb 16, 2021

The sledge hammer approach:

Enumerate the types of sums of 11 11 with 4 4 summands ( the number of ways for 4 friends to order 11 pieces of chicken in total ) beginning with the largest summand 8 8 and work your way down. The various sums and the number of ways to order them is shown below:

Sums Combinations 8 + 1 + 1 + 1 ( 4 1 ) = N 8111 = 4 7 + 2 + 1 + 1 ( 4 2 ) 2 = N 7211 = 12 6 + 3 + 1 + 1 ( 4 2 ) 2 = N 6311 = 12 6 + 2 + 2 + 1 ( 4 2 ) 2 = N 6221 = 12 5 + 2 + 2 + 2 ( 4 1 ) = N 5222 = 4 5 + 3 + 2 + 1 4 ! = N 5321 = 24 5 + 4 + 1 + 1 ( 4 2 ) 2 = N 5411 = 12 4 + 4 + 2 + 1 ( 4 2 ) 2 = N 4421 = 12 4 + 3 + 2 + 2 ( 4 2 ) 2 = N 4322 = 12 4 + 3 + 3 + 1 ( 4 2 ) 2 = N 4331 = 12 3 + 3 + 3 + 2 ( 4 1 ) = N 3332 = 4 \displaystyle \begin{matrix} & \text{Sums} \quad \quad \quad & \text{Combinations} \\ & 8 + 1 + 1 + 1 &{4\choose1} = N_{8111} =4 \\ & 7 + 2 + 1 + 1 & {4\choose 2} \cdot 2 = N_{7211} =12 \\ & 6 + 3 + 1 + 1 & {4\choose 2} \cdot 2 = N_{6311} = 12 \\ & 6 + 2 + 2 + 1 & {4\choose 2} \cdot 2 = N_{6221} = 12 \\ & 5 + 2 + 2 + 2 & {4\choose 1} = N_{5222} = 4 \\ & 5 + 3 + 2 + 1 & 4! = N_{5321} = 24 \\ & 5 + 4 + 1 + 1 & {4\choose 2} \cdot 2 = N_{5411} = 12 \\ & 4 + 4 + 2 + 1 & {4\choose 2} \cdot 2 = N_{4421} = 12 \\ & 4 + 3 + 2 + 2 & {4\choose 2} \cdot 2 = N_{4322} = 12 \\ & 4 + 3 + 3 + 1 & {4\choose 2} \cdot 2 = N_{4331} = 12 \\ & 3 + 3 + 3 + 2 & {4\choose 1} = N_{3332} = 4 \end{matrix}

Now that we have the ways in which the friends can order the number of pieces, let us move on the number of ways each person can order chicken pieces to fill said order. The friends do this by choosing a type, or multiple types of chicken pieces (wings, legs, breasts, or thighs) in amounts that add up to their individual order.

For a person that gets 1 1 piece of chicken S 1 S_1 they can do this in 4 4 ways ( the number of ways of choosing 1 1 type of 4 4 :

S 1 = ( 4 1 ) = 4 S_1 = {4 \choose 1} = 4

For a person that gets 2 2 pieces of chicken S 2 S_2 they can do this in 10 10 ways: They can fill the order with all 1 1 type or they may select 2 2 out of the 4 4 types ( 1 1 type1 + + 1 1 type2 ):

S 2 = ( 4 1 ) + ( 4 2 ) ( 1 1 ) = 10 B B , L L , W B , W L , W T T T , W W L B , L T , T B \begin{matrix} \displaystyle S_2 = &\displaystyle {4 \choose 1} \quad + &\displaystyle {4 \choose 2} \cdot {1 \choose 1} = 10 \\ \quad \\ & BB,LL, &WB,WL,WT \\ & TT,WW & LB,LT,TB \end{matrix}

For a person that gets 3 3 pieces of chicken S 3 S_3 they can do this in 20 20 ways: They can fill the order with all 1 1 type , they may select 2 2 out of the 4 4 types ( 6 6 ways ) in 2 2 ways each ( 1 1 type1 + + 2 2 type2 or 2 2 type1 + + 1 1 type2 ), or they may select 3 3 out of the 4 4 types ( 4 4 ways ) in 1 1 way ( ( 1 1 type1 + + 1 1 type2 + 1 1 type3 ):

S 3 = ( 4 1 ) + ( 4 2 ) ( 2 1 ) + ( 4 3 ) ( 2 2 ) = 20 \displaystyle S_3 = \displaystyle {4 \choose 1} \quad + \displaystyle {4 \choose 2} \cdot {2 \choose 1} + \displaystyle {4 \choose 3} \cdot {2 \choose 2} = 20

We keep on with this pattern:

S 4 = ( 4 1 ) + ( 4 2 ) ( 3 1 ) + ( 4 3 ) ( 3 2 ) + ( 4 4 ) ( 3 3 ) = 35 \displaystyle S_4 = \displaystyle {4 \choose 1} + \displaystyle {4 \choose 2} \cdot {3 \choose 1} + \displaystyle {4 \choose 3} \cdot {3 \choose 2} + \displaystyle {4 \choose 4} \cdot {3 \choose 3} = 35

Now that we’ve made it to all 4 types as a selection we can write a general way to order i i pieces in up to 4 4 types:

S i = j = 0 3 [ ( 4 j + 1 ) ( i 1 j ) ] \Large S_i = \Large \sum_{j=0}^3 \left[ {4 \choose j+1} \cdot {i -1 \choose j } \right]

Thus, for 4 4 friends a , b , c , d a,b,c,d the number of ways to order w + x + y + z w+x+y+z pieces is given by:

( N w x y z S w S x S y S z ) \Large \sum \left( N_{wxyz} \cdot S_w \cdot S_x \cdot S_y \cdot S_z \right)

Example: ( w = 8 , x = 1 , y = 1 , z = 1 ) \left( w = 8, x = 1, y = 1, z =1 \right)

N 8111 S 8 S 1 3 = 4 [ ( 4 1 ) + ( 4 2 ) ( 7 1 ) + ( 4 3 ) ( 7 2 ) + ( 4 4 ) ( 7 3 ) ] ( 4 1 ) 3 = 42 , 240 N_{8111} \cdot S_8 \cdot {S_1}^3 = 4 \cdot \left[ \displaystyle {4 \choose 1} + \displaystyle {4 \choose 2} \cdot {7 \choose 1 } + \displaystyle {4 \choose 3} \cdot {7 \choose 2 } + \displaystyle {4 \choose 4} \cdot {7 \choose 3} \right] \cdot \displaystyle {4 \choose 1}^3 = 42,240

Repeating this calculation for each of the enumerated sums above, the total number from the summation is: 5 , 093 , 920 ways \Large 5,093,920 \, \text{ways}

Dammit, I missed the (5,2,2,2) case

Richard Desper - 3 months, 3 weeks ago

Log in to reply

Yeah, that's the problem with the sledge hammer method...easy to miss stuff! Marks method bypasses all of it...I'm trying to grasp it...unsuccessfully.

Eric Roberts - 3 months, 3 weeks ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...