I'm working on a clustering algorithm to group similar objects that are represented by ranges of real numbers. Let's say that I have a group of people who are buying sugar. Each of them defines minimum and maximum amount he would be willing to buy. What I would like to do is to put in one cluster those people that want to buy similar amount. For example, one of the result clusters would be for people who need between 3 and 4 kg of sugar, while the other one might be between 6 and 8 kg. For this, I have to create a distance function which would tell how similar the requirements of the buyers are, i.e., what is the distance (or difference) between two ranges. What would be the best way to do this?
2026-03-28 20:49:54.1774730994
Distance between two ranges
3.3k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
Related Questions in GEOMETRY
- Point in, on or out of a circle
- Find all the triangles $ABC$ for which the perpendicular line to AB halves a line segment
- How to see line bundle on $\mathbb P^1$ intuitively?
- An underdetermined system derived for rotated coordinate system
- Asymptotes of hyperbola
- Finding the range of product of two distances.
- Constrain coordinates of a point into a circle
- Position of point with respect to hyperbola
- Length of Shadow from a lamp?
- Show that the asymptotes of an hyperbola are its tangents at infinity points
Related Questions in EUCLIDEAN-GEOMETRY
- Visualization of Projective Space
- Triangle inequality for metric space where the metric is angles between vectors
- Circle inside kite inside larger circle
- If in a triangle ABC, ∠B = 2∠C and the bisector of ∠B meets CA in D, then the ratio BD : DC would be equal to?
- Euclidean Fifth Postulate
- JMO geometry Problem.
- Measure of the angle
- Difference between parallel and Equal lines
- Complex numbers - prove |BD| + |CD| = |AD|
- Find the ratio of segments using Ceva's theorem
Related Questions in CLUSTERING
- clustering over sphere surface
- what is mean "Number of connected Triplets of vertices" in global clustering
- Algorithm To Disjointly Divide a Graph
- Which statistical test to use to chose how to assign a subgroup to one of two other groups.
- How do I compute the updates to the EM algorithm in Quantum Clustering?
- Cluster algorithm which minimizes a distance while fulfilling a constraint
- Detect clusters in an RGB space
- Prime Number Spiral Clusters
- Clustering via Pattern Formation
- What defines a convex Cluster and how it differentiates from other types?
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?
One way to do this would be to consider the Hausdorff distance. Given two subsets $A$, $B$ of a metric space $X$ (for example, two intervals in $\mathbb{R}$) the Hausdorff distance between them is the largest value out of
$$\sup_{a\in A}\, \inf_{b\in B}\, d(a,b)$$
$$\sup_{b\in B}\, \inf_{a\in A}\, d(a,b)$$
That is, first we consider a point $a \in A$, find the least distance to a point $b\in B$, and maximise this over $A$. Then we do the same thing with the roles of $A$ and $B$ reversed. Finally we take the largest of these two values.
Under the Hausdorff metric, the set of non-empty compact subsets of $X$ into a metric space (so, for example, all distances are non-negative, if the distance is zero then the sets coincide, and distances satisfy the triangle inequality).
How does this work in your case? Let's write $A=[a_1,a_2]$ and $B=[b_1,b_2]$ and take a special case of $a_1<a_2<b_1<b_2$, so that the intervals are non-overlapping and every $a\in A$ is less than every $b\in B$. Then the first expression has the value $b_1-a_1$ and the second has the value $b_2-a_2$, so the distance between the intervals is
$$d(A,B)=\max(b_1-a_1, b_2-a_2)$$
How about if $B$ is contained inside $A$, so we have $a_1<b_1<b_2<a_2$? Then the first quantity is $\max(b_1-a_1, a_2-b_2)$ and the second quantity is $0$, so the distance between the intervals is
$$d(A,B)=\max(b_1-a_1, a_2-b_2)$$
You can proceed through all possible cases in this way. In fact, my conjecture is that for any two such intervals, we always have
$$d(A,B) = \max(|a_1-b_1|, |a_2-b_2|)$$
although my enthusiasm doesn't quite stretch to working through all the cases. Shouldn't be too hard to do it yourself though!
More information: http://en.wikipedia.org/wiki/Hausdorff_distance