Sunday 16 March 2014

How We Come Up with Seating Arrangements at a 7for7 Event

My last post was on how various people have used data to come up with ways to optimize an online profile for maximum impact. Today, I'll talk about something that's still data related, but closer to my speed dating project. Namely, how I come up with the seating arrangement at an event.

In any 7for7 speed dating event, there can be up to 20 participants. How many possible seating arrangements do you think there can be for 20 participants?

100? 1000? One million?
.
.
.
.
.
<Scroll down to see>
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Answer: 2.432902e+18

There are a total of more than 2.4 quintillion seating arrangements!**

So, how do I decide which seating arrangement to use? Do I assign participants at random?

I can't do that...what if some people already know each other? They may have registered together as friends and told me explicitly that they don't want to date each other at the event.

Also, what if two people had speed dated at a previous event? And it didn't work out for either of them. It would be a waste of time for both of them if I seated them together again. Not to mention awkward.

[Let's not even talk about how some people may have met at one event, gone steady, broken up, then signed up again separately for another event...I can't have cat fights breaking out at my events.]

Besides, since I know the ages and interests of the participants (you guys told me at registration), this gives me the chance to use that data productively in devising a seating arrangement.

The answer to the seating arrangement problem is a genetic algorithm.

Very simply, I've written a computer program which tests each possible seating arrangement.

Seating arrangements which result in anyone seated with someone they either already know or have speed dated before instantly fail the test. The program tests not just the starting seating arrangement but also how the arrangement changes over the course of the evening as the moving group changes seats.

For seating arrangements which pass this first test, the program calculates a date score for every pair of participants who end up speed dating each other.

Date scores are calculated based on how close in age the 2 participants are, and how many interests they have in common. Two participants who are very close in age and have many interests in common will have a high date score.

The date scores are summed up for everyone in the starting seating arrangement and across the whole evening as the arrangement changes from the moving group changing seats.

This total date score for a particular seating arrangement is the fitness score.

The program runs through all the seating arrangements and picks the one with the highest fitness score. On average, this seating arrangement should result in a better dating experience for everyone than if I had assigned seats at random.

One final detail: for performance reasons, even a modern workstation would take a very long time to test 2.4 quintillion seating arrangements. So, I incorporated some simplifying assumptions into my program, the details of which are not important.

Bottomline: The seating arrangement that you see when you attend a 7for7 event is not random, but has been carefully screened to be appropriate for the participants attending.

___

**Unlike in speed dating for straights where participants meet only with the opposite sex, in gay speed dating, everyone can meet everyone else. Therefore, the number of seating arrangements is the factorial of the number of participants, in this case 20!.