used dynamical programming in ``dup_zz_zassenhaus``