HOME

TheInfoList



OR:

In
geometry Geometry (; ) is a branch of mathematics concerned with properties of space such as the distance, shape, size, and relative position of figures. Geometry is, along with arithmetic, one of the oldest branches of mathematics. A mathematician w ...
, 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 In mathematics, the Euclidean distance between two points in Euclidean space is the length of the line segment between them. It can be calculated from the Cartesian coordinates of the points using the Pythagorean theorem, and therefore is o ...
between two random points, where each point in the shape is equally likely to be chosen. 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 expression In mathematics, an expression or equation is in closed form if it is formed with constants, variables, and a set of functions considered as ''basic'' and connected by arithmetic operations (, and integer powers) and function composition. ...
s 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 \frac.


Formal definition

The mean line segment length for an ''n''- dimensional shape ''S'' may formally be defined as the expected
Euclidean distance In mathematics, the Euclidean distance between two points in Euclidean space is the length of the line segment between them. It can be calculated from the Cartesian coordinates of the points using the Pythagorean theorem, and therefore is o ...
, , ⋅, , between two random points ''x'' and ''y'', : \mathbb E x-y\, \frac1\int_S \int_S \, x-y\, \,d\lambda(x) \,d\lambda(y) where ''λ'' is the ''n''-dimensional
Lebesgue measure In measure theory, a branch of mathematics, the Lebesgue measure, named after French mathematician Henri Lebesgue, is the standard way of assigning a measure to subsets of higher dimensional Euclidean '-spaces. For lower dimensions or , it c ...
. For the
two-dimensional A two-dimensional space is a mathematical space with two dimensions, meaning points have two degrees of freedom: their locations can be locally described with two coordinates or they can move in two independent directions. Common two-dimension ...
case, this is defined using the distance formula for two points (''x''1, ''y''1) and (''x''2, ''y''2) : \frac1\iint_S \iint_S \sqrt \,dx_1 \,dy_1 \,dx_2 \,dy_2.


Approximation methods

Since computing the mean line segment length involves calculating multidimensional integrals, various methods for
numerical integration In analysis, numerical integration comprises a broad family of algorithms for calculating the numerical value of a definite integral. The term numerical quadrature (often abbreviated to quadrature) is more or less a synonym for "numerical integr ...
can be used to approximate this value for any shape. One such method is the
Monte Carlo method Monte Carlo methods, or Monte Carlo experiments, are a broad class of computational algorithms that rely on repeated random sampling to obtain numerical results. The underlying concept is to use randomness to solve problems that might be ...
. 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 , the average distance between two points is .


Triangle

For a triangle with side lengths , , and , the average distance between two points in its interior is given by the formula : \frac \left \frac \ln\left( \frac \right) + \frac \ln\left( \frac \right) + \frac \ln\left( \frac \right) \right+ \frac + \frac + \frac + \frac, where s = (a+b+c)/2 is the semiperimeter, and s_i denotes s-i. For an equilateral triangle with side length ''a'', this is equal to : \left(\frac\right)a \approx 0.364791843\ldots a.


Square and rectangles

The average distance between two points inside a square with side length ''s'' is : \left(\frac\right) s \approx 0.521405433\ldots s. More generally, the mean line segment length of a rectangle with side lengths ''l'' and ''w'' is : \frac\left \frac + \frac + d\left(3 - \frac - \frac\right) + \frac\left(\frac \ln \left(\frac\right) + \frac \ln \left(\frac\right) \right) \right/math> where d = \sqrt 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 : \left(\frac\right) s \approx 0.869009\ldots s.


Cube and hypercubes

The average distance between points inside an ''n''-dimensional unit hypercube is denoted as , and is given as : \Delta(n) = \underbrace_ \sqrt \,dx_1 \cdots \,dx_n \,dy_1 \cdots \,dy_n The first two values, and , refer to the unit line segment and unit square respectively. For the
three-dimensional In geometry, a three-dimensional space (3D space, 3-space or, rarely, tri-dimensional space) is a mathematical space in which three values (''coordinates'') are required to determine the position (geometry), position of a point (geometry), poi ...
case, the mean line segment length of a
unit cube A unit cube, more formally a cube of side 1, is a cube whose sides are 1 unit long.. See in particulap. 671. The volume of a 3-dimensional unit cube is 1 cubic unit, and its total surface area is 6 square units.. Unit hypercube The term '' ...
is also known as Robbins constant, named after David P. Robbins. This constant has a closed form, : \Delta(3) = \frac + \frac + \frac. Its numerical value is approximately Andersson et. al. (1976) showed that satisfies the bounds : \tfrac n^ \le \Delta(n) \le (\tfrac n)^ \sqrt. Choosing points from two different faces of the unit cube also gives a result with a closed form, given by, :\frac + \frac + \frac.


Circle and sphere

The average chord length between points on the circumference of a circle of radius ''r'' is : \frac r \approx 1.273239544\ldots r And picking points on the surface of a
sphere A sphere (from Ancient Greek, Greek , ) is a surface (mathematics), surface analogous to the circle, a curve. In solid geometry, a sphere is the Locus (mathematics), set of points that are all at the same distance from a given point in three ...
with radius ''r'' is : \frac r


Disks

The average distance between points inside a disk of radius ''r'' is : \fracr \approx 0.905414787\ldots r. The values for a half disk and quarter disk are also known. For a half disk of radius 1: : \frac\frac \approx 0.706053409\ldots For a quarter disk of radius 1: : \frac(6\ln-94\sqrt+48\pi+3) \approx 0.473877262\ldots


Balls

For a three-dimensional
ball A ball is a round object (usually spherical, but sometimes ovoid) with several uses. It is used in ball games, where the play of the game follows the state of the ball as it is hit, kicked or thrown by players. Balls can also be used for s ...
, this is : \fracr \approx 1.028571428\ldots r. More generally, the mean line segment length of an ''n''-ball is : \frac\beta_n r where depends on the parity of , : \beta_n = \begin\dfrac & (\text n)\\ \dfrac & (\text n)\end


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 : L \le \sqrt \frac where denotes the
gamma function In mathematics, the gamma function (represented by Γ, capital Greek alphabet, Greek letter gamma) is the most common extension of the factorial function to complex numbers. Derived by Daniel Bernoulli, the gamma function \Gamma(z) is defined ...
. For ''n'' = 2, a stronger bound exists. : L \le \frac + \frac\sqrt + \frac\sqrt = 0.678442\ldots


References


External links

*{{MathWorld, id=MeanLineSegmentLength, title=Mean Line Segment Length Length Probability problems