TITLE: How many points can I prescribe for a diffeomorphism of the plane?
QUESTION [8 upvotes]: I was trying to find out how to construct a $\mathcal C^\infty$ curve that joins two arbitrary line segments. My idea was to use bump functions and the likes, but for that I had to make the line segments lie at $y = 0$ and $y = 1$. Of course, the transformation that transported the segments would have to be a diffeomorphism (at least of some set containing the segments). This I readily found to be equivalent to prescribing the image of four points under some diffeomorphism. A couple ways of doing this occurred to me, but I encountered this question in the process.
What restrictions are there on the cardinal of a set A\subset\Bbb R^2 such that there exists a (auto) diffeomorphism f with f(A) = B for some fixed $B\subset \Bbb R^2? (Obviously #B = # A)
In light of developments, I'll ask for which homeomorphic $A,B\subset\Bbb R^2$ is there a diffeomorphism of $\Bbb R^2$ (or an open set containing $A$,$B$) sending $A$ to $B$?
If $\#A<\infty$ there always exists such an $f$, constructed by appropriate polynomials. (e.g. $f(x,y) = (ax^2+bxy+cy^2,a'x^2+b'xy+c'y^2)$ allows for six points, and so on.
My intuitive guess is that we can do the same for a countable set, but I couldn't justify it myself. For uncountable it seems obvious that the answer is negative in general. Along with an answer for the countable case, I'd like to know if possible of some other examples, possibly more elegant, for the finite case.
Also optional: how does the answer to this question (in a manifold) relate to the geometry of the manifold?

REPLY [6 votes]: The questions you ask have a very wide scope, so I will just give some examples. If diffeomorphism is replaced with homeomorphism, problems like this have a long history with the most famous being the Jordan-Schoenflies problem. Daverman's book Decompostions of Manifolds is a good source for this material, though really this question probably spans all of geometric topology.
The density of $A$ and $B$ in $\Bbb R^2$ and the homeomorphism type of $A$ and $B$ give some obvious invariants of finding a homeomorphism of $\Bbb R^2$ sending $A$ to $B$ (i.e. Hagen's answer). Sometimes these are enough. In fact, it is true that for every subset of the plane $C$ homeomorphic to the Cantor set, there is a homeomorphism of $\Bbb R^2$ which sends $C$ to the standard Cantor set. In $\Bbb R^3$, things become much more complicated. There are sets homeomorphic to Cantor sets (see Antoine's necklace) where there exists no such homeomorphism. 
Also in $\Bbb R^3$, we can ask when can whether or not there exists such a diffeomorphism for a pair of smoothly-embedded circles $K_1, K_2$. Gordon and Luecke showed this is true whenever $\Bbb R^3-K_1$ and $\Bbb R^3-K_2$ are homeomorphic, and in one dimension higher there are some wide open questions i.e.

Open Question: Let $S_1,S_2\subset \Bbb R^4$ be smoothly embedded 2-spheres one of which is the standard $S^2\subset \Bbb R^3 \times 0$. If there is a homeomorphism of $\Bbb R^4$ sending $S_1$ to $S_2$ is there a diffeomorphism of $\Bbb R^4$ sending $S_1$ to $S_2$?