in reply to Help thinking about an alternate algorithm

What if you spend extra memory to partially process each pair in the order of how likely they are to be the best pair?

Each pair will need to track where it is in the sequence of categories to check next.