1. ## Hausdorf distance

How can I determine the Hausdorf distance between 2 sets when the intersection of those sets is not empty?

For example,

$U = \{ (x,y) : \, 1 \leq x \leq 4 \text{ and } 1 \leq y \leq 2 \}$
$V = \{ (x,y) : \, 1 \leq x \leq 2 \text{ and } 0 \leq y \leq 2 \}$

Can someone help?

QT $\pi$

2. Originally Posted by qtpi
How can I determine the Hausdorf distance between 2 sets when the intersection of those sets is not empty?

For example,

$U = \{ (x,y) : \, 1 \leq x \leq 4 \text{ and } 1 \leq y \leq 2 \}$
$V = \{ (x,y) : \, 1 \leq x \leq 2 \text{ and } 0 \leq y \leq 2 \}$

Can someone help?

QT $\pi$
The definition of the Hausdorff distance between U and V is

$\displaystyle d_H(U,V) = \max\{\sup_{u\in U}\inf_{v\in V}d(u,v),\sup_{v\in V}\inf_{u\in U}d(u,v)\}$.

In everyday language, what that means is this. You look for the furthest distance from V that a point of U can be. Then you look for the furthest distance from U that a point of V can be. Finally, you take the larger of those two distances.

$\setlength{\unitlength}{10mm}
\begin{picture}(6,4)
\put(1,0){\line(0,1){4}}
\put(0,1){\line(1,0){6}}
\thicklines
\put(2,1){\line(1,0){1}}
\put(2,2){\line(1,0){3}}
\put(2,3){\line(1,0){3}}
\put(2,1){\line(0,1){2}}
\put(3,1){\line(0,1){2}}
\put(5,2){\line(0,1){1}}
\put(1.9,0.5){1}
\put(2.9,0.5){2}
\put(4.9,0.5){4}
\put(0.7,0.6){0}
\put(0.7,1.8){1}
\put(0.7,2.8){2}
\put(2.4,1.4){V}
\put(3.5,2.4){U}
\end{picture}$

For the example in the picture, the furthest distance from V that you can get while remaining in U is 2 (all the points on the right-hand edge of U are distance 2 from V). The furthest distance from U that you can get while remaining in V is 1 (all the points on the bottom edge of V are distance 1 from U). The maximum of the numbers 2 and 1 is 2. Therefore $d_H(U,V) = 2$.

In that calculation, it makes no difference whether or not the intersection of U and V is empty.