Chapter 1 General Definitions
1.1 Basic definitions
• Distance Let X be a set. A function d : X × X → R is called a distance (or dissimilarity)onX if, for all x, y ∈ X, there holds: 1. d(x, y) ≥ 0(non-negativity). 2. d(x, y)=d(y,x)(symmetry). 3. d(x, x)=0(reflexivity). In Topology, the distance d with d(x, y) = 0 implying x = y is called a symmetric. A distance which is a squared metric is called a quadrance. For any distance d, the function D1, defined for x = y by D1(x, y)= d(x, y)+c, where c = maxx,y,z∈X (d(x, y)−d(x, z)−d(y,z)), and D(x, x)= c 0, is a metric. Also, D2(x, y)=d(x, y) is a metric for sufficiently small c ≥ 0. The function D3(x, y)=inf i d(zi,zi+1), where the infimum is taken over all sequences x = z0,...,zn+1 = y,isasemi-metric. • Distance space A distance space (X, d)isasetX equipped with a distance d. • Similarity Let X be a set. A function s : X × X → R is called a similarity on X if s is non-negative, symmetric, and if s(x, y) ≤ s(x, x) holds for all x, y ∈ X, with equality if and only if x = y. The main transforms used to obtain a distance (dissimilarity) d√from a − 1−s − similarity s bounded by 1 from above are: d =1 s, d = s , d = 1 s, d = 2(1 − s2), d = arccos s, d = − ln s (cf. Chap. 4). • Semi-metric Let X be a set. A function d : X × X → R is called a semi-metric (or ´ecart)onX if d is non-negative, symmetric, if d(x, x) = 0 for all x ∈ X, and if d(x, y) ≤ d(x, z)+d(z,y) for all x, y, z ∈ X (triangle or, sometimes, triangular inequality).
M.M. Deza and E. Deza, Encyclopedia of Distances,3 DOI 10.1007/978-3-642-00234-2 1, c Springer-Verlag Berlin Heidelberg 2009 4 1 General Definitions
In Topology, it is called a pseudo-metric, while the term semi-metric is sometimes used for a symmetric (a distance d(x, y) with d(x, y)=0 only if x = y) or for a special case of it; cf. symmetrizable space in Chap. 2. For a semi-metric d, the triangle inequality is equivalent, for each fixed n ≥ 4, to the following n-gon inequality
d(x, y) ≤ d(x, z1)+d(z1,z2)+···+ d(zn−2,y),
for all x, y, z1,...,zn−2 ∈ X. For a semi-metric d on X, define an equivalence relation by x ∼ y if d(x, y) = 0; equivalent points are equidistant from all other points. Let [x] denote the equivalence class containing x; then D([x], [y]) = d(x, y)isa metric on the set {[x]:x ∈ X} of classes. • Metric Let X be a set. A function d : X × X → R is called a metric on X if, for all x, y, z ∈ X, there holds: 1. d(x, y) ≥ 0(non-negativity). 2. d(x, y) = 0 if and only if x = y (identity of indiscernibles). 3. d(x, y)=d(y,x)(symmetry). 4. d(x, y) ≤ d(x, z)+d(z,y)(triangle inequality). In fact, 1 follows from 3 and 4. • Metric space A metric space (X, d)isasetX equipped with a metric d. A pointed metric space (X, d, x0) is a metric space (X, d) with a selected base point x0 ∈ X. • Metric scheme A metric scheme is a metric space with an integer-valued metric. • Extended metric An extended metric is a generalization of the notion of metric: the value ∞ is allowed for a metric d. • Quasi-distance Let X be a set. A function d : X × X → R is called a quasi-distance on X if d is non-negative, and d(x, x) = 0 holds for all x ∈ X. In Topology, it is also called a parametric. For a quasi-distance d,thestrong triangle inequality d(x, y) ≤ d(x,z) + d(y,z) imply that d is symmetric and so, a semi-metric. • Quasi-semi-metric Let X be a set. A function d : X × X → R is called a quasi-semi-metric on X if d is non-negative, if d(x, x) = 0 for all x ∈ X,andif
d(x, y) ≤ d(x, z)+d(z,y)
for all x, y, z ∈ X (oriented triangle inequality). 1.1 Basic definitions 5
The set X can be partially ordered by the specialization order: x y if and only if d(x, y)=0. A weak quasi-metric is a quasi-semi-metric d on X with weak sym- metry, i.e., for all x, y ∈ X the equality d(x, y) = 0 implies d(y,x)=0. An Albert quasi-metric is a quasi-semi-metric d on X with weak definiteness, i.e., for all x, y ∈ X the equality d(x, y)=d(y,x) = 0 implies x = y. A weightable quasi-semi-metric is a quasi-semi-metric d on X with relaxed symmetry, i.e., for all x, y, z ∈ X
d(x, y)+d(y,z)+d(z,x)=d(x, z)+d(z,y)+d(y,x),
holds or, equivalently, there exists a weight function w(x) ∈ R on X with − − ∈ 1 − d(x, y) d(y,x)=w(y) w(x) for all x, y X (i.e., d(x, y)+ 2 (w(x) w(y)) is a semi-metric). If d is a weightable quasi-semi-metric, then d(x, y)+w(x) is a partial semi-metric (moreover, partial metric if d is an Albert quasi-metric). • Partial metric Let X be a set. A non-negative symmetric function p : X × X → R is called a partial metric [Matt92] if, for all x, y, z ∈ X, there holds: 1. p(x, x) ≤ p(x, y) (i.e., every self-distance p(x, x)issmall). 2. x = y if p(x, x)=p(x, y)=p(y,y)=0(T0 separation axiom). 3. p(x, y) ≤ p(x, z)+p(z,y) − p(z,z)(sharp triangle inequality). If above separation axiom is dropped, the function p is called a partial semi-metric. The function p is a partial semi-metric if and only if p(x, y) −p(x, x)isaweightable quasi-semi-metric with w(x)=p(x, x). If above condition p(x, x) ≤ p(x, y) is also dropped, the function p is called (Heckmann 1999) a weak partial semi-metric. Cf. distance from measurement in Chap. 3; it is related topologically (Waszkiewicz 2001) to partial metrics. Sometimes, the term partial metric is used when a metric d(x, y)is defined only on a subset of the set of all pairs x, y of points. • Quasi-metric Let X be a set. A function d : X × X → R is called a quasi-metric on X if d(x, y) ≥ 0 holds for all x, y ∈ X with equality if and only if x = y,and
d(x, y) ≤ d(x, z)+d(z,y)
for all x, y, z ∈ X (oriented triangle inequality). A quasi-metric space (X, d)isasetX equipped with a quasi-metric d. For any quasi-metric d, the functions max{d(x, y),d(y,x)}, min{d(x, y), 1 } 1 p p p ≥ d(y,x) and 2 (d (x, y)+d (y,x)) with p 1 (usually, p = 1 is taken) are equivalent metrics. 6 1 General Definitions
A non-Archimedean quasi-metric d is a quasi-distance on X which satisfies the following strengthened version of the oriented triangle inequality: d(x, y) ≤ max{d(x, z),d(z,y)} for all x, y, z ∈ X. • Near-metric Let X be a set. A distance d on X is called a near-metric (or weak metric)if d(x, y) ≤ C(d(x, z)+d(z,y))
for all x, y, z ∈ X and some constant C ≥ 1(C-triangle inequality). Some recent papers use the term quasi-triangle inequality for above in- equality and so, quasi-metric for the notion of near-metric. The power transform (cf. Chap. 4) (d(x, y))α of any near-metric is a near-metric for any α>0. Also, any near-metric d admits a bi-Lipschitz mapping on (D(x, y))α for some semi-metric D on the same set and a positive number α. A near-metric d on X is called a H¨older near-metric if the inequality
|d(x, y) − d(x, z)|≤βd(y,z)α(d(x, y)+d(x, z))1−α
holds for some β>0, 0 <α≤ 1 and all points x, y, z ∈ X.Cf.H¨older mapping. • Coarse-path metric Let X be a set. A metric d on X is called a coarse-path metric if, for a fixed C ≥ 0 and for every pair of points x, y ∈ X, there exists a sequence x = x0,x1,...,xt = y for which d(xi−1,xi) ≤ C for i =1,...,t,and
d(x, y) ≥ d(x0,x1)+d(x1,x2)+···+ d(xt−1,xt) − C, ≤ t i.e., the weakened triangle inequality d(x, y) i=1 d(xi−1,xi) becomes an equality up to a bounded error. • Weak ultrametric A weak ultrametric (or C-pseudo-distance, C-inframetric) d is a distance on X such that for a constant C ≥ 1 the inequality
0 holds for all x, y, z ∈ X, x = y. The term pseudo-distance is also used, in some applications, for any of a pseudo-metric,aquasi-distance,anear-metric, a distance which can be infinite, a distance with an error, etc. 1.1 Basic definitions 7 • Ultrametric An ultrametric (or non-Archimedean metric) is (Krasner 1944) a metric d on X which satisfies the following strengthened version of the triangle inequality (Hausdorff 1934), called the ultrametric inequality: d(x, y) ≤ max{d(x, z),d(z,y)} for all x, y, z ∈ X. So, at least two of d(x, y),d(z,y)andd(x, z)arethe same. A metric d is an ultrametric if and only if its power transform (see Chap. 4) dα is a metric for any real positive number α. Any ultrametric satisfies the four-point inequality. A metric d is an ultrametric if and only if it is a Farris transform (cf. Chap. 4) of a four-point inequality metric. For a finite set X, a symmetric non-negative matrix A =(A(x, y): x, y ∈ X) is called ultrametric if there exists an ultrametric d on X such that d(x, y) ≤ d(x, z) implies A(x, y) ≥ A(x, z). • Robinsonian distance A distance d on X is called a Robinsonian distance (or monotone dis- tance) if there exists a total order on X compatible with it, i.e., for x, y, w, z ∈ X, x y w z implies d(y,w) ≤ d(x, z), or, equivalently, for x, y, z ∈ X, x y z implies d(x, y) ≤ max{d(x, z),d(z,y)}. Any ultrametric is a Robinsonian distance. • Four-point inequality metric A metric d on X is a four-point inequality metric (or additive metric) if it satisfies the following strengthened version of the triangle inequality called the four-point inequality: for all x, y, z, u ∈ X d(x, y)+d(z,u) ≤ max{d(x, z)+d(y,u),d(x, u)+d(y,z)} holds. Equivalently, among the three sums d(x, y)+d(z,u), d(x, z)+d(y,u), d(x, u)+d(y,z) the two largest sums are equal. A metric satisfies the four-point inequality if and only if it is a tree-like metric. Any metric, satisfying the four-point inequality, is a Ptolemaic metric and an L1-metric (cf. Lp-metric in Chap. 5). 8 1 General Definitions A bush metric is a metric for which all four-point inequalities are equalities, i.e., d(x, y)+d(u, z)=d(x, u)+d(y,z) holds for any u, x, y, z ∈ X. • Relaxed four-point inequality metric A metric d on X satisfies the relaxed four-point inequality if, for all x, y, z, u ∈ X, among the three sums d(x, y)+d(z,u),d(x, z)+d(y,u),d(x, u)+d(y,z) at least two (not necessarily the two largest) are equal. A metric satisfies the relaxed four-point inequality if and only if it is a relaxed tree-like metric. • Ptolemaic metric A Ptolemaic metric d is a metric on X which satisfies the Ptolemaic inequality d(x, y)d(u, z) ≤ d(x, u)d(y,z)+d(x, z)d(y,u) (shown by Ptolemy to hold in the Euclidean space) for all x, y, u, z ∈ X. A Ptolemaic space is a normed vector space (V,||.||) such that its norm metric ||x − y|| is a Ptolemaic metric. A normed vector space is a Ptole- maic space if and only if it is an inner product space (cf. Chap. 5); so, a Minkowskian metric (cf. Chap. 6) is Euclidean if and only if it is Ptolemaic. \ d(x,y) The involution space (X z,dz), where dz(x, y)= d(x,z)d(y,z) , is a metric space, for any z ∈ X, if and only√ if d is Ptolemaic [FoSC06]. For any metric d, the metric d is Ptolemaic [FoSC06]. • δ-hyperbolic metric Given a number δ ≥ 0, a metric d on a set X is called δ-hyperbolic if it satisfies the Gromov δ-hyperbolic inequality (another weakening of the four-point inequality): for all x, y, z, u ∈ X d(x, y)+d(z,u) ≤ 2δ + max{d(x, z)+d(y,u),d(x, u)+d(y,z)} holds. A metric space (X, d)isδ-hyperbolic if and only if ≥ { }− (x.y)x0 min (x.z)x0 , (y.z)x0 δ ∈ ∈ 1 for all x, y, z X and for any x0 X, where (x.y)x0 = 2 (d(x0,x)+ d(x0,y) − d(x, y)) is the Gromov product of the points x and y of X with respect to the base point x0 ∈ X. A metric space (X, d) is 0-hyperbolic exactly when d satisfies the four-point inequality. Every bounded metric space of diameter D is D-hyperbolic. The n-dimensional hyperbolic space is ln 3-hyperbolic. 1.1 Basic definitions 9 Every δ-hyperbolic metric space is isometrically embeddable into a geodesic metric space (Bonk and Schramm 2000). • Gromov product similarity Given a metric space (X, d) with a fixed point x0 ∈ X,theGromov product similarity (or Gromov product, covariance)(.)x0 is a similarity on X, defined by 1 (x.y) = (d(x, x )+d(y,x ) − d(x, y)). x0 2 0 0 If (X, d) is a tree, then (x.y)x0 = d(x0, [x, y]). If (X, d)isameasure semi-metric space, i.e., d(x, y)=μ(x y) for a Borel measure μ on X, then (x.y)∅ = μ(x ∩ y). If d is a distance of negative type, i.e., 2 En d(x, y)=dE(x, y) for a subset X of an Euclidean space , then (x.y)0 is the usual inner product on En. Cf. Farris transform metric in Chap. 4. • Cross difference Given a metric space (X, d) and quadruple (x, y, z, w) of its points, the cross difference is the real number cd defined by cd(x, y, z, w)=d(x, y)+d(z,w) − d(x, z) − d(y,w). For all x, y, z, w, p ∈ X, 1 cd(x, y, z, w)=−(x.y) − (z.w) +(x.z) +(y.w) 2 p p p p in terms of the Gromov product similarity; in particular, it becomes (x.y)p if y = w = p. Given a metric space (X, d) and quadruple (x, y, z, w) of its points with x = z and y = w,thecross-ratio is the real number cr defined by d(x, y)d(z,w) cr(x, y, z, w)= ≥ 0. d(x, z)d(y,w) • 2k-gonal distance A2k-gonal distance d is a distance on X which satisfies the 2k-gonal inequality bibjd(xi,xj) ≤ 0 1≤i