Calculating percentage gains My math is a bit rusty, especially when I have to calculate percentages and when in background for that is finances.
I have the following table, that I just cannot figure at the moment:
+------+---------+----------+-----+
|  id  |  input  |  output  |  %  |
+------+---------+----------+-----+
|    1 |     100 |        x |   Y |
|    2 |    2000 |        x |   Y |
|    3 |    1000 |        x |   Y |
|    4 |     500 |        x |   Y |
|    5 |      50 |        x |   Y |
|    6 |     100 |        x |   Y |
|    7 |     200 |        x |   Y |
|    8 |    4000 |        x |   Y |
|    9 |     600 |        x |   Y |
|   10 |     250 |        x |   Y |
+------+---------+----------+-----+
|    n |       z |        x |   Y |
+------+---------+----------+-----+

For each row:


*

*$\text{output} = \text{input} \times (Y / 100)$; (fixed from input * Y)

*id ($n$) can fill up to infinity;

*$z > 0$


Ending half of the table (> id / 2 < n), $Y = 50$.
I have to find the $Y$ of first half, where, for $\text{id} / 2$, $Y = 100$.
$Y$ has to follow up, so that in the end totals of input match the totals of output.
For first half, each rows output has to be higher than input.
How do I do this, and, how would this break into steps?
P.S. The tag might be wrong, I have no idea about the English mathematical terminology, not my native language.
update
To narrow it down a bit (previous table with limit of 10, filled in, explained):
+------+---------+----------+-----+
|  id  |  input  |  output  |  %  |
+------+---------+----------+-----+
|    1 |     100 |        x |   Y | // highest Y
|    2 |    2000 |        x |   Y | // Y higher than that of id 3
|    3 |    1000 |        x |   Y | // Y higher than that of id 4
|    4 |     500 |        x |   Y | // lowest Y, but above 100
|    5 |      50 |       50 | 100 |
|    6 |     100 |       50 |  50 |
|    7 |     200 |      100 |  50 |
|    8 |    4000 |     2000 |  50 |
|    9 |     600 |      300 |  50 |
|   10 |     250 |      125 |  50 |
+------+---------+----------+-----+
| Totals:   8800 |     2625 |
+----------------+----------+

Now, here the last half has recieved 50% of their input, that totals $2625$ of total input.
That leaves us with $6175 (8800 - 2625)$. Now, this $6175$ has to be distributed, that everyone recieves more than their input, and the closer to first, the more they recieve.
The first row, does not have to have the highest output, but the highest % ($Y$).
I'd call it input increase percentage that, when applied, results in higher output.
Thanks in advance!
 A: I don't really understand your question, so with your help I'll try to clarify it, for myself really.
I'd write, for clarity, the id as $i$, the input as $x_{i}$, output as $y_{i}$ and percentages as $p_{i}$. Then $y_{i}=p_{i} * x_{i}$ and $\sum_{i=1}^n x_{i} = \sum_{i=1}^n y_{i}$. This is what I've managed to gather so far.
Now, what did you mean by these 2 statements:


*

*Ending half of the table (> id / 2 < n), Y = 50.

*I have to find the Y of first half, where, for id / 2, Y = 100.


Is it that for all $i$, when $\frac{i}{n} &lt \frac{1}{2}$, then $p_{i}=100$ and when $\frac{i}{n} > \frac{1}{2}$, then $p_{i}=50$ ? Also, I think that this condition is also necessary: $\sum_{i=1}^n p_{i}=1$.
EDIT after extra info.
So, I wrote: $61.75=p_{1}+5(4p_{2}+2p_{3}+p_{4})$.
Then, one solution for $p_{i}, i=1..4,$ could be: $p_{1}=10.3, p_{2}=29.4, p_{3}=14.7, p_{4}=7.35$
So, a solution for $y_{i}, i=1..4,$ could be: $y_{1}=1030, y_{2}=2940, y_{3}=1470, y_{4}=735$
I hope this is what you wanted.
EDIT after $y_{1}>y_{2}>y_{3}>y_{4}>100$.
One solution could be found for $p_{1}=19.65, p_{2}=0.842, p_{3}=1.403$ and $p_{4}=2.246$.
Therefore, $y_{1}=1965, y_{2}=1684,y_{3}=1403$ and $y_{4}=1123$.
This should be OK now.
