I'm glad to ask my first question on the maths site! So here we go. I'm trying to set up prices right now and here is my problem :
I know that my customer has a certain amount of money available. This amount is known and fixed. So I would like to sell him my products to a certain price depending on their popularity. I have found that a good idea would be to use this popularity as a coefficient. (The popularity is also fixed and known, it is a percentage).
My goal is that the total price of all the products I'm selling doesn't exceed the amount of money my customer has. Therefore I ended up with this easy to find equation but I don't see how to solve it. $$a_1x_1 + \cdots +a_nx_n = b$$
For example, if my customer has $10$ dollars and if I have $20$ products to sell him, I would have this equation : $$a_1x_1 + \cdots + a_{20}x_{20} = 10$$
Where the $a_i$ are the popularity of each product. My goal is to find a repartition of the $x_i$ which is correlated with the $a_i$.
Thanks a lot
PS : I don't have a Phd so please... But I do have a MSc in Engineering. What I want to say is that I can understand advanced mathematics but start from the beginning of the story please ; )
Edit
My only criteria is that the repartition of the xi should reflect the repartition of the ai. For example if $a_2$ is the highest popularity, $x_2$ should be the highest price.
I think we can represent the desired criteria with the following system of equations $$ x_1 + x_2 + \cdots + x_n = b $$ and to enforce "reflection of the $a_i$" (assuming all $a_i$ are non-zero), we have $$ x_1/a_1 = x_2/a_2 = \cdots = x_n/a_n $$ Which gives us a system of $n$ equations on $n$ variables, which will have a unique solution.
We can find the solution as follows: define $t$ to be the common ratio $x_i/a_i$. We have $x_i = a_i t$, so that $$ a_1 t + a_2 t + \cdots + a_n t = b $$ Which is to say $$ (a_1 + \cdots + a_n)t = b \implies t = b/(a_1 + \cdots + a_n) $$ Once we have $t$, substitute back to find $x_1 = a_1 t$, $x_2 = a_2 t$, and so on.
All together, we have $$ x_i = \frac{a_i}{a_1 + a_2 + \cdots + a_n} \cdot b $$