Computation of the finitistic dimension of monomial algebras