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$?



Any continuous map is homotopic to one assuming fixed values at finitely many points
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.


