Prove there is a $\delta >0$ such that $\rho(x,y) \geq \delta$ for all $x \in K$,$y \in F$. Prove this may fail if $K$ is closed, but not compact. The entire questions goes like this:
Let $(X, \rho)$ be a metric space and suppose $K$ and $F$ are nonempty disjoint subsets of $X$ with $K$ compact and $F$ closed. (a) Prove there is a $\delta >0$ such that $\rho(x,y) \geq \delta$ for all $x \in K$ and $y \in F$. (b) Show that part (a) may fail if $K$ is closed, but not compact. 
Part (a) is answered for the most part at the link below:
Show that exists $\delta >0$ such that:$d(x,y)\geq \delta$
I am having difficulty with part (b) though, as I can't seem to come up with any proof or counterexample. Any tips or hints would be greatly appreciated!
 A: Try to reverse engineer a bit. You want to have $x_n$ and $y_n$ in $K$ and $F$ respectively so that $d(x_n,y_n) \to 0$. If $K$ were compact then $x_n$ would have some convergent subsequence $x_{n_k}$ and this requirement would force $y_{n_k}$ to converge to the same limit, which would necessarily be in both $K$ and $F$. So you need:


*

*$x_n$ is a sequence in a closed set $K$ and has no convergent subsequence

*$y_n$ is a sequence in a closed set $F$ and has no convergent subsequence

*$K \cap F = \emptyset$

*$d(x_n,y_n) \to 0$. 


Some specific hints:


*

*You can do this in $\mathbb{R}$, you don't need to go to any weird spaces where Bolzano-Weierstrass fails or anything like that.

*It suffices to take $K,F$ to consist of just the sequences $x_n,y_n$ themselves. 

*In view of hint 1 and 2, it is useful to think about what sequences in $\mathbb{R}$ have no convergent subsequences.

A: Take $$K:=\bigcup_{n\in\Bbb{N}}[2n,2n+1]\text{ and } F:=\bigcup_{n\in\Bbb{N}}[2n+1+1/n,2n+2-1/n]$$.
A: Here's an easy visual example in $\mathbb{R}^2$ (with the usual metric): Consider $F$ to be the $x$-axis and $K$ to be the graph of $\frac{1}{x}$ below:

Even though $F$ and $K$ are both closed, can you see how they still get closer and closer as $x$ becomes larger? In other words, for any $\delta > 0$, you can find a pair of points from $K$ and $F$ that are within $\delta$ of one another. Try showing that fact rigorously.
A: In $\mathbb{R}^2$ with its usual $\rho$, take $K$ as the $x$-axis (that is $\mathbb{R}\times\{ 0 \}$) and $F$ as the graph of the exponential function (that is $F=\{(x,y)\in\mathbb{R}^2 \mid y=e^x\}$). They are clearly non-empty and mutually disjoint. Both $K$ and $F$ are closed, but neither is compact (they are unbounded).
Can you see why their distance is zero so that a strictly positive $\delta$ of the desired kind does not exist?

For a different example, take $X=[-1,1]\setminus\{0\}$ with the metric inherited from $\mathbb{R}$, that is $\rho(x,y)=|y-x|$. $X$ has finite diameter $2$. The sets $K=\left[-1,0\right)$ and $F=\left(0,1\right]$ are closed in $X$. Can you prove that? They also satisfy the other requirements.
