Suppose $A$ is a countable subset of $\mathbb{R}$. Prove that there exists a continuous function $\phi$ from $A$ to $A^c$ Suppose $A$ is a countable subset of $\mathbb{R}$.
Prove that there exists a continuous function $\phi$ from $A$ to $A^c$ which is injective.
Since it is asking for existence of such function I don't know how to proceed.
 A: Since $A$ is countable, $ M := \{ x-y~~|~~x, y \in A \}$ is countable. Hence there exists a $z \in M^c$.
Let $\phi: A \rightarrow A^c$, $\phi(x) = x+z$.
$\phi$ is injective and continuous.
A: Given numbers $x_1<x_2<\ldots <x_n$ and $y_1<y_2<\ldots <y_n$, where $n\ge1$, we can define an interpolating function
$$ L_{\{x_1,\ldots, x_n\},\{y_1,\ldots, y_n\}}(x):=\begin{cases}x-x_1+y_1,&x\le x_1\\
\frac{(x-x_k)y_{k+1}+(x_{k+1}-x)y_k}{x_{k+1}-x_k},&x_k\le x\le x_{k+1}\\
x-x_n+y_n,&x\ge x_n.\end{cases}$$
One verifies that this is continuous, strictly increasing, and maps $x_i\mapsto y_i$.
Let $a_1,a_2,\ldots$ be an enumeration of $A$.
We construct a sequence $\alpha_1,\alpha_2,\ldots\in A^\complement$ and a sequence of functions $f_n:=L_{\{a_1,\ldots,a_n\}, \{\alpha_1,\ldots,\alpha_n\}}$ and then use their limit $f$. To this end, we ensure that the convergence is uniform.
To begin, pick $\alpha_1\in A^\complement$.
Assume we have picked $\alpha_1,\ldots, \alpha_{n-1}$ and thereby constructed 
$f_{n-1}$.


*

*If $a_n<\min\{a_1,\ldots,a_{n-1}\}$, pick $\alpha_n\in A^\complement$ such that $\alpha_n<\min\{\alpha_1,\ldots, \alpha_{n-1}\}$ and $|\alpha_n-f_{n-1}(a_n)|<2^{-n}$.

*If $a_n>\max\{a_1,\ldots,a_{n-1}\}$, pick $\alpha_n\in A^\complement$ such that $\alpha_n>\max\{\alpha_1,\ldots, \alpha_{n-1}\}$ and $|\alpha_n-f_{n-1}(a_n)|<2^{-n}$.

*Otherwise, $a_n$ is between two previous numbers $a_i,a_j$ (i.e., $a_i=\max\{\,a_k\mid k<n,a_k<a_n\,\}$ and $a_j=\max\{\,a_k\mid k<n,a_k>a_n\,\}$).
Pick $\alpha_n\in A^\complement$ such that $\alpha_i<\alpha_n<\alpha_j$ and $|\alpha_n-f_{n-1}(a_n)|<2^{-n}$.


We observe that $f_n$ converges uniformly because $\|f_n-f_{n-1}\|_\infty<2^{-n}$, hence the sequence converges to a continuous limit function $f\colon \Bbb R\to \Bbb R$. Of course $f|_A$ is then also continuous. As $f_n(a_k)=\alpha_k$ for al $n\ge k$, it is also clear that $f$ maps $A$ injectively into $A^\complement$.

Remark 1: It may happen that $f$ is not injective as a function on $\Bbb R$. For example, if $a_n=(-1)^n(1+2^{-n})$, nothing prevents the choice $\alpha_n=(-1)^22^{-n}$, which leads to a limit function $f$ with $f(x)=0$ for all $x\in[-1,1]$. Fortunately, $f$ was only required to be injective on $A$. However, one can achieve injectivity on all of $\Bbb R$, by taking more care when picking $\alpha_n$. For example, one can ensure that all line segments making up $f_n$ have slope $\ge \frac12+2^{-n}$ simply by picking $\alpha_n$ even closer to $f_{n-1}(a_n)$ than described above. Then $\frac{f_n(x)-f_n(y)}{x-y}\ge \frac12$ for all $x\ne y$ and all $n$, hence also in the limit $\frac{f(x)-f(y)}{x-y}\ge \frac12$ for all $x\ne y$.
Remark 2: The argument above works also when $\Bbb R$ is replaced with a countable set, e.g., $\Bbb Q$, i.e., we want to map $A\subseteq \Bbb Q$ injectively into $\Bbb Q\setminus A$ -- provided $\Bbb Q\setminus A$  is dense. For $\Bbb R$ as in the OP, denseness is clear already by cardinality.
A: Since $A$ is countable, $A^c$ must be uncountable (in fact, size continuum).  Thus, there are continuum many possible functions from $A$ to $A^c$ which are injective. Also, there are continuum many continuous functions from $\mathbb{R}$ to $\mathbb{R}$ (see Cardinality of set of real continuous functions).  Therefore, there must be at least continuum many continuous functions from $\mathbb{R}$ to $\mathbb{R}$ whose restriction to $A$ gives an injective function from $A$ to $A^c$. Since the restriction of a continuous function is continuous (see https://en.wikipedia.org/wiki/Restriction_(mathematics)), there is such a function. 
*I'm actually not sure now if this works, but will leave it up until I can figure it out and there is already a nice answer...
