On the computation of arithmetical ranks