Ullman isomorphism algorithm