Manhattanetäisyys
Manhattanetäisyys, also known as Manhattan distance or L1 distance, is a metric used to measure the distance between two points in a multi-dimensional space. The term originates from the idea of navigating a city grid, such as Manhattan, where movement is restricted to horizontal and vertical directions rather than diagonal paths. In this context, the distance between two points is calculated as the sum of the absolute differences of their Cartesian coordinates.
Mathematically, for two points in an n-dimensional space, denoted as (x₁, x₂, ..., xₙ) and (y₁, y₂, ...,
d((x₁, x₂, ..., xₙ), (y₁, y₂, ..., yₙ)) = |x₁ - y₁| + |x₂ - y₂| + ... + |xₙ - yₙ|
This metric is particularly useful in applications where movement is constrained to axes-aligned directions, such as
Manhattanetäisyys is also employed in various fields such as computer science, statistics, and operations research. For
One notable property of Manhattan distance is its robustness to outliers, as it is less sensitive to