$f: \mathbb{R} \to \mathbb{R}$ that takes each value in $\mathbb{R}$ twice Does there exist a continuous function $f: \mathbb{R} \to \mathbb{R}$ that takes each value in $\mathbb{R}$ exactly two times?
 A: Suppose for sake of contradiction that such function exists. Let $a,b$ be two real numbers such that $f(a)=f(b)$ and $a<b$. Then either $f(x)>f(a)$ for all $x\in (a,b)$ or  $f(x)<f(a)$ for all $x\in (a,b)$. If were not such the case then we have $c,d\in (a,b)$ such that $f(c)\le f(a)\le f(d)$, taking the value of $f(a)$ a third time. We may assume that $f(x)<f(a)$ for all $x\in (a,b)$. Now  we choose some $x_0\in (a,b)$ (whatever works), thus $f$ takes all the values between $f(a)=f(b)$ and $f(x_0)$ twice  in $[a,x_0]$ and $[x_0,b]$. 
For $x<a$ or $x>b$  we cannot have $f(x)<f(a)$ because this would imply that $f$ takes these values yet a third time (if were the case of some $x$ such that $f(x)<f(a)$ and  assume by concreteness $x<a$,  so all the values between $y=\max\{f(x),f(x_0)\}$ and $f(a)=f(b)$ are taking by $f$ three times, since $f(x)\le y<f(a)$, $f(x_0)\le y < f(a)$ and $f(x_0)\le y < f(b)$ in $[x,a]$,$[a,x_0]$ and $[x_0,b]$). Hence for $x<a$ and $x>b$ we must have $f(x)> f(a)$. 
Thus  for what we have seen $f$ is bounded below  by the minimum on $[a,b]$ and then $f$ does not take each $x\in\mathbb{R}$, in particular does not take any value less than the minimum value of $f$ in $[a,b]$, a contradiction.
A: $\mathbb{R}$ cannot have any nontrivial connected covering space, including a $k$-sheeted covering map from itself for any finite $k > 1$, because it is simply connected.
A: Suppose $f(a)=f(b)=0$.  Then on each of $(-\infty,a)$, $(a,b)$, $(b,\infty)$ the function $f$ is either positive or negative by the intermediate value theorem.  By continuity $f$ has either a max on $[a,b]$ which is strictly positive or a min which is strictly negative.  WLOG say it has a max which is positive.  The left and right intervals must have opposite signs or $f$ can't be surjective.  So say WLOG the left side is positive.  Then some (very small) positive value is achieved three times, once on the left interval and twice in the middle interval.  
A: If possible let, f be such a continuous function in $\Bbb R$ which attains every value exactly twice.
Let $f(x_1)=f(x_2)=b$, with $x_1 \neq x_2$.
Then $f(x)\neq b$, for $x_1 \neq x_2$.
Then either $f(x)\gt b$ or $f(x)\lt b \forall x\in (x_1,x_2)$.
In case , when f(x)\gt b:
there is f(x_0)=max. {f(x):x\in (x_1,x_2)}. 
Now we claim that, $f$ attains its maximum exactly once in $(x_1,x_2)$, otherwise $f$ will attain each value more than two times.
Let, $f$ attains its maximum exactly once at $c\in (x_1,x_2)$.
Again since $f$ attains its value exactly two times,  thus there exists $x_3$ ,outside of the interval $[x_1,x_2]$,
S.t. $f(x_3)=f(c)=d$ (,say) $\gt b$.
Then by IVP , we can conclude that f attains every value between $b$ and $d$ at least three times, CONTRADICTION.
Same argument can be applicable for $f(x)\lt b$.
Thus there doesn't exists any such continuous function. 
