The relative homology group $H_{1}(\mathbb{R},\mathbb{Q})$ This problem is an extract of Hatcher's book.

Show that for the subspace $\mathbb{Q}\subset \mathbb{R}$, the relative homology group $H_{1}(\mathbb{R},\mathbb{Q})$ is free abelian and find a basis.

I have no idea (edit : for the first part of the question, I think I have to use the long exact sequence...). Thank you for help !
 A: Perhaps this is an easier way of seeing this, in a very similar way to Najib's answer.
Instead of using the LES on homology, use the LES on reduced homology:
$$H_1(\mathbb{R}) \rightarrow H_1(\mathbb{R}, \mathbb{Q}) \rightarrow \widetilde{H_0}(\mathbb{Q}) \rightarrow \widetilde{H_0}(\mathbb{R})$$
Note that, since $\mathbb{R}$ is contractible, $\widetilde{H_0}(\mathbb{R}) = 0$ and $H_1(\mathbb{R}) = 0$. We also know that $\widetilde{H_0}(\mathbb{Q}) \cong \bigoplus\limits_{n \in \mathbb{N}} \mathbb{Z}$.
So we have the following exact sequence:
$$0 \rightarrow H_1(\mathbb{R}, \mathbb{Q}) \rightarrow \bigoplus\limits_{n \in \mathbb{N}} \mathbb{Z} \rightarrow 0$$
By exactness, it follows that $H_1(\mathbb{R}, \mathbb{Q}) \cong \bigoplus\limits_{n \in \mathbb{N}} \mathbb{Z}$, so $H_1(\mathbb{R}, \mathbb{Q})$ is a free abelian group on countably infinitely many generators.
A: $\require{cancel} \newcommand\R{\mathbb{R}} \newcommand\Q{\mathbb{Q}} \newcommand\Z{\mathbb{Z}}$
Write down the long exact sequence in homology:
$$\cancel{H_1(\R)} \to H_1(\R,\Q) \to H_0(\Q) \to H_0(\R)$$
The space $\R$ is contractible so $H_0(\R) = \Z$ and $H_1(\R) = 0$. It's known that $H_0$ counts path components, and each point of $\Q$ is its own path component (the only continuous maps $[0,1] \to \Q$ are constant maps). So you get:
$$H_0(\Q) = \bigoplus_{x \in \Q} \mathbb{Z}_x$$
where each $\Z_x$ is a copy of $\Z$. The map $H_0(\Q) \to H_0(\R)$ sends each $1_x \in \Z_x$ to $1 \in H_0(\R) \cong \Z$.
Because of the long exact sequence, $H_1(\R,\Q)$ is the kernel of this map. If you take some chosen base point $x_0 \in \Q$ (for example $x_0 = 0$), then this kernel is the subgroup of $H_0(\Q)$ generated by the $1_x - 1_{x_0}$ for $x \in \Q$. More than that, this set is a basis of $H_1(\R,\Q)$ as an abelian group (so it's free, in general a subgroup of a free abelian group is free abelian).
