solve a system of k equations with 3 unknowns and l constraints

358 Views Asked by At

It has been a while since school, and I need help solving the following system which then I'll have to implement to auto-find the unknown coefficients.

Find $x_i$, $y_i$ and $z_i$ such that:

$$\left\{\begin{matrix} x_{1} y_{1} z_{1} m_{1} = M_{1} = T n_{1}\\ x_{2} y_{2} z_{2} m_{2} = M_{2} = T n_{2}\\ \cdots \\ x_{9} y_{9} z_{9} m_{9} = M_{9} = T n_{9} \end{matrix}\right.$$

Given that:

  • $T$, $m_{i}$ and $n_{i}$ are known constants
  • $T,\, x_{i},\, m_{i},\, M_{i} \in \mathbb{Z}^{+}$
  • $\sum_{i} n_{i} = 1$ with 0 < $n_{i}$ < 1
  • $\sum_{i} M_{i} = \sum_{i} T n_{i} = T$
  • $x_{i}\in [1,+\infty [$ must be as small as possible
  • $y_{i}\in \{4,5,6\}$
  • $z_{i}\in \{1,4,30\}$

All advices are welcome, or at least point me to the right direction. :-)

1

There are 1 best solutions below

8
On

$x_{k} y_{k} z_{k} m_{k} = M_{k} = T n_{k}$

Set all unknowns on the left:

$x_{k} y_{k} z_{k} = \frac{M_{k}}{m_{k}} = \frac{T n_{k}}{m_{k}}$

You want to minimize $x_k$.

There are only $9$ unique combinations of $y_k z_k = [4,5,6,16,20,24,120,150,180]$

Modulo $\frac{M_{k}}{m_{k}}$ by the largest to smallest $y_k z_k$ until you get an integer :

i.e. $\frac{M_{k}}{m_{k}} \equiv 0$ (mod $y_k z_k$)

Then $x_k = \frac{M_{k}}{m_{k} y_k z_k}$ is the smallest $x_k$.

$y_k$ and $z_k$ are uniquely determined by the largest $y_k z_k$ divisor above.