Skip to main content
1 of 2
john mangual
  • 22.8k
  • 4
  • 63
  • 172

I believe there is something called the Metropolis Algorithm The volume of your simplex (without the linear constraint) is $\frac{1}{n!}$ and so rejection sampling is terrible.

So instead you do a reflecting random walk in your space and the limiting distribution is uniform in the polyhedron.

If you want to know rigorously why the Metropolis-Hastings algorithm works, maybe you can try What do we know about the Metropolis-Hastings algorithm? by Diaconis and Salff-Lacoste.

Oh! I found it... Gibbs/Metropolis algorithms on a convex polytope ... but these very complicated. Just remember the phrase "detailed-balance".

john mangual
  • 22.8k
  • 4
  • 63
  • 172