Suppose I have Items $H$ and $K$, which cost me $5$ and $2$ dollars respectively. If sold, I will gain $10$ dollars for item $H$ and $5$ dollars for item $K$ Suppose also I have scenarios A and B and the likelihood of each happening is 50%. Next, in scenario A, people will buy all at most 500 items $H$ for $10$ dollars and $0$ item $K$, and in scenario B, people will buy at most $100$ item $H$ and $1000$ item $K$. I have $2500$ dollars, How can I combo my items of $H$ and $K$ so that I can maximize my gain (minimize loss) no matter which scenario happened?
I only know that we should follow the function $5H+2K \leq 2500$ since it sets the number of items that I can buy to sell. However, I don't have any idea how to relate this inequality to the gain/loss and also the two scenarios. I suppose I have to find one or more functions to represent these two quantities? Any help is appreicated.
Let $r$ denote the number of items of type H that you purchase.
Let $s$ denote the number of items of type K that you purchase.
First, establish a baseline proposed purchase of
$r = 100, s = 1000,$ which results in an expenditure of $2500$.
Under this baseline proposal, your profits are
So, the disparity is $3500 - 500 = 3000.$
This $3000$ must be bridged, by increasing the value of $r$, and decreasing the value of $s$.
Suppose that you increase the value of $r$ by $2k$ and decrease the value of $s$ by $5k$, where $k \in \Bbb{Z^+}$ and $k \leq 200$.
Since $(5 \times 2k) - (2 \times 5k) = 0$, you will continue to spend exactly $2500$.
Further, you will gain $10k$ under A, and lose $15k$ under B. So, the net effect willl be to bring the results of A and B, $25k$ closer.
Since the amount to be bridged is $25 \times 120 = 3000$
you should set $k = 120$.
This implies that the final computation is
$r = 100 + 2(120) = 340, ~s = 1000 - 5(120) = 400.$
Then
Edit
Well, this is embarrassing. I went off the rails, overlooking that the actual profit is gross sales minus expenditure, where the expenditure is fixed at 2500.
That is, I should have assumed that unsold inventory is trashed.
So, the method is right, but the math was wrong.
For example, if $r = 340, s = 400$, then your gross sales under A are $[3400]$, and your gross sales under B are $[(1000) + (2000) = 3000 \neq 3400].$
The corrected math is:
Under the baseline, your gross sales are
So, the disparity in gross sales to be bridged is $(5000)$.
When $r$ is increased by $(2k)$, and $s$ is decreased by $(5k)$
So the net effect is to bring the gross sales of A $(45k)$ closer to the gross sales of B.
Since the amount to be bridged is $5000 \approx 45 \times 111$, the natural inclination is to set $k = 111$.
This implies that the approximate final computation, which will need fine tuning is:
$r = 100 + 2(111) = 322, ~s = 1000 - 5(111) = 445.$
Then
This can be improved by holding $r$ at $322$, and reducing $s$ to $444$. Under A, since your expenditure is decreased by $2$, you have increased your profit by $2$. Under B, since you have purchased and sold one less of item K, you have lost a profit of 3.
Under this scenario, $r = 322, s = 444$ (instead of $445$), the profit (gross sales minus expenditures) under A and B match.