Interesting question, hope someone has an idea how to do this in Java. I have a fixed integer value x, that I want to represent by a sum of integers x1, x2, ...,xn such that the following holds:
x = x1 + x2 + ... + xn;
For example, lets assume n=3 and x= 10
10 = 5 + 3 + 2;
The thing is, the x1,x2, ... xn shares should be uniformely distributed, and everytime I want to "split" the value x into the different shares, they should be different.
Anyone an idea how do could be done?
Thanks, Patrick