complete graph definition and partial finish topo sort