03/12/2010 (12:21 pm)
Filed under: nappedeptrole.com edit
I have a hypercube in N dimensions that spans the range 0 to 1 in each
dimension (aka, its hyper-volume is always 1), and I pick two points
at random in that hypercube and observe that their distance is d.
What is the probability of picking two points at random in that
hypercube and finding that their distance is less than or equal to d?
Ultimately, I would like an answer in terms of d and N. The answer
can be a recurrence relation, as long as it can be solved *exactly* in
a reasonably short time on a computer.Here's a start: the expectation value of the squared distance between
two randomly chosen points is
= N/6.Howdy,
You definitely want to role dice !
This is a perfect example for a monte carlo simulation.
1. Pick a random vector (x1, x2, x3, ...xN) in the cube
2. Pick another vector (y1, y2, y3, ...yN) in the cube
( all xi, yi from the interval {0..1} )
3. Determine D = sqrt( sum_i[xi-yi] )
4. Count success S -> S+1, if D <= Dmax
5. Repeat M times from 1. M being large
6. Prob (D <= Dmax) = S/M
I just wrote a short programm that'll display the dependance P(Dmax)
for a fixed number of dimensions N. The result is extremly fascinating
- seriously!Isn't the probability of this problem dependent on the number of
points in the space?I don't think the problem can be solved "exactly". See
http://mathworld.wolfram.com/HypercubeLinePicking.htmlChange step 3 to:
3. Determine D = sqrt( sum_i[ (xi-yi)^2 ] )> Isn't the probability of this problem dependent on
> the number of points in the space?
We are all assuming that the original question asked about continua,
in which there are an infinite number of points. The cardinality of
the set of points in any N-dimensional space (N>0) is the same; all
contain aleph-1 points.When you add two independent random variables together, the pdf of the
sum is the convolution of the pdfs of the two variables. The distance
between two points between 0 and 1 (in 1 dimension) chosen randomly
according to a uniform distribution may be regarded as the absolute
value of the sum of two numbers, one chosen randomly from between 0
and 1, and the other from between -1 and 0. The convolution gives a
triangle function, and, with the absolute value, the pdf is
2 - 2d, 0
#If you have any other info about this subject , Please add it free.# |
|