Mean line segment length

Last updated

In geometry, the mean line segment length is the average length of a line segment connecting two points chosen uniformly at random in a given shape. In other words, it is the expected Euclidean distance between two random points, where each point in the shape is equally likely to be chosen.

Contents

Even for simple shapes such as a square or a triangle, solving for the exact value of their mean line segment lengths can be difficult because their closed-form expressions can get quite complicated. As an example, consider the following question:

What is the average distance between two randomly chosen points inside a square with side length 1?

While the question may seem simple, it has a fairly complicated answer; the exact value for this is .

Formal definition

The mean line segment length for an n-dimensional shape S may formally be defined as the expected Euclidean distance ||⋅|| between two random points x and y, [1]

where λ is the n-dimensional Lebesgue measure.

For the two-dimensional case, this is defined using the distance formula for two points (x1, y1) and (x2, y2)

Approximation methods

Monte Carlo method to approximate the mean line segment length of a unit square. Mean line segment length Unit square.gif
Monte Carlo method to approximate the mean line segment length of a unit square.

Since computing the mean line segment length involves calculating multidimensional integrals, various methods for numerical integration can be used to approximate this value for any shape.

One such method is the Monte Carlo method. To approximate the mean line segment length of a given shape, two points are randomly chosen in its interior and the distance is measured. After several repetitions of these steps, the average of these distances will eventually converge to the true value.

These methods can only give an approximation; they cannot be used to determine its exact value.

Formulas

Line segment

For a line segment of length d, the average distance between two points is 1/3d. [1]

Triangle

For a triangle with side lengths a, b, and c, the average distance between two points in its interior is given by the formula [2]

where is the semiperimeter, and denotes .

For an equilateral triangle with side length a, this is equal to

Square and rectangles

The average distance between two points inside a square with side length s is [3]

More generally, the mean line segment length of a rectangle with side lengths l and w is [1]

where is the length of the rectangle's diagonal.

If the two points are instead chosen to be on different sides of the square, the average distance is given by [3] [4]

Cube and hypercubes

The average distance between points inside an n-dimensional unit hypercube is denoted as Δ(n), and is given as [5]

The first two values, Δ(1) and Δ(2), refer to the unit line segment and unit square respectively.

For the three-dimensional case, the mean line segment length of a unit cube is also known as Robbins constant, named after David P. Robbins. This constant has a closed form, [6]

Its numerical value is approximately 0.661707182...(sequence A073012 in the OEIS )

Andersson et. al. (1976) showed that Δ(n) satisfies the bounds [7]

Choosing points from two different faces of the unit cube also gives a result with a closed form, given by, [4]

Circle and sphere

The average chord length between points on the circumference of a circle of radius r is [8]

And picking points on the surface of a sphere with radius r is [9]

Disks

The average distance between points inside a disk of radius r is [10]

The values for a half disk and quarter disk are also known. [11]

For a half disk of radius 1:

For a quarter disk of radius 1:

Balls

For a three-dimensional ball, this is

More generally, the mean line segment length of an n-ball is [1]

where βn depends on the parity of n,

General bounds

Burgstaller and Pillichshammer (2008) showed that for a compact subset of the n-dimensional Euclidean space with diameter 1, its mean line segment length L satisfies [1]

where Γ denotes the gamma function. For n = 2, a stronger bound exists.

Related Research Articles

<span class="mw-page-title-main">Circle</span> Simple curve of Euclidean geometry

A circle is a shape consisting of all points in a plane that are at a given distance from a given point, the centre. The distance between any point of the circle and the centre is called the radius. Usually, the radius is required to be a positive number. A circle with is a degenerate case. This article is about circles in Euclidean geometry, and, in particular, the Euclidean plane, except where otherwise noted.

<span class="mw-page-title-main">Ellipse</span> Plane curve: conic section

In mathematics, an ellipse is a plane curve surrounding two focal points, such that for all points on the curve, the sum of the two distances to the focal points is a constant. It generalizes a circle, which is the special type of ellipse in which the two focal points are the same. The elongation of an ellipse is measured by its eccentricity , a number ranging from to .

<span class="mw-page-title-main">Gamma function</span> Extension of the factorial function

In mathematics, the gamma function is one commonly used extension of the factorial function to complex numbers. The gamma function is defined for all complex numbers except the non-positive integers. For every positive integer n,

<span class="mw-page-title-main">Koch snowflake</span> Fractal curve

The Koch snowflake is a fractal curve and one of the earliest fractals to have been described. It is based on the Koch curve, which appeared in a 1904 paper titled "On a Continuous Curve Without Tangents, Constructible from Elementary Geometry" by the Swedish mathematician Helge von Koch.

<span class="mw-page-title-main">Imaginary unit</span> Principal square root of −1

The imaginary unit or unit imaginary number is a solution to the quadratic equation . Although there is no real number with this property, i can be used to extend the real numbers to what are called complex numbers, using addition and multiplication. A simple example of the use of i in a complex number is .

<span class="mw-page-title-main">Stirling's approximation</span> Approximation for factorials

In mathematics, Stirling's approximation is an approximation for factorials. It is a good approximation, leading to accurate results even for small values of . It is named after James Stirling, though a related but less precise result was first stated by Abraham de Moivre.

