Let's say there is a group of 4n people, and each of them rank their top 3 people they would like to be in a smaller, 4-person group with. What would be a good algorithm to create these groups randomly, but with a greater chance of one person being with the first, second, and/or third person on their list?
I.e. a weighted grouping algorithm. (The ones that Google finds are all for networking)