Any (or all) of the three sons can apply to the probate office for a 'grant of letters of administration', which gives him/them the power to administer the estate. (This is similar to seeking probate when the deceased person has left a will). The former wives could not obtain such a grant.
Whoever has the grant is responsible for distributing the residual estate after all bills and funeral expenses have been paid. i.e. the money to pay for these things comes directly from the assets of the deceased person. The person who actually makes the payments, using those funds, is whichever son has been granted letters of administration. (As previously indicated, two or three of the sons could jointly seek letters of administration. If they did so, it would be for them to decide who should actually handle the payment of bills).
If the deceased person only leaves cash and personal possessions (and no money in bank accounts, etc) there is no need for anyone to obtain a grant of letters of administration. Any of the sons could simply distribute the very small estate without any formalities. Similarly, if there were just small amounts in the deceased person's bank accounts, the banks might release the funds to one of the sons simply upon presentation of a death certificate and proof of the son's ID.
If the deceased person's estate is insufficient to pay off his debts, nobody has to pay them. (The lenders simply have to write off the debts). If the deceased person's estate is insufficient to cover his funeral expenses, the relatives usually agree to share the cost but this isn't obligatory. They could simply walk away and leave it to the local authority to arrange a 'pauper's funeral'.
Chris