I have three given values, suppose a=1.86, b=2.6 and c=4.2. Now I have to figure out x,y,z such that
$x\gt 0,y\gt 0$ and $z\gt 0$
$x+y+z=1$
$a*x\gt 1, b*y\gt 1$ and $cz\gt 1$
I need a generalized solution steps for this to implement in programming.
Thanks.
Since we need all of $ax, by, cz$ to be greater than $1$, given a set of $(a,b,c)$ we want $x,y,z$ to be bigger than $\frac{1}{a},\frac{1}{b},\frac{1}{c}$.
To find a generalized set of steps, first calculate $\frac{1}{a}+\frac{1}{b}+\frac{1}{c}$. If this sum is greater than $1$, there are no solutions for $x,y,z$. This makes sense, because if we let $a,b,c$ to be $0.0001$ or some small number, $x,y,z$ would all have to be large and they would not sum to $1$, but we need $x+y+z=1$.
If it is less than or equal to $1$, then simply picking some number larger than $\frac{1}{a},\frac{1}{b},\frac{1}{c}$ for $x,y,z$ will do.
If $\frac{1}{a}+\frac{1}{b}+\frac{1}{c}<1$, we calculate $1-(\frac{1}{a}+\frac{1}{b}+\frac{1}{c})$. Call this value $n$. Find the value of $\frac{n}{3}$ and add it to $\frac{1}{a},\frac{1}{b},\frac{1}{c}$ and you will surely have values of $x,y,z$ that sum to $1$.