We introduce an algorithm which transforms a finitely presented group $G$ into another one $G_{\Psi}$. By using this, we can get many finitely presented groups whose group homology with coefficients in the group von Neumann algebra vanish, that is, many counterexamples to an algebraic version of the zero-in-the-spectrum conjecture. Moreover we prove that the Baum-Connes conjecture does not imply the algebraic version of the zero-in-the-spectrum conjecture for finitely presented groups. Also we will show that for any $p\geq 3$ the $p$-th group homology of $G_{\Psi}$ coming from free groups has infinite rank.