in reply to Re: Perl for Adjudication
in thread Perl for Adjudication

I'm sorry about the ambiguity -- you're right about the jargon I am using. Let me try to clarify a few things as best I can.

For simplicity in the program, I make the assumption that each school registers the maximum number of students as competitors. Let's say we have 10 schools register monologues. The maximum a school can enter in this category is 3. This would give us a maximum total of 30 competitors (in this case, 30 students). Let "A1" stand for school A, entry 1, and so on:

A1 B1 C1 D1 E1 F1 G1 H1 I1 J1 A2 B2 C2 D2 E2 F2 G2 H2 I2 J2 A3 B3 C3 D3 D3 F3 G3 H3 I3 J3

There are 3 rounds. Each competitor must compete in each round. In order to accomplish this, we divide the total number of competitors into groups and send them into separate rooms, each one adjudicated by a single judge. These are the panels. Panels = Rooms. We want to keep the number of competitors in each room under six for timing purposes (each competitor performs between 3 - 5 minutes).

At this point, we do not need to worry about the number of judges needed. In the example above, we have 30 competitors. We could use 6 rooms and 6 judges with 5 competitors in each room. Round one might look like this:

Round 1 ---+----+----+----+----+---- A1 | A2 | A3 | B1 | B2 | B3 C1 | C2 | C3 | D1 | D2 | D3 E1 | E2 | E3 | F1 | F2 | F3 G1 | G2 | G3 | H1 | H2 | H3 I1 | I2 | I3 | J1 | J2 | J3

One thing that I think would be most valuable, would be to find out if it is even possible to make round 2 and 3 work without breaking the competitions "rules." I think this is the reason I was told about factorials. If I could find out whether or not a certain set would or would not work, I could modify the program to work only when the number of schools is > X (for example).

Factorials only tell you the possible matches. It doesn't factor in if a match fits my criteria. Does that make sense?

This was why I tried to illustrate using a diagram. I was tying to see if there was a mathematical solution to figure out "how many matches are left." In my illustration, I stated that for competitor A1, after round one, his possible matches are reduced by 4. I'm not a math major, so I don't really know how to state this very clearly, but it seems like it should be some kind of simple algebra. Maybe?

I thought that if I could figure out the "number of matches left", I might be able to use that information to find out what matches are left and use them for the next round (instead of iterating through a random list over and over). Doing it randomly seems like it would take a very long time to compute. However, if I knew mathematically what matches wouldn't work, I wouldn't have to do the randomness, per se.

Since the possible matches is reduced each round, it is like an intricate puzzle --- the pieces can only fit a certain way.

I hope this helps someone. I keep wanting to have a mathematical solution I can use with Perl that would help take some of the guesswork out of it. I don't mind putting Perl to work in a random recursive subroutine, but it seems like that breaks the Perl laziness rule :)

It would be great if there were a pattern in the way you assign competitors into panels. Anyone see a pattern?