Apologies if this has been asnswered before or if it's in the wrong place but I really don't know the proper terms I should be looking for. I have a system whereby people are asked to choose between two items, then another two, etc. until all paired combinations from the list of items has been tested. This gives me a ranking order. e.g. we have 3 items; A, B and C. Each item must compared against each of the others, which may give us this result: A > B B > C A > C By '>' I mean 'better than', as in an opinion, rather than 'greater than', as in a mathematical fact. My problem is this: I want to be able to automatically calculate any possible results without having to ask them to the user. In the above example we only need have asked 2 comparisons, since by the third we knew A > C since A > B > C. It was ok to ask all possible combinations here as there are only 3 but in my real situation I will have at least 5 items, which means 10 possible combinations. How can I apply this logic to minimise the number of questions I need to ask before I know the result of each combination? I will be programming this in SQL since the results are coming from a database. Any help with that in mind would also be much appreciated. Thanks in advance!