Generating n random variables whose summation will be 1. [I got the answer.]
EDIT
On genetic algorithm, we have to maintain population. Say, I have two individuals a and b. Every individual consists of $n$ pairs of ($x_i, \theta_i$), where $ 0 \leq i < n$. A fitness function evaluates fitness, $f$ of every individual. Constraint is for every individual is $\Sigma\theta_i \approx 1$ ($0.95 \leq \Sigma\theta_i < 1.05$ would suffice). $\theta_i$ associated with individual a will be adapted by some function (which I haven't figured out yet) of $d(a, b)$ & $\Delta f$. $\theta_i$ will be adaptive (by I guess something like covariance matrix). So if I increase value of $\theta_i$, values of some $\theta_j$ have to be decreased to maintain summation $\Sigma\theta_i \approx 1$. So I am seeking suggestion how can be $\theta_i$ adapted based on $d(a, b)$ & $\Delta f$?