Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Generate random numbers with fixed sum and different constraints
Date: Tue, 20 Nov 2012 01:54:09 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 8
Message-ID: <k8ens1$kfr$1@newscl01ah.mathworks.com>
References: <k80995$9eo$1@newscl01ah.mathworks.com> <k87s11$h6u$1@newscl01ah.mathworks.com> <k88l7g$7tm$1@newscl01ah.mathworks.com> <k88qag$nm1$1@newscl01ah.mathworks.com> <k89ehg$rm6$1@newscl01ah.mathworks.com> <k8b4e9$ja7$1@newscl01ah.mathworks.com> <k8badi$8rd$1@newscl01ah.mathworks.com> <k8d1g1$4gr$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1353376449 20987 172.30.248.47 (20 Nov 2012 01:54:09 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 20 Nov 2012 01:54:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:783114

"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