I am trying to build a matchmaking (dating) algorithm that would take a pool of people and pair individuals in the pool every week.
I am trying to ensure that no 2 people that have previously been paired in the past will be paired again. This means that my algorithm is concerned with historical matchmaking data.
For now, I am trying to do this on a random basis before moving on to a more sophisticated means. Does anyone have an approach to doing this rather than the obvious O(n^2) approach of going through every person, reading the person's dating history, and picking the first other person that's not part of the history ?
If you can suggest a clever means to take advantage of concurrency, that would be great. Do comment if any clarification is needed.