An item is to be obtained at the minimum possible expected price. It can be obtained by paying a fixed price $F$, or by buying some gambles $G_i=(P_i,q_i)$ from a collection of offers $O=\{G_i|i\in\{0..n\}\}$, where $P_i$ denotes the price and $q_i$ denotes the failure probability of not obtaining the item from this gamble. Each gamble can only be taken some finite number of times.
It is straightforward to exclude gambles that aren't worth it at all by checking that $P_i+q_i*F<F$. So without loss of generality, assume all $n$ remaining gambles in $O$ are worth to exhaust before paying the fixed price.
The question is: What is the optimal order to exhaust them in that minimizes the expected total price $T$?
$$\min_j T_j=P_{j_1}+q_{j_1}*(P_{j_2}+q_{j_2}*(...+q_{j_n}*F)...)$$
(that is assuming each gamble can be bought at most once, but w.l.o.g. this generalizes to any finite number by duplicating offers)
I feel like there should be a straightforward way of doing this as each gamble is fully characterized by just two numbers, but I'm struggling to find some rigorous, clean way of doing so.
Checking all $n!$ possible permutations obviously gets infeasible very quickly, even for small $n$.
Slightly better is building up the sequence bottom-up (i.e. going backward from the end) by constructing them over all subsets and keeping track of the optimal order for any subset. But that still involves something in the order of $2^n$, and it feels even simpler.
My intuition tells me the viability of an individual gamble doesn't actually depend on the global ordering that much, it's just the way of measuring the full expected value that makes it appear like it does so. That it should be possible to construct some total ordering of viability using some priority function, invariant under the insertion or deletion of other offers from the gamble.
Suppose, for example, the expected price if an individual offer in consideration could be infinitely repeated:
$$V_i=P_i+q_i*V_i \Rightarrow V_i=\frac{P_i}{(1-q_i)}$$
My intuition tells me if I just order them by this, it should yield the globally optimal permutation, but I don't know how to prove it.
Is my intuition correct? Could you either show me a counter example where it fails, or show how it's possible to formally prove its correctness?
If it's wrong, is precluding the gambles with $P_i+q_i*F>F$ even safe, or is that wrong too? And is there an easier way to find the optimal permutation that doesn't involve going over all of $O$'s subsets?
Thank you in advance!
EDIT: We may assume $P_i >0$ if it simplifies the analysis.