I am trying to optimize decision making in a business idea I am working on. I have formulated a framework for a model, but am stuck when it comes to solving it.
Assume I am given $4$ positive integers between $0$-$100$.
The values of these numbers have a ratio such that if the lowest value can be represented by $100\text{%}$, then each subsequent number is a $\text{%}$ representing how much bigger it is than the previous number. i.e. $100:125:200:400$. Let the numbers representing these ratios be $A, B, C, D$.
I must find $4$ numbers ($E, F, G, H$) such that the products of some of these numbers meet certain criteria. Specifically:
- $E \cdot G = I$
- $E \cdot H = J$
- $F \cdot G = K$
- $F \cdot H = L$
The numbers $I, J, K, L$, when arranged in some order, must have the same ratio as $A:B:C:D$.
With constraints that:
- $\frac{100}{E} + \frac{100}{F} = 100$
- $\frac{100}{G} + \frac{100}{H} = 100$
What I need is a way to plug in any 4 numbers I am given for $A, B, C, D$ and get the corresponding values of $E, F, G, H$.
Ideally I could find a way to model this on a computer, so any suggestions to that end would also be appreciated.
One thought is, let's assume a particular ordering of the variables $I,J,K,L$; in particular, let's assume that $I:J:K:L = A:B:C:D$. If we can deduce the conditions that allow a solution for this case, we can program them in to a computer and have it check each of the $24$ permutations of those four variables.
We are given the fact that $A,B,C,$ and $D$ are all non-zero, and the equations imply that $E,F,G,$ and $H$ are all non-zero. Introduce a single variable $t$ such that $I = tA,$ $J = tB,$ $K = tC,$ and $L = tD.$ This implies $t \neq 0.$ It also means you can write the first four equations in terms of known values and only one unknown, for example $EG = tA$.
Observe that by associating the product $EFGH$ two different ways we get $$ EFGH = (EG)(FH) = (tA)(tD) = t^2 AD, $$ $$ EFGH = (EH)(FG) = (tB)(tC) = t^2 BC, $$ from which we can conclude $$ AD = BC. $$
You can get $E,F,G,$ and $H$ out of the denominators of your equations by using facts such as $E = \frac{tA}{G}$, so $$\frac{100}{E} = \frac{100G}{tA}.$$ So now you have $$100 = \frac{100}{E} + \frac{100}{F} = \frac{100G}{tA} + \frac{100G}{tC} = \left(\frac{100}{A} + \frac{100}{C}\right)\frac Gt,$$ $$ G = \frac{100t}{100/A + 100/C} = \frac{tAC}{A + C}. $$
But also $$100 = \frac{100}{E} + \frac{100}{F} = \frac{100H}{tB} + \frac{100H}{tD} = \left(\frac{100}{B} + \frac{100}{D}\right)\frac Ht,$$ $$ H = \frac{tBD}{B + D}. $$ For similar reasons, $$ E = \frac{tAB}{A + B}, \qquad F = \frac{tCD}{C + D}. $$
Therefore $$ tA = EG = \frac{t^2A^2BC}{(A+B)(A+C)}, $$ from which we can conclude that $$ t = \frac{(A+B)(A+C)}{ABC} = \frac{(A^2+AB+AC+BC)}{ABC} = \frac1D + \frac1C + \frac1B + \frac1A $$ since $\frac{A^2}{ABC} = \frac{A^2}{A(AD)} = \frac1D.$ I believe (but you may want to check) that the equations $tB = EH,$ $tC = FG,$ and $tD = FH$ result in the same formula for $t$.
Now that we have a formula for $t,$ we can apply it as follows: \begin{align} t &= \frac1A + \frac1B + \frac1C + \frac1D \\ & = \frac1A + \frac1B + \frac1C + \frac{A^2}{ABC} \\ & = \frac{A + B}{AB} + \frac{AB + A^2}{ABC} \\ &= \frac{A + B}{AB}\left(1 + \frac AC\right), \end{align} and therefore $$ E = \frac{AB}{A + B}t = 1 + \frac AC. $$ We can also derive formulas for $F, G,$ and $H$ in terms of $A,B,C,$ and $D.$
So the procedure is, see if $AD = BC,$ and if it is, use the values of $A,B,C,$ and $D$ in the appropriate formulas to compute $E,F,G,$ and $H.$
If $AD \neq BC,$ however, the question is whether a different permutation of $I,J,K,$ and $L$ might work. Every possible permutation will lead to some equation in which the product of two of the variables $A,B,C,$ and $D$ equals the product of the other two. The only other possibilities are $AB = CD$ and $AC = BD.$ But using the fact that $0<A<B<C<D,$ which I believe was implied by your problem statement, we see that necessarily $AB < CD$ and $AC < BD.$ Therefore the only possible solution is when $AD = BC,$ and it is found using the procedure described above