let compare (v1,g) (v2,g) = (G.out_degree !g v1) - (G.out_degree !g v2)