Hacker News new | ask | show | jobs
by maxiepoo 1589 days ago
Wouldn't that make countries like the USA and Canada extremely far apart because they are both large countries? The distance you would get is the distance from Hawaii to somewhere on the northeastern edge of Nunavut/Newfoundland/Labrador
1 comments

Not quite, you'd get the maximum distance from the extreme end of one territory to the nearest point of the other.
> Not quite, you'd get the maximum distance from the extreme end of one territory to the nearest point of the other.

But which country do you pick the extreme edge of, and which country do you pick the nearest point of? For example, if measuring US<->Canada, do you pick the extreme end of Canada or the extreme end of the US?

You pick whatever gives you the largest distance.

For every point in both territories, find the closest point in the other territory. From these pairs of points, find the pair with the largest distance. That distance is your Hausdorff distance.

Oh I see, so still pretty large since both countries are large, but if one of the bordering countries were small the distance would be small.
No, you would get the distance from the border to the other end of the large country, since that is longer.