2
$\begingroup$

I am working with granular materials (seeds). I am looking for a way to correctly scale the amount of different particles in one batch using weight only. I have worked with the problem a bit and instead of going in detail with the applied problem, I will try to present the problem more generally.

Let's say I have the following equation: $\sum_{i=1}^{n} x_i = 1$, for all $x_i \in \mathbb{R}$ and $x_i > 0$. I would like to solve for all $x_i$. Solving this problem, solves the applied problem.

I have the following constraints: $x_i / x_j = a_i b_i / a_j b_j $, for all $i,j = 1, 2, \ldots, n$.

Also, for all $a_i \in \mathbb{R}$, $a_j > 0$, $b_i \in \mathbb{R}$, $b_j > 0$, $\sum_{i=1}^{n} a_i = k$, and $k > 0$ (where usually $k = 1$).

All $a_i$, $b_i$ and $k$ are given as input to the the problem.

For $n=1$ and $n=2$ the problem is trivial (or atleast easy). But I am not sure about $n>2$. Is there a general solution?

1 Answers 1

2

Let $S = \sum_{i=1}^{n} a_i b_i$

then $x_i = \frac{a_ib_i}{S}$

is a solution.

Note that $\sum_{i=1}^{n} x_i = \sum_{i=1}^{n} \frac{a_i b_i}{S} = \frac{\sum_{i=1}^{n} a_i b_i}{S} = \frac{S}{S} = 1$

$\frac{x_i}{x_j} = \frac{a_ib_i/S}{a_jb_j/S} = \frac{a_ib_i}{a_jb_j}$

Also note that $x_i \gt 0$.

  • 0
    @kohler: You are welcome!2011-01-19