generate a solution in ranking

while(!emptybag(bag))

{

remove(&bag,&obj);

update(succ,obj,&bag,count);

}

copy(*pn,topologicalsort,ranking);

}