What's the minimum value of for which, the average distance between any 2 points selected randomly in a unit hypercube ( n- dimensional cube ) is greater than ?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
I know this is a computer science question, but the solution can be worked out exactly with a bit of calculus. First, the distance formula. In 2 dimensions, it is d = ( x 2 − x 1 ) 2 + ( y 2 − y 1 ) 2 . This generalizes to higher dimensions by adding more terms under the square root. In other words, the total distance squared is the sum of the squares of the distances in each dimension. Since the question asks about the average distance, we can do the same but using the sum of the average distance squared. The average of the distance squared is given by:
1 − 0 1 1 − 0 1 ∫ 0 1 ∫ 0 1 ( x − y ) 2 d x d y = 6 1
Since this is true in each dimension, the average distance in n dimensions is n / 6 . 24 dimensions makes this exactly 2, so we need 25 dimensions to make the average greater than 2.
Note: I have used x and y here because I’m too lazy to type x 1 and x 2 multiple times. x and y are independent values along the same dimension, not perpendicular ones