0
$\begingroup$

This is a homework question in my analysis class:

Let $A$ and $B$ be two nonempty closed subsets of a metric space $X$ that do no intersect. Show that there is a continuous function $f:X\rightarrow [a,b]$ such that $f(x)=a$ for all $x\in A$ and $f(x)=b$ for all $x\in B$.

Can someone give me a hint?

  • 0
    Use functions of the form $f_S(x):=\inf_{x\in S} d(x,y)$.2012-02-25

2 Answers 2