I have an array of N integers (a[N]). I start removing numbers from the array one by one. If at any point I remove an element a[i] and the sum of the remaining numbers is S, then the happiness increases by an amount of S/a[i]. What is the expected value of the total happiness ?
Initial happiness can be considered as 0.