Sharing out money Say I have $M$ dollars that need to be shared between 4 people. Each person will obviously get $\frac{M}{4}$.
However, each of the 4 people has already taken some so that there is none left.
Person A took $a$ dollars, person B took $b$ dollars, person C took $c$ dollars and person D took $d$ dollars.

*

*If $a=b=c$ then how much do they give $d$ so that $a=b=c=d$?


*I tell person A to give $w$ amount to everyone else, if they don't have equal money, then I tell person B to give $x$ to everyone, if they don't have equal money, then I tell person C to give $y$ to everyone else, if they don't have equal money, then I tell person D to give $z$ to everyone else.
What is a formula for $w,x,y$ and $z$ such that once person D gives away $z$ everyone has equal money?
 A: 1.If $a > d$ (which seems to be implied by your question), then A, B and C each need to give D the following amount :
$$\frac{\frac{M}{4} - d}{3}$$
(D is missing $\frac{M}{4} - d$ dollars to have a fair share, and since A, B and C each have the same amount, each needs to contribute a third of the missing money to D)
However, it's entirely possible that $d > a$, in which case D would be the one having to give money back to A, B and C. The amount that D would need to give back to each of them is :
$$\frac{M}{4} - a$$
2.If you can devise a system such that, after C has given away $y$ dollars, (i) D has more money than A and (ii) A, B and C have the same amount of money, then $z$ can be calculated using the answer to the previous question.
In a similar fashion, a formula for $y$ that allows one to reach this desired state (where both (i) and (ii) are true) can be calculated assuming that by the time C is giving away money, (i') A and B already have the same amount of cash and (ii') both C and D have more money than A.
Then, to completely solve the puzzle, you only need to figure out values for $w$ and $x$ such that (i') and (ii') are true before C has to share any money.
Such a solution exists and can be found with a bit of trial and error ;)
