I have little knowledge of Operations Research so any directions to reading material book/online will be welcomed
lets say that product A have price $p_A$, value(benefit) $v_A$ and we have number of units $n_A$, same for product B, $p_B$, $v_B$, $n_B$, assume that $p_A > b_B, v_A > v_B$
I would like to optimize function $$max \quad z = v_A * n_A * v_B * n_B$$ how to choose which product to buy in next step that would be wisest choice with respect to money spent?
I know how to choose optimally best choice for big (>100) amounts of A and B although it can be tricky when numbers are small (both < 5) if possible I would like to have general formula (maybe Bellman equation would solve problem)
one solution would be to try all sequences of purchases and then decide which sequence would be the best but it's time consuming or greedy solution based on benefit-to-cost ratio would do the trick