|
|
Re: Generate random numbers with fixed sum and different constraints
Posted:
Nov 18, 2012 12:04 PM
|
|
"Roger Stafford" wrote in message <k89ehg$rm6$1@newscl01ah.mathworks.com>... > "Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <k88qag$nm1$1@newscl01ah.mathworks.com>... > > Might be convert linear inequality into hull vertices. Use Delaunay to decompose the convex polytopes into union of simplexes then apply the barycenter coordinates to generate uniform distribution on simplexes. Put all that together, it should be able to generate the uniform distribution with required constraints. > > > > Bruno > - - - - - - - - - - > Yes, that is a conceivable approach, Bruno. However it faces some formidable difficulties with large dimensionality. For an n-dimensional cube with n equal to, say, 51 the number of vertices in the n-1 dimensional polytope with a fixed sum set at or near the half-way point would be 51!/25!^2 = 6,446,940,928,325,352. This would present quite a challenge to 'delaunayn'! Moreover, besides providing for the uniform distribution of each simplex, one must also choose different simplices in proportion to their n-1 dimensional volumes, and certainly with the unequal bound values Dmitrey has requested there would be a vast number of different volumes among them to compute. For a practical program to be able to handle large values of n there should be some underlying symmetry principle that greatly simplifies such proceedings as these, and at the moment I can't think what that might be for > unequal bounding intervals. > > Roger Stafford
Thanks to everyone who reply! In fact, I'll be happy if I have method for n<=5 which is able to generate 1000 points in less than 2 sec (processor 2,4 Ghs).
|
|