  Given a set $X$ and a family $G$ of self-maps of $X$, we study the problem of
the existence of a non-discrete Hausdorff topology on $X$ with respect to which
all functions $f\in G$ are continuous. A topology on $X$ with this property is
called a $G$-topology. The answer is given in terms of the Zariski $G$-topology
$\zeta_G$ on $X$, that is, the topology generated by the subbase consisting of
the sets $\{x\in X:f(x)\ne g(x)\}$ and $\{x\in X:f(x)\ne c\}$, where $f,g\in G$
and $c\in X$. We prove that, for a countable monoid $G\subset X^X$, $X$ admits
a non-discrete Hausdorff $G$-topology if and only if the Zariski $G$-topology
$\zeta_G$ is non-discrete; moreover, in this case, $X$ admits $2^{\mathfrak c}$
hereditarily normal $G$-topologies.
