Computing the nucleolus of cooperative games