Skip to content

Month: May 2017

GroupSort 2: Let’s be Real Here

In the last post, we wrote a naive algorithm to sort a set of users into groups of a specified size, minimizing the number of “repeat pairs” of group members, as given in a pairing history variable. In other words, you’re trying to put students into rooming configurations, and you want students who’ve been roomed together before to be less likely to roomed together again. We want to maximize the pairing diversity because meeting new people is fun and a memorable part of your formative years. But our algorithm failed those students, because it could only realistically run for numbers up to about 10 students, before the computation…

Continue reading GroupSort 2: Let’s be Real Here

Leave a Comment

GroupSort -or- Please Wait Students, the Algorithm is Almost Done

A few years back, a teacher friend of mine asked me if I could write a program to solve a problem for him. His school travels, so they’re spending every night in hotels, and need to group the students into rooms. Ideally, the students will be with new people as often as possible, and not just sharing rooms with the same people every hotel. Adding to the complexity, the rooms can be of varying size, and the number of nights in each hotel will differ slightly. The problem, then, is this: By the end of the trip, we want each…

Continue reading GroupSort -or- Please Wait Students, the Algorithm is Almost Done

Leave a Comment