compare graph isomorphism