I have a set of objects and a set of comparison results for some of them.
I want an algorithm that returns the next comparison I should make to two objects towards having a way to know the full order of all objects. If the order of all objects can be already known I should get the objects ordered.
Requirements: ask for the minimal number of comparisons between objects as they are the most expensive operation.
For example: I know elements A,B,C,D and relations A->B , A->C , B->D , C->D the algorithm should return next pair to compare B and C