Necessary and sufficient condition for the spaces $\mathbb R/A$ and $\mathbb R/B$ to be homeomorphic Let $X$ be a topological space.
Let $Y$ be a subset of $X$.
We denote by $X/Y$ the quotient space of $X$ identifying any two elements of $Y$.
Let $A$ and $B$ be two finite subsets of $\mathbb R$.
Are $\mathbb R/A$ and $\mathbb R/B$ homeomorphic if and only if $|A| = |B|$?
 A: Yes. Sufficiency is easy, and necessity follows from the observation that removing the identification point separates $\Bbb R/A$ into $|A|+1$ components.
Added: If $A=\{a_1,\dots,a_n\}$, where $a_1<\ldots<a_n$, $X=\Bbb R/A$, and $p\in X$ is the identification point, the components of $X\setminus\{p\}$ are the sets $(\leftarrow,a_1)$, $(a_n,\to)$, and $(a_k,a_{k+1})$ for $k=1,\dots,n-1$. $X$ itself looks like $n-1$ loops, corresponding to the components that are bounded intervals, and two loose ends, corresponding to the open rays.
A: Another way of looking at Brian's analysis above is to calculate the the maximum number of points that can be removed so that the resulting space is still connected.
Let $A = \{ x_1 , \ldots , x_n \}$ with $x_1 < \ldots < x_n$, and let $*$ denote the point of $\mathbb{R} / A$ corresponding to the identification of the points of $A$.
Note that you can remove $n-1$ points from $\mathbb{R} / A$ and leave the space connected: for $i < n$ let $z_i = \frac{x_{i}+x_{i+1}}{2}$.
On the other hand, you cannot remove $n$ points and leave the resulting space connected.  If $z_1 < \ldots , z_n$ are points removed, there are four cases:


*

*If $z_j = *$ for some $j$, then clearly the space $( \mathbb{R} / A ) \setminus \{ z_1, \ldots , z_n \}$ is disconnected.

*If $z_1 < x_1$, then $(-\infty,z_1)$ is a clopen subset of $( \mathbb{R} / A ) \setminus \{ z_1, \ldots , z_n \}$.

*If $z_n > x_n$, then $(z_n , +\infty )$ is a clopen subset of $( \mathbb{R} / A ) \setminus \{ z_1, \ldots , z_n \}$.

*Otherwise there must be an $i < n$ is such that $x_i < z_j < z_{j+1} < x_{i+1}$ for some $j$.  It is easy to see that $(z_j,z_{j+1})$ is a clopen subset of $( \mathbb{R} / A ) \setminus \{ z_1, \ldots , z_n \}$.

