An amateur bodybuilder is looking for supplement protein bars to build his muscle fast, and there are 2 available products: protein bar A and protein bar B.
Each protein bar A contains 15 g of protein and 30 g of carbohydrates and has total 200 calories. On the other hand, each protein bar B contains 30 g of protein and 20 g of carbohydrates and has total 240 calories.
According to his nutritional plan, this bodybuilder needs at least 20,000 calories from these supplements over the month, which must comprise of at least 1,800 g of protein and at least 2,200 g of carbohydrates.
If each protein bar A costs $3 and each protein bar B costs $4, what is the least possible amount of money (in $) he can spend to meet all his one-month requirements?
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.
Shouldn't the first test coordinate by (0 , 110)?
Another take on this, the above information gives 3 equations (A is bar A, B is bar B): 1 5 A + 3 0 B = 1 8 0 0 ( 1 ) 3 0 A + 2 0 B = 2 2 0 0 ( 2 ) 2 0 0 A + 2 4 0 B = 2 0 0 0 0 ( 3 ) It's ineffective to solve a system of three equations with only two variables, but you can group these in 3 sets of two and solve each of those. ( 1 ) a n d ( 2 ) : A = 5 0 , B = 3 5 ( 1 ) a n d ( 3 ) : A = 7 0 , B = 2 5 ( 2 ) a n d ( 3 ) : A = 4 0 , B = 5 0 Now check each pairing with the third equation to make sure it works. (1) and (2) do not give enough calories, so that one is out. (1) and (3) give 2600g of carbohydrates, and (2) and (3) give 2100g of protein. Those both work. ( 1 ) a n d ( 3 ) c o s t s $ 3 1 0 ( 2 ) a n d ( 3 ) c o s t s $ 3 2 0 The least price wins.
Let us presume we don't have a method of graphically displaying the inequalities (as I often don't while scratching my daily solving itch). Also, let 1 protein = P, 1 carbohydrate = C, 1 calorie = E, and 1 dollar = D. From the problem,
A=15P, 30C, 200E, 3D B=30P, 20C, 240E, 4D
On a nutrition per D basis, A=5P, 10C, 6 6 . 6 ˙ E B=7.5P, 5C, 60E
From this we can see that bar B provides the best P per D, and bar A provides the bes C and E per D.
To solve from here, we need to bring one of P, C, or E to the required value using only one type of bar, then add the other type of bars to increase the other variables whilst holding the first constant by removing the first type of bar. As bar A is more cost effective in both C and E, we will first use bar B to minimise the cost of P.
1 8 0 0 ÷ 3 0 = x x = 6 0
60B=1800P, 1200C, 14400E
From the problem, we know that if we remove one bar of B, we must replace it with two bars of A to maintain the same total P. This will increase C by 40 E by 60, and D by 2. We need to increase C by 1000, so we will need 1 0 0 0 ÷ 4 0 = 2 5 exchanges to reach the target C value. This will result in 50 A and 35 B.
50A+35B=1800P, 2200C, 18400E
We still require 1600C to satisfy the question requirements. Using just bar A, this will cost 1 6 0 0 ÷ 2 0 0 × 3 = 2 4 D . Using exchanges, it will cost 1 6 0 0 ÷ 1 6 0 × 2 = 2 0 D . (We have already established that Bar B is more expensive per D than bar A, and therefore is excluded from consideration). Therefore, we require 1 6 0 0 ÷ 1 6 0 = 1 0 exchanges, resulting in 70A and 25 B.
70A+35B=1800P, 2600C, 20000E, 310D, or $310
Seriously, you need to fix the wording of this problem to make clear that "at least" 2,200 g of carbohydrates is required. The way it reads now, it can be interpreted to read, "exactly 2,200 g of carbohydrates", which which case the minimum monthly cost is $320, not $310.
It's done. Thank you for your advice.
Thanks. I see that this problem has been updated. Those who previously answered 320 has been marked correct.
In future, if you spot any errors with a problem, you can “report” it by selecting "report problem" in the “line line line” menu in the top right corner. This will notify the problem creator who can fix the issues.
I solved using Minimize on Mathematica.
https://reference.wolfram.com/language/tutorial/ConstrainedOptimizationLinearProgramming.html
Problem Loading...
Note Loading...
Set Loading...
Let x be amount of protein bars A and y be amount of protein bar B .
From the information in the question, we can set up system of linear inequalities as following:
x ≥ 0
y ≥ 0
2 0 0 x + 2 4 0 y ≥ 2 0 , 0 0 0
1 5 x + 3 0 y ≥ 1 , 8 0 0
3 0 x + 2 0 y ≥ 2 , 2 0 0
Then when drawing the graphs for these inequalities, we will obtain the red line for the calories linear equation 5 x + 6 y = 5 0 0 , blue for protein equation x + 2 y = 1 2 0 , and green for carbohydrate equation 3 x + 2 y = 2 2 0 , with yellow region as the viable coordinates meeting all constraints:
According to the linear programming, the optimal solution to the cost equation Z = 3 x + 4 y will lie upon one of the vertices of the yellow polygon. Therefore, there are 4 intersecting points to consider: ( 0 , 1 1 0 ) , ( 4 0 , 5 0 ) , ( 7 0 , 2 5 ) , ( 1 2 0 , 0 )
Plugging in the coordinate values for Z , we will get:
Z ( 0 , 1 1 0 ) = 4 × 1 1 0 = 4 4 0
Z ( 4 0 , 5 0 ) = ( 3 × 4 0 ) + ( 4 × 5 0 ) = 3 2 0
Z ( 7 0 , 2 5 ) = ( 3 × 7 0 ) + ( 4 × 2 5 ) = 3 1 0
Z ( 1 2 0 , 0 ) = 3 × 1 2 0 = 3 6 0
As a result, the bodybuilder can spend 3 1 0 dollars, which is the least possible amount of money, to purchase the protein bars and meet his one-month requirements.