mapping cylinder contractible iff $H_n(f):H_n(X)\to H_n(Y)$ is an isomorphism The mapping cylinder will be defined as $Z_f=X\times[0,1]\coprod Y/\sim$, where $\sim$  is defined by $(x,1)\sim f(x)$. 

Let $f:X\to Y$ a continuous map between topological spaces and the map $i:X\hookrightarrow Z_f$ identifies $X$ with $X\times \{0\}\subset Z_f$ is the inlusion. $R$ is a ring. I want to know

$\forall n\in\mathbb{N}_0\; H_n(f;R):H_n(X;R)\to H_n(Y;R)$ is an isomorphism iff $\forall n\in\mathbb{N}_0 \;H_n(Z_f,X)=0$ 

Here we consider the singular homology. I don't know how to prove this, sorry. Maybe for the direction $\Leftarrow$ we can consider a map of pairs get a long exact sequence. One of the first thoughts I have that the chain complex $(C_n(Z_f,X),d_n)_{n\in \mathbb{N}_0}$ is contractible (identity is chain homotopic to the zero map). But I don't know why it could be useful. 

How to prove the statement? Any help is appreciated. Regards.
Consider $X \rightarrow Z_f \rightarrow (Z_f, X)$. Hint: $Z_f \simeq Y$.
Consider $X \rightarrow Z_f \rightarrow (Z_f, X)$. Hint: $Z_f \simeq Y$.