Computation of the permanent of a matrix