Monday, February 25, 2008

Math Consult

I just realized that the lottery for rotations is happening tomorrow. As I was thinking about it, I found it to be both more interesting and more complicated than I originally anticipated. I got a math consult from my friend Emily. This is a simplified version of what I wrote:

Third year is made up of 6 blocks of time (1-6) in which we are assigned 6 different rotations (A-F) at different sites (less important). Students will be assigned to rotations through a lottery process and each student will get one rotation at one site for each of the 6 blocks. The rotations can be done in any order.

The way the lottery works is that each student submits a preference list. This is an ordered list of choices for 3 things: block, rotation, and site. The list can be any length. The computer will randomize all students. Starting with the first student, it will start at the beginning of that student's list and assign the student to the first choice that has an available spot (which would be the first choice on the list). It then moves to the next student and goes down that student's list until it finds a choice with an open spot, etc. After it goes through all the students once (a "round" which has assigned each student to one rotation), the computer randomizes students again and does the same thing: it assigns someone to the first choice on the list with an open spot that does not conflict with what the student already has. After 6 rounds, everyone is assigned to 6 different rotations for the 6 different blocks. (I suppose if your list is too short and runs out, you get assigned randomly).

So my list might look like:
1. Block 3, Rotation C, Site a
2. Block 3, Rotation C, Site b
3. Block 3, Rotation C, Site c
4. Block 3, Rotation D, Site a
5. Block 4, Rotation C, Site a

If Block 3, Rotation C, Site a is filled but b is not, then I will be assigned choice 2. If I've already been assigned to a Rotation C, I will be assigned choice 4. If I've already been assigned to Block 3, I will be assigned choice 5. Sites are not mutually exclusive; even if I've been assigned site b, I can still be assigned choice 2.

My question is: is there a way to optimize my list?

These two ideas occurred to me. I could try something like this:
1. Block 3, Rotation C, then A, B, D, E, F
2. Block 4, Rotation A, then B, C, D, E, F
3. Block 5, Rotation B, then A, C, D, E, F
etc. - this makes it so that at each "round" in the lottery, I am assigned something in block 3, then 4, then 5.

Another idea is this:
1. Block 3, Rotation C
2. Block 4, Rotation B, then C
3. Block 5, Rotation A, then B, then C
4. Block 6, Rotation D, then A, then B, then C
My reasoning is that if I don't get my first choice for block 3, I don't want to exclude my first choice for block 4 (which would happen in the first scheme).

Interesting stuff.

After talking to Emily for a bit, we realized that these two schemes emphasize different preferences. If one has relational preferences such as wanting to do B before C before D, then the first scheme (or variation of it) may accomplish that. It will preserve relationships between rotations over absolute blocking of rotations. Emily points out that if I wanted to do all my favorite rotations first (or least favorite, or whatever), this would be the optimal way to do it.

On the other hand, if one has absolute preferences such as wanting to do rotation B in block 3, then the second scheme may accomplish that more readily. It seems as though if your first choice is filled, then the first scheme will allow a frameshift while the second scheme allows switches (point mutations?).

That's our hunch. It's actually a bit mindboggling to think about, so it might not be completely correct or there may be a more optimal scheme. I'm not sure yet how I will rank things, but as I have to decide tonight, I will probably remark on it tomorrow.

No comments: