At my butcher shop, you can buy 2 pounds of chicken thigh and 1 pound of chicken feet for 738 cents, and 3 pounds of chicken thigh and 1 pound of chicken heart for 852 cents.
For how many ordered sets of integers ( t , f , h ) , with each of the element between 0 and 100 inclusive, can you determine the exact total cost of t pounds of chicken thigh, f pounds of chicken feet, and h pounds of chicken heart?
Assume that the cost per pound of any given meat is constant.
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.
Great job! I did my math wrong, though. :(
That's a lot better than using the other of the triangle and splitting the sum into three parts for the three classes m o d 3 . Great solution!
We can determine the price of any combination x ( 2 t + f ) + y ( 3 t + h ) where x and y are integers.
The boundary conditions are 0 ≤ x , 0 ≤ y and 2 x + 3 y ≤ 1 0 0 .
So we need to count the grid points that lie within (or on the boundary of) the triangle with vertices ( 0 , 0 ) , ( 5 0 , 0 ) , ( 0 , 3 3 3 1 ) .
Starting at the top row (y=33), subsequent rows have 1 , 3 , 4 , 6 , 7 , 9 , . . . 4 9 , 5 1 gridpoints.
These numbers add up pairwise as 4 + 1 0 + 1 6 + . . . + 1 0 0 and we can take the sum of these as 2 1 0 4 × 1 7 = 8 8 4
Problem Loading...
Note Loading...
Set Loading...
We just have to count the number of couples ( f , h ) ∈ [ 0 , 1 0 0 ] 2 such that 3 f + 2 h ∈ [ 0 , 1 0 0 ] , that is: S = f = 0 ∑ 3 3 ( ⌊ 2 1 0 0 − 3 f ⌋ + 1 ) . By splitting the sum over even and odd values of f , we get: S = 2 ⋅ j = 0 ∑ 1 6 ( 5 0 − 3 j ) = 2 ⋅ ( 5 0 ⋅ 1 7 − 3 j = 0 ∑ 1 6 j ) = 2 ⋅ ( 5 0 ⋅ 1 7 − 3 ⋅ 8 ⋅ 1 7 ) = 2 ⋅ 1 7 ⋅ ( 5 0 − 2 4 ) = 8 8 4 .