# Algorithm to randomly distribute a fixed no. of points on a line such that density graph tends to a certain function?

Lets say I have 10 points. And I have 40 empty places. I want to randomly place those ten points in those places such that when I plot the avg. density of points vs. position, I should get a graph tending to $y=e^{-x^2}$

Can anyone suggest a way to devise an algorithm for doing this?

-
"Any one who considers arithmetical methods of producing random digits is, of course, in a state of sin." Von Neumann –  Quinn Culver Jun 21 at 14:55