choosing N object from set of M>N maximizing overall ratio value/weight

160 Views Asked by At

I have a set of M objects each with a certain value and weight. From this set I want to take out N objects ($N<M$ of course) and maximize the ratio:

total value of the N objects / total weight of the N objects

It's a kind of an optimal selection problem.

My intuition tells me to choose the N objects with the highest value/weight ratio, that is sort the M objects according to this ratio in descending order and take the first N objects in the sorting sequence.

How can I demonstrate doing this will always yield the maximum total ratio?

My attempt: if optimal ratio is $\frac{a}{b}$ for a certain selection of $K$ objects and I have to add a $K+1$ object, between one with a ratio $\frac{x}{y}$ and another with ratio $\frac{w}{z}$, given that $$\frac{x}{y} > \frac{w}{z}$$ is the former always an optimal choice?

I thought the problem could algebrically be reduced to this: given $a,b$ positive constants, and $x,y,w,z$ all positive so that:

$$\frac{x}{y} > \frac{w}{z}$$

can or can never be that:

$$\frac{a+x}{b+y} < \frac{a+w}{b+z}$$

I am not able to answer this point, please help!

2

There are 2 best solutions below

2
On BEST ANSWER

$\dfrac{11}{20} \gt \dfrac12$ but $\dfrac{2+11}{3+20} \lt \dfrac{2+1}{3+2}$

so if you are choosing $N=2$ out of $\dfrac{2}{3},\dfrac{11}{20},\dfrac{1}{2}$ then your suggest algorithm will be suboptimal.

0
On

Supponse $M = 2$ and you have one item with very large weight $w$ and very large value $v$, such that the ratio $v/w$ is maximal by a large amount for this item. Then if you are forced to take another item, usually your best bet will be to choose the item with a very small weight, so that the ratio is relatively unchanged. This is true even if the value/weight ratio for the low weight item is not as good as the value/weight ratio for a much higher weight item.