Fortune Telling Collection - Ziwei fortune-telling - Manhattan distance and Euclid distance

Manhattan distance and Euclid distance

(1) glide geometry or Manhattan distance (Manhattan? Distance) is a term coined by hermann minkowski in19th century. It is a geometric term used in geometric metric space, which represents the sum of absolute wheelbase of two points in standard coordinate system.

In the figure, the red line represents Manhattan distance, the green line represents Euclidean distance, that is, straight line distance, and the blue and yellow line represents equivalent Manhattan distance. Manhattan distance-the distance between two points in the north-south direction plus the distance in the east-west direction, that is, d(i, j)=|xi-xj|+|yi-yj|. For a town street with regular layout, due south, due north, due east and due west, the distance from one point to another point is exactly the distance from north to south plus the distance from east to west, so the distance from Manhattan is also the distance from renting a car.

(2) In mathematics, Euclidean distance or Euclidean metric is the "ordinary" (straight line) distance between two points in Euclidean space. Using this distance, Euclidean space becomes a metric space. The relevant norm is called Euclidean norm. Early literature called it Pythagorean metric.

Calculation formula, as shown in the figure;

Figure 1

Figure ii