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?
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.
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 ( 1 1 2 6 ) . 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
Log in to reply
Four friends means 4 × 4 = 1 6 “boxes” of the different types of chicken each friend can get. We need to distribute 1 1 orders of chicken into those 1 6 boxes.
Now mix up 1 1 “stars” and 1 5 “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 ( 1 1 2 6 ) ways of sorting out these stars and bars...
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...
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.)
Log in to reply
Yeah, I still am not getting that part...Its like a brick wall.
The sledge hammer approach:
Enumerate the types of sums of 1 1 with 4 summands ( the number of ways for 4 friends to order 11 pieces of chicken in total ) beginning with the largest summand 8 and work your way down. The various sums and the number of ways to order them is shown below:
Sums 8 + 1 + 1 + 1 7 + 2 + 1 + 1 6 + 3 + 1 + 1 6 + 2 + 2 + 1 5 + 2 + 2 + 2 5 + 3 + 2 + 1 5 + 4 + 1 + 1 4 + 4 + 2 + 1 4 + 3 + 2 + 2 4 + 3 + 3 + 1 3 + 3 + 3 + 2 Combinations ( 1 4 ) = N 8 1 1 1 = 4 ( 2 4 ) ⋅ 2 = N 7 2 1 1 = 1 2 ( 2 4 ) ⋅ 2 = N 6 3 1 1 = 1 2 ( 2 4 ) ⋅ 2 = N 6 2 2 1 = 1 2 ( 1 4 ) = N 5 2 2 2 = 4 4 ! = N 5 3 2 1 = 2 4 ( 2 4 ) ⋅ 2 = N 5 4 1 1 = 1 2 ( 2 4 ) ⋅ 2 = N 4 4 2 1 = 1 2 ( 2 4 ) ⋅ 2 = N 4 3 2 2 = 1 2 ( 2 4 ) ⋅ 2 = N 4 3 3 1 = 1 2 ( 1 4 ) = N 3 3 3 2 = 4
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 piece of chicken S 1 they can do this in 4 ways ( the number of ways of choosing 1 type of 4 :
S 1 = ( 1 4 ) = 4
For a person that gets 2 pieces of chicken S 2 they can do this in 1 0 ways: They can fill the order with all 1 type or they may select 2 out of the 4 types ( 1 type1 + 1 type2 ):
S 2 = ( 1 4 ) + B B , L L , T T , W W ( 2 4 ) ⋅ ( 1 1 ) = 1 0 W B , W L , W T L B , L T , T B
For a person that gets 3 pieces of chicken S 3 they can do this in 2 0 ways: They can fill the order with all 1 type , they may select 2 out of the 4 types ( 6 ways ) in 2 ways each ( 1 type1 + 2 type2 or 2 type1 + 1 type2 ), or they may select 3 out of the 4 types ( 4 ways ) in 1 way ( ( 1 type1 + 1 type2 + 1 type3 ):
S 3 = ( 1 4 ) + ( 2 4 ) ⋅ ( 1 2 ) + ( 3 4 ) ⋅ ( 2 2 ) = 2 0
We keep on with this pattern:
S 4 = ( 1 4 ) + ( 2 4 ) ⋅ ( 1 3 ) + ( 3 4 ) ⋅ ( 2 3 ) + ( 4 4 ) ⋅ ( 3 3 ) = 3 5
Now that we’ve made it to all 4 types as a selection we can write a general way to order i pieces in up to 4 types:
S i = j = 0 ∑ 3 [ ( j + 1 4 ) ⋅ ( j i − 1 ) ]
Thus, for 4 friends a , b , c , d the number of ways to order w + x + y + z pieces is given by:
∑ ( N w x y z ⋅ S w ⋅ S x ⋅ S y ⋅ S z )
Example: ( w = 8 , x = 1 , y = 1 , z = 1 )
N 8 1 1 1 ⋅ S 8 ⋅ S 1 3 = 4 ⋅ [ ( 1 4 ) + ( 2 4 ) ⋅ ( 1 7 ) + ( 3 4 ) ⋅ ( 2 7 ) + ( 4 4 ) ⋅ ( 3 7 ) ] ⋅ ( 1 4 ) 3 = 4 2 , 2 4 0
Repeating this calculation for each of the enumerated sums above, the total number from the summation is: 5 , 0 9 3 , 9 2 0 ways
Dammit, I missed the (5,2,2,2) case
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.
Problem Loading...
Note Loading...
Set Loading...
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 1 1 objects into 1 6 boxes, which is equal to ( 1 1 2 6 ) by a standard stars-and-bars argument.
Let 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 1 1 pieces of chicken amongst the other three friends, which is the number of ways of putting 1 1 objects into 1 2 boxes, which is ( 1 1 2 2 ) .
Let 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 1 1 pieces of chicken amongst the other two friends, which is the number of ways of putting 1 1 objects into 8 boxes, which is ( 1 1 1 8 ) .
Let 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 1 1 objects into 4 boxes, which is ( 1 1 1 4 ) .
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 and hence the number of ways pf buying the chicken pieces, with every friend getting at least one piece of chicken is ( 1 1 2 6 ) − 4 ( 1 1 2 2 ) + 6 ( 1 1 1 8 ) − 4 ( 1 1 1 4 ) = 5 0 9 3 9 2 0
More generally, let N ( a , b , c ) be the number of ways in which a friends can by a total of b ≥ a pieces of chicken, which can can come in c different types, with each friend getting at least one piece of chicken.
Let S be the collection of a -tuples ( u 1 , u 2 , . . . , u a ) of positive integers which add to b . Then S is the set of possible distributions of total number of chicken pieces amongst the a friends. For each such distribution, the first friend has to arrange his u 1 pieces of chicken into the c different types that are available, and this can be done in ( c − 1 u 1 + c − 1 ) ways. The other friends have to do the same. Thus N ( a , b , c ) = ( u 1 , u 2 , . . . , u a ) ∈ S ∑ ( c − 1 u 1 + c − 1 ) ( c − 1 u 2 + c − 1 ) ⋯ ( c − 1 u a + c − 1 ) and this is the coefficient of X b in the power series expansion of ( u ≥ 1 ∑ ( c − 1 u + c − 1 ) X u ) a Now u ≥ 1 ∑ ( c − 1 u + c − 1 ) X u = ( c − 1 ) ! 1 d u c − 1 d c − 1 u = 1 ∑ ∞ X u + c − 1 = ( c − 1 ) ! 1 d u c − 1 d c − 1 1 − X X c = ( 1 − X ) c 1 − 1 and so N ( a , b , c ) is the coefficient of X b in the power series expansion of ( ( 1 − X ) c 1 − 1 ) a Again, we obtain N ( 4 , 1 1 , 4 ) = 5 0 9 3 9 2 0 .