I'm trying to figure out if there is an algorithm which can solve the following:
Given an array of randomly generated values, for example: $$[54.6, 1.96, 5.0, 31.31]$$
Find an array of equal length, in this example $[x_1, x_2, x_3, x_4]$ such that:
$$54.6 \cdot x_1=1.96\cdot x_2=5.0\cdot x_3= 31.31\cdot x_4$$
$$x_1 + x_2 + x_3 + x_4 = 1.0$$
Any suggestions for an algorithm to solve this?