Interpolation using homeomorphism I have a question which is inspired from this question.
Given pairwise distinct $x_1,x_2,\dots,x_n$ in $\mathbb{R}^p$ and pairwise distinct $y_1,y_2,\dots,y_n$  in $\mathbb{R}^p$ when can we say that there is a homeomorphism $\phi $ on $\mathbb{R}^p$ such that $\phi(x_i) = y_i$?
The answer is simple when $p=1$ because a homeomorphism is a strictly increasing (or strictly decreasing) continuous function. So a condition is $(x_i - x_j)(y_i - y_j)$ has the same sign for all distinct $i,j$
But what about general p?
 A: Suppose that $p\ge2$ and prove the required claim by the induction with respect to $n$. When $n=1$ put $\phi(x)=x+y_1-x_1$ for each $x\in\Bbb R^p$. Suppose that the claim if proved for $n-1$ pairs points. Let $x_1,x_2,\dots,x_n$ be pairwise distinct points of
$\mathbb{R}^p$ and $y_1,y_2,\dots,y_n$ be pairwise distinct points of $\mathbb{R}^p$. By the induction hypothesis, there exists a homeomorphism $\phi’$ of $\Bbb R^p$ such that $\phi’(x_i)=y_i$ for each $i<n$.
Given two points $x,y\in\Bbb R^n$ let $xy$ be the point $x$, if $x=y$, and the straight line passing through $x$ and $y$, otherwise. Pick an arbitrary point $z\in\Bbb R^p$ which does not belong to any of sets $x_ny_1,\dots, x_ny_{n-1}$ and
$y_nx_1,\dots, y_nxy_{n-1}$. Then the union $C$ of segments $[x_n,z]$ and $[z,y_n]$ contains no $y_i$ with $i<n$. Here we proved that for each open cube $U$ of $\Bbb R^p$ and any two points $p$ and $q$ of  $U$ there exists an homeomorphism $h$ of $\Bbb R^p$ such that $h(p) = q$ and such that $h(x) = x$ for every $x\in \Bbb R^p\setminus U$.
For each point $x\in C$ pick an open cube $U_x$ centered at $x$ and containing no $y_i$ with $i<n$. Since the set $C$ is compact, it contains a finite subset $F$ such that $C\subset\bigcup_{x\in F} U_x$. The set $C$ is homeomorphic to a segment and this easily follows that there exists a natural number $m>1$ and a sequence $x_n=z_1,\dots, z_m=y_n$ of points of $C$ such that for each $1\le i<n$ bot points $z_{i}$ and $z_{i+1}$ are contained in a set $U_{x_i}$ for some $x_i\in F$. Pick a homeomorphism $h_i$ of $\Bbb R^p$ such that $h(z_{i}) = z_{i+1}$ and such that $h(x) = x$ for every $x\in \Bbb R^p\setminus U_{x_i}$. It remains to put $\phi=h_{m-1}\dots h_1\phi'$.
