Hausdorff convergence of preimages of discrete-valued functions Suppose $f_n$, $f:X\to K$ where $K$ is a finite set and $(X,d)$ is a metric space. Suppose also that $f_n(x)\to f(x)$ for all $x\in X$ (pointwise convergence). Finally, let $d_H$ be the Hausdorff metric on subsets of $X$.
Do these conditions guarantee Hausdorff convergence of the preimages $f_n^{-1}(y)=\{x\in X : f_n(x)=y\}$, i.e. is it true that 
$$d_H(f_n^{-1}(y), f^{-1}(y))\to 0\text{ for each }y\in K?$$
 A: You can rephrase your question in the following way. Let $A_n=f_n^{-1}(y)$ and $A=f^{-1}(y)$, which are a generic sets basically. Your only relation between these sets is that $A=\liminf A_n$ and $X\backslash A=\liminf (X\backslash A_n)$, i.e. $A=\lim A_n$. Then your question becomes:

Is it correct that if in a metric space $A=\lim A_n$ (as sets), then $A$ is the Hausdorff limit of $A_n$?

The answer to this question is "no".
For a counterexample take $A_n=[n,+\infty)$ or $A_n=[n,n+1]$ and $A=\varnothing$ in $\mathbb{R}$.
The answer is still "no" even in the case when $A$ and every $A_n$ are non-empty and closed, and $X$ is compact. Consider $X=[-1,1]$, $A=[-1,0]$ and $A_{n}=[-1,0]\cup\{a_n\}$, where $\{a_{n},n\in\mathbb{N}\}$ is an arbitrary enumeration of $\mathbb{Q}\cap (0,1]$. Then it is easy to check that $A=\lim A_n$, but $d_H(A_n,A)\not\to 0$ as long as $a_n\not\to0$.
(It is worth pointing out that Hausdorff distance mostly makes sense when the sets are closed and bounded. As the examples above illustrate, even under this additional assumption the question is false.)
