©
Interdistance in an n-cube
  Simulates (Monte Carlo) the interdistances between points in an n-cube, n = 1, 2 or 3.
2024.Nov.25 05:20:02
n Dimension of n-cube. •
npoints No. of random points. •
.seed, klass Seed for random numbers, and no. of histogram classes. •
Show values Shows the coordinates of the graph. •

Simulates, via Monte Carlo (limited time), the points in a unit n-cube in 1, 2 or 3 dimensions, i.e., a (straight) line segment, a square or a cube, in order to find the distribution of the interdistances, i.e., the distances between the two points for every pair of points. In the Figure, is shown a square (n = 2) with npoints = 100 random points.

Plots the density function (pdf), f(d), and the probability function (cdf), F(d), for the distance, and computes its mean and standard-deviation.

The longest diagonal in the n-cube has size √n  (1, 1.414, 1.732).

square
References: Plate: interdistance

Hypercube (Wikipedia).

• Google "random number generation"

• 1473-02-19: Copernicus, Nicolaus (1543-05-24).

 
 
Valid HTML 4.01! IST http://web.ist.utl.pt/~mcasquilho/compute/or/Fx-interdistance.php
Created: 2013-02-19 — Last modified: 2013-02-18