TITLE: Any continuous map is homotopic to one assuming fixed values at finitely many points
QUESTION [5 upvotes]: Let $X$ and $Y$ be topological spaces. Assume $X$ is locally contractible and has no dense finite subset. Assume $Y$ is path-connected.
Given $n$ pairs of points $(x_i, y_i)$ where $x_i\in X$ and $y_i\in Y$ for $1\leq i\leq n$ and a continuous map $f:X\to Y$ can we find a continuous map $g:X\to Y$ homotopic to $f$ such that $g(x_i)=y_i$?

REPLY [13 votes]: Let $X$ be the real line with a doubled origin and $Y$ be $\Bbb R$, and let $f$ be the projection map that collapses the two origins $0^+$ and $0^-$ to $0$. Then any map $g: X \to Y$ satisfies $g(0^+) = g(0^-)$ because $\Bbb R$ is Hausdorff. Therefore, $f$ is not homotopic to any map that sends these two points to distinct ones.
Your question is closely related to the inclusion $\{x_1,\dots,x_n\} \subset X$ having the homotopy extension property. In particular, if it is the inclusion of a neighborhood deformation retract, then such homotopies exist. In the example above, each point individually has a contractible neighborhood but the two origins together do not have a neighborhood that retracts back onto them.