Mapping a group to a finite group s.t. the image of each generator is nontrivial Recall that a group $G$ is called residually finite if for any nontrivial element $g\in G$ there exists a finite group $H$ and a homomorphism $f$ from $G$ to $H$ such that $f(g)\neq1$.
My question is

for which kind of finitely presented group $G=\{x_1, \cdots, x_n|r_1, \cdots, r_m\}$, there exists a finite group $H$ and a homomorphism $f$ from $G$ to $H$, such that $f(x_i)\neq 1$ $(1\leq i\leq n)$. 

Finite groups and free groups are naive examples.   
 A: I'm a bit unclear on what you're asking, but I'll assume that 
you mean that given $G$, is there a presentation $G=\{x_1, \ldots, x_n|r_1, \ldots, r_m\}$ for which the property holds (note that your
question only concerns the generators $x_1,\ldots x_n$, so the
relators $r_j$ are irrelevant)? Otherwise, if 
the presentation is given, then the property will hold iff
none of the $x_i$ lie in the kernel of the map $G\to \hat{G}$,
the profinite completion. 
Given this interpretation, then the answer is that as long has
$G$ has a non-trivial homomorphism to a finite group $H$, then you
can always find a generating set with this property. Starting
with some generators $G=\langle x_1, \ldots, x_n\rangle$,
and a non-trivial homomorphism $f:G\to H$, then $f$ must
be non-trivial on some generator, say $f(x_1)\neq 1$. Now,
consider all the generators $x_i, \ldots, x_n$ (by relabeling) such that 
$f(x_j)=1$, $i\leq j\leq n$. We obtain a different generating set $G=\langle x_1,\ldots, x_{i-1}, x_ix_1^{-1}, \ldots, x_nx_1^{-1}\rangle$. Clearly now $f$ is non-trivial on each one of these generators. 
