# Questions tagged [euclidean-distance]

The tag has no usage guidance.

54 questions
Filter by
Sorted by
Tagged with
895 views

### Recovering a point embedding from a graph with edges weighted by point distance

Suppose I give you an undirected graph with weighted edges, and tell you that each node corresponds to a point in 3d space. Whenever there's an edge between two nodes, the weight of the edge is the ...
• 5,722
76 views

### How to detect intersecting segments based on length of the segments

As part of a larger problem, I am trying to detect based on the distance matrix which segments intersect in the original 2D space that originated the matrix. I don´t have coordinates (lat/long, x/y or ...
• 153
91 views

### Given a vector of points, what is the fastest algorithm to find all pairs of points at a distance of 1?

Given a vector of points (on the 2D plane), what is the fastest algorithm to find all pairs of points at a distance of 1? Of course, I could use the $O(N^2)$ algorithm to check all pairs of points. ...
62 views

### Finding the smallest distance between a point and a set of points

I have a GPS dataset that corresponds to a route taken by a vehicle in a day. It consist of a set of coordinates. Then say I have a coordinate and I want to know how close this coordinate is to this ...
121 views

### Should planar Euclidean graphs be planar straight-line graphs?

An Euclidean graph, by definition is A weighted graph in which the weights are equal to the Euclidean lengths of the edges in a specified embedding and a graph is called planar if it can be ...
• 1,425
2k views

### How to prevent overflow and underflow in the Euclidean distance and Mahalanobis distance

I was working in my project when I was struck by the question of whether it would be necessary, or at least cautious, prevent overflow and underflow in the calculation of these two distances. I ...
• 51
470 views

### Efficient algorithm to fulfil a set of coordinate constraints

I have a set of labelled points and a set of distance constraints between pairs of points, consisting of a lower and upper distance bound. There is definitely an arrangement of the points in 3D space ...
• 133
57 views

### A heuristic for finding the vector that is maximally distant from a set of vectors

I have two sets of vectors: A and B. I want to find the vector Bi in set ...
• 103
1k views

### expected pairwise square euclidean distance between points

How can I show that the expected pairwise square euclidean distance between points in $X$ is $Θ(d)$? Where $X$ is a $(x_1,...x_n)$ of points generated uniformly at random in the unit, d is d-...
• 242
273 views

### Algorithm to mimimally pair up points in 3D space

Given a set of $n$ points $P$ and a set of $n$ points $Q$ in 3 dimensional space, what's the fastest algorithm to uniquely pair points in $P$ with points in $Q$ so that the sum of the square of the ...
129 views

### Algorithm for shortest continuous line to join N points

I have a set of points in a 2D plane. I'm searching for an algorithm that: Draws a continuous line passing through all the points starting from a random point. Optimizes for the minimum total line ...
49 views

### Distance from high dimensional convex hull to target point T

I have a set S of high dimensional points in Euclidean space, with convex hull H (not known); and some target point T in that space not in or on H. Rather than worry about calculating both H and the ...
• 131
348 views

### Stable and fast computation of the squared euclidean distance matrix

Let's say I want to compute the matrix $M$ of the squared euclidean distances between each pair of vectors $(x, y)$ belonging to two sets $X$ and $Y$ respectively. The sets of vectors $X$ and $Y$ have ...
• 423
146 views

### Is it possible to simulate/emulate non-euclidean geometry using computer graphics?

I am aware of the frequent use of "smoke and mirrors" in order to achieve the effect of non-euclidean geometry, but I was wondering it if it possible to implement spherical (sometimes called elliptic) ...
• 131
114 views

• 366
1 vote
32 views

### Embedding from $L^\infty$ space to $L^2$ space

I have a set $X$ of $n$ points in a $poly(n)$-dimensional $L^\infty$ space. Does there exist a way to map the points into $poly(n)$-dimensional $L^2$ space so that the distances between points in $X$ ...
• 227
1 vote
30 views

### Find the placement of gates on 2D points that minimizes the total distance of all paths to be made

Suppose we have a 6 vertices graph. We also have 6 gates. Each gate is attributed a path. For example, Gate 'A' will have to go to 'B'- 'C' - 'D' and 'E' Gate 'B' will have to go to 'D' Gate 'C' will ...
• 113
1 vote
861 views

### Computational complexity comparison of floating-point Euclidean distance calculation with binary fixed-point Hamming-distance calculation

This could relate to different applications, but my application of interest is in similarity-search systems based on high-dimensional feature vectors. In these systems, since search based on ...
• 11
1 vote
11 views

### Finding overlapping time under distance condition

I have a set of records (2 or more for each person) on multiple peoples locations (latitude and longitude) with timestamps. each record has: person ID, latitude, longitude, timeStamp. for each 2 ...
• 11
1 vote
25 views

### Efficient intersection detection between disks with identical radius

I have a set of $N$ points randomly positionned on a rectangular space (btw with either absorbing, reflecting or wrapping boundaries), and I need to obtain the distances between every 2 points whose ...
• 205
1 vote
39 views

• 51
102 views

### Counting arrays with Euclidean distance at most 2 from a given binary array

I have a binary array like this: $$A = [0,1,0,0,1,0]\,.$$ I'm trying to find a way to calculate how many arrays of the same length exist that have a Euclidean distance of 2 or less from this array. ...
• 103
55 views

### Cosine distance in a space, and cheating?

I read an example of using cosine distance in RGB space, and it pointed out that (eg.) dark red and light red have a cosine distance (CD) of zero because CD only gives you the angle between vectors ...
• 199
28 views

### Computing the minimum distance between each pain of points

I am trying to read an algorithm for computing minimum distance between each pair of points from the book: Algorithm Design Algorithm Design It considers the points in a line. If the points are in ...
• 249