In bridge, four people sit at each table and play a game. The people that sit across from each other are partners. So there are two "teams" at each table. It's not important to the scoring about who plays with who or who plays against who, but the ladies consider this to be really a social event rather than a competition. If some thought isn't put into these seating arrangements the ladies will complain that they end up playing the same people all the time.
Our challenge then, simply enough, was to come up with a seating chart for each of the eight games where everyone gets to play a game with everyone else.
This turned out to be much more difficult than a quick thought would lead you to believe. Sitting down with a pencil and a piece of paper and trying it turns out to be an exercise in frustration.
The first week or so of searching for a solution consisted of writing a program to go through each and every possible seating arrangement and try to find a perfect arrangement. I soon realized that this problem was quite large. A friend of mine, who was thrilled to be able to use mathematical equations for a real world question, convinced me that there could be no perfect arrangement.
The ladies were obviously not happy with the way some bridge gatherings were run and I'm sure they weren't really concerned with wether or not we could acheive the perfect seating arrangement. So we had to try for something better than ladies trying to pick a seat or even random seat assignments.
Note, in the above description, both Elizabeth and Janice are displeased with their seats, but we still count it as one point. To calculate the score I really build a rectangular table with the players listed across the top and the players listed down the side. An ideal solution would have nothing but 1's in it, but that is impossible. I get my score by examining each value in the table. If the value is greater than one, than the score is equal to the number minus one, otherwise it is zero. Of course, the table is symmetric about the diagonal, so I divide by two -- just for convention.
If you're really quick, you'll notice that a player can play with three other players for each of the eight games, which makes twenty-four players. Since there are only 23 other players, there will be at least one player that he plays with twice. For every player that he does not play with, there will be one additional time that he plays with somebody that he has already played with. So, the number of points is also equal to twenty-four plus the number of zeros in the table, then divide by two.
Okay fine. When a player sits at the same table more than once, I now call it a "bad tabling". When a player partners with the same player more than once, I now call it a "bad partnering". I still don't know the relative badness of the three bad things but I have tweaked my recent attempts to at least not ignore these negative things when looking for a good "score".