When does a homomorphism factor through a free group? Let $f\colon\thinspace G\to H$ be a surjective homomorphism of finitely generated groups. Are there any methods to decide whether $f$ factors through a free group? That is, does there exist a free group $F$ and homomorphisms $g\colon\thinspace G\to F$ and $h\colon\thinspace F\to H$ such that $f=h\circ g$?
I know of one necessary condition, given by cohomology. If $f$ factors through a free group then $f^*\colon\thinspace H^i(H;M)\to H^i(G;M)$ is zero for all $i>1$ and all $H$-modules $M$ (since free groups have cohomological dimension one).
This question was inspired by Tom Goodwillie's answer to my earlier question on cohomological dimension of group homomorphisms.
 A: Even in special cases your question seems to be very hard. Let me mention just a very special case, i.e. the case when $H=G/[G,G]$ is the abelianization of $G$ and $f\colon G\to H$ is the natural projection. In this case, your problem reduces to the question whether $corank(G)=b_1(G)$, where $corank(G)$ is, by definition, the maximal rank of a free group which is a quotient of $G$, and $b_1(G)$ is the first Betti number of $G$, i.e. the rank of $H$.
It is not difficult to show that, if $H$ has torsion, then $f$ cannot factor through a free group. However, if $H$ is free, then the situation is quite complicated. For example, 
if $G$ is the fundamental group of a link complement, then $corank(G)=b_1(G)$ if and only if the link is a homology boundary link. 
In principle, results by Makanin about equations in free groups show that, if a finite presentation of $G$ is given, then there exists an algorithm deciding whether $corank(G)=b_1(G)$ or not. However, this algorithms cannot be exploited in practice even when dealing with very short presentations. On the other hand, computable (noncomplete) obstructions to the equality $corank(G)=b_1(G)$ may be obtained via the analysis of Alexander module invariants of $G$. Several results in this spirit may be found in the book "Algebraic invariants of links" by J.A. Hillman.
A: $f: G \to H$ factors through a free group iff there is a subgroup $N \le \operatorname{ker}(f)$ and a free group $F$ such that $G = N \rtimes F\;\;$ ($N$ normal ).
Proof: $(\Rightarrow)$ Let $G \xrightarrow{g} E \xrightarrow{} H$ be a factorization of $f$ with $E$ free and let $N$ be the kernel of $g$. Clearly $N \le \operatorname{ker}(f)$ and as a subgroup of a free group, $F := G/N$ is itself free. Thus we have an extensions $1 \to N \to G \to F \to 1$ that splits since $F$ is free. 
$(\Leftarrow)$ Suppose $N\le \operatorname{ker}(f)$ and $G = N \rtimes F$ with $F$ free. Hence $N$ is normal in $G$ and because $N \le \operatorname{ker}(f)$, $f$ has a factorization $G \to G/N=F \to H$ through a free group. 
Remark: That $f$ is surjective wasn't used. But if we know that $f$ is surjective, we can conclude that the rank of $F$ is greater or equal than the minimal number of generators of $H$. 
