Optimum pairings

In one episode of the American television show Community, when eight people have to divide into partners, they first divide without considering any variables or long-term consequences. Shortly afterwards, however, they are so annoyed with their imperfectly chosen lab partners, that they decide to find a way to be in their optimum pairings.

This leads to them spending all night, and most of the following day, trying to decide what those optimum pairings are. They try several different systems to find new partners, including dividing by hair-color/gender/race, old/young, highest/lowest GPAs, and finally by rating each other then pairing the most popular with the least popular, etc.

After a failed attempt to implement the rating system, the 8 people succumb to fighting, angry at each other for the rankings they received. Finally, more than 12 hours after beginning the optimization process, the characters realize that their class is about to start, but none of them have done their work. 

They go to class, and the teacher is so angry with them for not doing their work, and not even knowing who their partners are, that he forces 7 out of the 8 “partners” to all share one set of lab equipment, while the rest of the class no longer has to share.