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](https://en.wikipedia.org/wiki/Hausdorff_distance) 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?$$



Hausdorff convergence of preimages of discrete-valued functions
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.)


