My maths are a bit rusty, so please excuse me if this is too trivial or has been asked before (very likely!)
I have a set of 20 liquids, each described by three characteristics (A, B and C). How can I mix them to obtain a desired value of A, B and C?
For instance:
- liquid 1 is 2A, 2B, 10C
- liquid 2 is 10A, 5B, 1C
- liquid 3 is 2A, 8B, 9C
...
- liquid 20 is 1A, 3B, 6C
We want a mixture where their linear combination makes 5A, 5B, 5C. We assume that, for instance, mixing liquid 1 with liquid 2 in ratio 1:1 would give us (6A, 3.5B, 5.5C)
I hesitated to post this in a programming forum, because I guess at some point there would be need to rank the different solutions according to how close they are to the target, but it looks to me like solving a set of linear equations (except we might have 0, or many answers...) Could you help me get started?