while(!emptybag(bag))
{
remove(&bag,&obj);
update(succ,obj,&bag,count);
}
copy(*pn,topologicalsort,ranking);