In linear algebra, two vectors in an inner product space are orthonormal if they are orthogonal unit vectors. A set of vectors form an orthonormal set if all vectors in the set are mutually orthogonal and all of unit length. An orthonormal set which forms a basis is called an orthonormal basis.

In mathematics, a Gaussian function, often simply referred to as a Gaussian, is a function of the base form

<span class="mw-page-title-main">Lemniscate of Bernoulli</span> Plane algebraic curve

In geometry, the lemniscate of Bernoulli is a plane curve defined from two given points F1 and F2, known as foci, at distance 2c from each other as the locus of points P so that PF1·PF2 = c2. The curve has a shape similar to the numeral 8 and to the ∞ symbol. Its name is from lemniscatus, which is Latin for "decorated with hanging ribbons". It is a special case of the Cassini oval and is a rational algebraic curve of degree 4.

<span class="mw-page-title-main">Surface of revolution</span> Surface created by rotating a curve about an axis

A surface of revolution is a surface in Euclidean space created by rotating a curve one full revolution around an axis of rotation.

<span class="mw-page-title-main">Inverse trigonometric functions</span> Inverse functions of the trigonometric functions

In mathematics, the inverse trigonometric functions are the inverse functions of the trigonometric functions. Specifically, they are the inverses of the sine, cosine, tangent, cotangent, secant, and cosecant functions, and are used to obtain an angle from any of the angle's trigonometric ratios. Inverse trigonometric functions are widely used in engineering, navigation, physics, and geometry.

A mathematical coincidence is said to occur when two expressions with no direct relationship show a near-equality which has no apparent theoretical explanation.

<span class="mw-page-title-main">Cone</span> Geometric shape

A cone is a three-dimensional geometric shape that tapers smoothly from a flat base to a point called the apex or vertex.

<span class="mw-page-title-main">Stieltjes constants</span>

In mathematics, the Stieltjes constants are the numbers that occur in the Laurent series expansion of the Riemann zeta function:

In polymer chemistry, an ideal chain is the simplest model to describe polymers, such as nucleic acids and proteins. It assumes that the monomers in a polymer are located at the steps of a hypothetical random walker that does not remember its previous steps. By neglecting interactions among monomers, this model assumes that two monomers can occupy the same location. Although it is simple, its generality gives insight about the physics of polymers.

<span class="mw-page-title-main">Strophoid</span> Geometric curve constructed from another curve and two points

In geometry, a strophoid is a curve generated from a given curve C and points A and O as follows: Let L be a variable line passing through O and intersecting C at K. Now let P1 and P2 be the two points on L whose distance from K is the same as the distance from A to K. The locus of such points P1 and P2 is then the strophoid of C with respect to the pole O and fixed point A. Note that AP1 and AP2 are at right angles in this construction.

<span class="mw-page-title-main">Complex logarithm</span> Logarithm of a complex number

In mathematics, a complex logarithm is a generalization of the natural logarithm to nonzero complex numbers. The term refers to one of the following, which are strongly related:

<span class="mw-page-title-main">Circular arc</span> Part of a circle between two points

A circular arc is the arc of a circle between a pair of distinct points. If the two points are not directly opposite each other, one of these arcs, the minor arc, subtends an angle at the center of the circle that is less than π radians ; and the other arc, the major arc, subtends an angle greater than π radians. The arc of a circle is defined as the part or segment of the circumference of a circle. A straight line that connects the two ends of the arc is known as a chord of a circle. If the length of an arc is exactly half of the circle, it is known as a semicircular arc.

<span class="mw-page-title-main">Dottie number</span> Mathematical constant related to the cosine function

In mathematics, the Dottie number is a constant that is the unique real root of the equation

References

  1. 1 2 3 4 5 Burgstaller, Bernhard; Pillichshammer, Friedrich (2009). "The Average Distance Between Two Points". Bulletin of the Australian Mathematical Society. 80 (3): 353–359. doi: 10.1017/S0004972709000707 .
  2. Weisstein, Eric W. "Triangle Line Picking". MathWorld .
  3. 1 2 Weisstein, Eric W. "Square Line Picking". MathWorld .
  4. 1 2 Bailey, David H.; Borwein, Jonathan M.; Kapoor, Vishaal; Weisstein, Eric W. (2006). "Ten Problems in Experimental Mathematics". The American Mathematical Monthly. 113 (6): 481–509. doi:10.2307/27641975. ISSN   0002-9890. JSTOR   27641975.
  5. Weisstein, Eric W. "Hypercube Line Picking". MathWorld .
  6. Robbins, David P.; Bolis, Theodore S. (1978), "Average distance between two points in a box (solution to elementary problem E2629)", American Mathematical Monthly , 85 (4): 277–278, doi:10.2307/2321177, JSTOR   2321177 .
  7. Anderssen, R. S.; Brent, R. P.; Daley, D. J.; Moran, P. A. P. (1976). "Concerning and a Taylor Series Method" (PDF). SIAM Journal on Applied Mathematics. 30 (1): 22–30. doi:10.1137/0130003.
  8. Weisstein, Eric W. "Circle Line Picking". MathWorld .
  9. Weisstein, Eric W. "Sphere Line Picking". MathWorld .
  10. Weisstein, Eric W. "Disk Line Picking". MathWorld .
  11. Weisstein, Eric W. "Circular Sector Line Picking". MathWorld .