How could I solve this system of equations? 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.
 A: To ease reasoning I will use lowercase letters to denote the inverses of your variables.
You have a system of $5$ equations in $4$ unknowns, which can be written
$$egA=ehB=fgC=fhD\\e+f=1\\g+h=1$$ (or some permutation in the given parameters). This system is likely to be incompatible.
By eliminating two unknowns, you can rewrite it as
$$egA=e(1-g)B=(1-e)gC=(1-e)(1-g)D,$$
giving the solutions
$$e=\frac C{A+C},g=\frac B{A+B}$$ with the compatibility condition (after simplifications)
$$BC=AD.$$
A: SOLUTION:
Under the assumption that you can always find some $E$, $F$, $G$, $H$ for whatever work you're concerned with, here are the steps:
Step 1: You check the equality $\frac{A}{B}=\frac{C}{D}$ to check if it holds. Also note that this is the step where the existence of a solution to your problem is decided.
Step 2: If the above equality holds, set $E = \left (1 +{B\over D}\right )$, $F = \left ( 1 +{D\over B}\right )$, $G = \left ( 1 +{A\over B} \right )$, $H = \left ( 1 +{B\over A} \right )$.
$
\\
\\
$
NOTE: No solution exists for the sample data that you have provided.
$
\\
\\
$
DETAILS:
The constraints provided here, in their simplified form, are:
$$
{1\over E} + {1\over F} = 1
$$
and
$$
{1\over G} + {1\over H} = 1.
$$
If we multiply the two equations, we have
$
{1\over E \cdot G} + {1\over E \cdot H} + {1\over F \cdot G} + {1\over F \cdot H} = 1 \\
\implies {1\over I} + {1\over J} + {1\over K} + {1\over L} = 1,
$
where $I = E\cdot F$, $J=E\cdot H$, $K=F\cdot G$, $L=F\cdot H$.
Now, if we have
$
\alpha = \frac{1}{A}+\frac{1}{B}+\frac{1}{C}+\frac{1}{D} \\
\implies 1 = \frac{1}{A\alpha}+\frac{1}{B\alpha}+\frac{1}{C\alpha}+\frac{1}{D\alpha}
$
and we set $I = A\alpha$, $J = B\alpha$,
$K = C\alpha$, $L = D\alpha$, then $I:J:K:L = A:B:C:D$ which is a given condition. However, this is not the only order that $I$, $J$, $K$, and $L$ might follow.
From the relations $I = E\cdot F$, $J=E\cdot H$, $K=F\cdot G$, $L=F\cdot H$, it is easy to see that $\frac{I}{J} = \frac{K}{L}$. Hence, whatever order that $I$, $J$, $K$, and $L$ follow, one of these four equations must be satisfied for E, F, G, H to exist:
(1) $\frac{A}{B}=\frac{C}{D}$, (2) $\frac{A}{B}=\frac{D}{C}$, (3) $\frac{A}{D}=\frac{C}{B}$.
But it's easy to check that, according to the problem you've stated, $AC<BD$ and $AB<CD$. Hence, only the first equality can hold.
If the equality holds, we can set $I = A\alpha$, $J = B\alpha$, $K = C\alpha$, $L = D\alpha$ so that $I:J:K:L = A:B:C:D$. 
Now, $\frac{E}{F}=\frac{J}{L}$ and $\frac{G}{H} = \frac{I}{J}$. But
$
{1\over E} + {1\over F} = 1\\
\implies {1\over F}\left ( 1 + {L\over J} \right ) = 1\\
\implies F = \left ( 1 + {L\over J} \right ).
$
Hence, $E = {J \over L} \left ( 1 + {L\over J} \right ) = \left ( 1 + {J\over L} \right )$. We take a similar approach to compute $G$ and $H$.
Substituting the values of $I$, $J$, $K$, $L$, we get the result we're looking for.
A: 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
