System of linear inequalities - mixture We have 4 types bottles of water. Bottle 1 - with capacity

Jasmin Pineda

Jasmin Pineda

Answered question

2022-06-27

System of linear inequalities - mixture
We have 4 types bottles of water. Bottle 1 - with capacity 750ml - we have 2 for use with price 0,25 Bottle 2 - with capacity 500ml - we have 3 for use with price 0,5 Bottle 3 - with capacity 250ml - we have 5 for use with price 0,75 Bottle 4 - with capacity 100ml - we have 10 for use with price 1
Using water from these 4 types of bottles we have to create "aqueous mixture" containing 3050ml of water in total.
How we should pour water from those bottles that cost as low as possible and to have the least possible loss of water.
How to solve this?

Answer & Explanation

Korotnokby

Korotnokby

Beginner2022-06-28Added 19 answers

This seems like the knapsack problem - Note that while the native solution is exponential, programming the solution with some intelligence (that is, by using "dynamic programming" - i.e, solving it bottom up while using memoization) will give you a polynomial-time algorithm

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?