How to minimize cost with two different sizes of drug vials?

  • Thread starter sub25
  • Start date
In summary, there is a drug available in two sizes, one with 300mg and a cost of 400, and the other with 500mg and a cost of 600. To minimize cost, a total dose of 1100mg is needed, and the optimal combination would be 2-300mg and 1-500mg vials. This can be solved by setting up the cost function and a constraint, and finding the minimum value using a quadratic function. Alternatively, a program can be used to check all possibilities and determine the best solution. It is recommended to use the former method, unless dealing with tricky problems.
  • #1
sub25
1
0
There is a drug that comes in two size. 1 is 300mg and cost 400 and 1 is 500mg and cost 600. Given a total dose needed, how many of each vile type do I need to minimize the cost.

Ex) I need a 1100mg dose, how many 300mg viles and how many 500 viles do I need to minimize the cost. I know the answer from looking at it is 2-300mg and 1-500mg.

So if x = # of 300mg viles and y = # of 500mg viles we have :

Total Cost = 400 * x + 600 * y; I also have the constraint that ( for this paticular example) 300x + 500y >= 1100mg.

I feel like this should be easy but my mind is not working.

Thanks

-Marc
 
Physics news on Phys.org
  • #2
Better to write 300x+ 500y= 1100. Then if x and y are not integers, choose the next larger integer.

Solve 300x+ 500y= 1100 for y, say, as a function of x. Replace y in the cost equation by that. That will result in a quadratic function of x which you can minimize by completeing the square.
 
  • #3
In some cases (but not in this one), the conversion from discrete to continuous isn't so forgiving. If this were one such case, you might do better to just write a program to check all possibilities and keep the largest. i.e.

Code:
for every point (x,y) in the domain
   do see if this yields the best solution so far
      if so, save this.
the optimum is the best solution so far.

For the record, you should usually use HallsOfIvy's method, except for trick problems designed to mess with your head.
 

FAQ: How to minimize cost with two different sizes of drug vials?

How can I minimize the impact of pollution on the environment?

In order to minimize the impact of pollution on the environment, it is important to reduce our carbon footprint by using renewable energy sources, recycling, and reducing our consumption of single-use products. Additionally, supporting legislation and policies that promote environmental protection can also help minimize pollution.

How can I minimize the spread of infectious diseases?

The best way to minimize the spread of infectious diseases is to practice good hygiene habits, such as washing your hands frequently, covering your mouth when coughing or sneezing, and avoiding contact with people who are sick. It is also important to get vaccinated and follow any guidelines or restrictions put in place by health officials during outbreaks.

How can I minimize food waste?

To minimize food waste, it is important to plan meals and only buy the necessary ingredients, properly store and preserve food, and repurpose leftovers. Donating excess food to those in need is also a great way to reduce food waste. Additionally, supporting businesses and organizations that prioritize reducing food waste can make a positive impact.

How can I minimize my carbon footprint?

There are many ways to minimize your carbon footprint, such as using public transportation or carpooling, reducing energy consumption by turning off lights and unplugging electronics when not in use, and supporting companies that prioritize sustainability. Planting trees and supporting conservation efforts can also help reduce carbon emissions.

How can I minimize the negative effects of climate change?

To minimize the negative effects of climate change, it is important to reduce our carbon footprint, support renewable energy sources, and advocate for policies and actions that address climate change. Additionally, making small changes in our daily lives, such as reducing meat consumption and supporting sustainable agriculture, can also make a positive impact on the environment.

Back
Top