  We present an efficient algorithm for the construction of a basis of
$H_2(\overline{\Omega},\partial\Omega;\mathbb Z)$ via the Poincar\'e--Lefschetz
duality theorem. Denoting by $g$ the first Betti number of $\overline \Omega$
the idea is to find, first $g$ different $1$-boundaries of $\overline{\Omega}$
with supports contained in $\partial\Omega$ whose homology classes in $\mathbb
R^3 \setminus \Omega$ form a basis of $H_1(\mathbb R^3 \setminus \Omega;\mathbb
Z)$, and then to construct in $\overline{\Omega}$ a homological Seifert surface
of each one of these $1$-boundaries. The Poincar\'e--Lefschetz duality theorem
ensures that the relative homology classes of these homological Seifert
surfaces in $\overline\Omega$ modulo $\partial\Omega$ form a basis of
$H_2(\overline\Omega,\partial\Omega;\mathbb Z)$. We devise a simply procedure
for the construction of the required set of $1$-boundaries of
$\overline{\Omega}$ that, combined with a fast algorithm for the construction
of homological Seifert surfaces, allows the efficient computation of a basis of
$H_2(\overline{\Omega},\partial\Omega;\mathbb Z)$ via this very natural
geometrical approach. Some numerical experiments show the efficiency of the
method and its performance comparing with other algorithms.
