# Construct a function such that its adherent values are the compact set $K$

I really need help, this question seems really crazy, I don't know even how to begin, please any help is welcome.

QUESTION

Given a real number $a$ and a non-empty compact set $K\subset \mathbb R$, construct a function $f:\mathbb R \to \mathbb R$ such that the adherent values of $f$ in the point $a$ be $K$.

EDIT

Definition of adherent values of $f$ in the point $a$

A real number $c$ is called adherent value of $f$ in the point $a$ when there is a sequence of points $x_n\in X−\{a\}$ such that $\lim x_n=a$ and $\lim f(x_n)=c$

thanks a lot

-
What does "adherent point of $f$ in the point $a$" mean? –  Jonas Meyer Jan 31 '13 at 5:46
My suspicion is that the constant function $f(x)=a$ would work. –  Calvin Lin Jan 31 '13 at 5:53
@user42912: Where is the question from? –  Jonas Meyer Jan 31 '13 at 6:01
I think this is saying that the closure of $\{x\in \mathbb{R}:f(x)=a\}$ is $K$ –  user45150 Jan 31 '13 at 6:13
In the case what I said is correct, consider the function $d(x,K)=\inf\{|y-x|:y\in K\}$ and see if that would help you construct the function you want. –  user45150 Jan 31 '13 at 6:16

Let $\mathbb R/\mathbb Q$ denote the quotient of the abelian group $\mathbb R$ with addition by its subgroup $\mathbb Q$. Let $K$ be a subset of $\mathbb R$, and let $\varphi:(\mathbb R/\mathbb Q)\to K$ be a surjection. Define $f(x)=\varphi(x+\mathbb Q)$. This example works because every coset of $\mathbb Q$ is dense in $\mathbb R$, so for all $y\in K$ there exists a sequence $(x_n)\to a$ such that $x_n\neq a$ and $f(x_n)=y$ for all $n$. Assuming $K$ is closed, there are no other adherent values, because the range of $f$ is $K$.
where can I use the fact that $K$ is compact? thank you very much for your answer –  user42912 Jan 31 '13 at 6:32
@user42912: Just as you were commenting I was adding the remark that closedness of $K$ implies that there are no other adherent values. Beyond this compactness isn't used in this example. –  Jonas Meyer Jan 31 '13 at 6:33
then we don't need the fact that $K$ is bounded? –  user42912 Jan 31 '13 at 6:36