Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Generate random numbers with fixed sum and different constraints
Replies: 25   Last Post: Sep 17, 2013 2:28 AM

 Messages: [ Previous | Next ]
 Roger Stafford Posts: 5,929 Registered: 12/7/04
Re: Generate random numbers with fixed sum and different constraints
Posted: Nov 19, 2012 8:54 PM

"David Epstein" <David.Epstein.spam@remove.warwick.ac.uk> wrote in message <k8d1g1\$4gr\$1@newscl01ah.mathworks.com>...
> @Roger: what were your reasons for rejecting this approach in your randfixedsum package on FEX?
- - - - - - - - - -
I think you will find that as n increases the acceptance rate in such a procedure shrinks toward zero altogether too rapidly, thereby restricting one in practice to a rather small range for n.

To get a feeling for this, consider an n-dimensional hypersphere of radius 1/2 enclosed in an n-dimensional cube with unit-length sides. The n-dimensional volume of the cube is 1 whereas that of the hypersphere for even n is (pi/4)^(n/2)/(n/2)! (See http://en.wikipedia.org/wiki/N-sphere.) For n = 50 this would be 1.53E-28, a small acceptance rate indeed.

Roger Stafford

Date Subject Author
11/14/12 Dmitrey Yershov
11/17/12 Greg Heath
11/17/12 Roger Stafford
11/17/12 Bruno Luong
11/17/12 Roger Stafford
11/18/12 Dmitrey Yershov
11/18/12 Bruno Luong
11/19/12 Bruno Luong
11/19/12 Dmitrey Yershov
11/19/12 Bruno Luong
11/19/12 Dmitrey Yershov
11/19/12 Bruno Luong
11/19/12 Bruno Luong
11/19/12 Roger Stafford
11/20/12 Bruno Luong
11/20/12 Bruno Luong
11/20/12 Roger Stafford
11/21/12 Bruno Luong
11/21/12 james bejon
11/20/12 james bejon
9/17/13 JS Hong
9/17/13 JS Hong
11/19/12 David Epstein
11/19/12 Roger Stafford
11/20/12 Bruno Luong
11/17/12 Greg Heath