Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Perl for Adjudication

by Helter (Chaplain)
on Sep 26, 2003 at 13:11 UTC ( [id://294404]=note: print w/replies, xml ) Need Help??


in reply to Perl for Adjudication

I'm trying to figure out what you are trying to do. I admit I have not looked at your code yet, but I have looked at your "Understanding Paneling Image", and it only confused me.

In the first picture it says that A3 only has 4 options, I don't see why. I would think that A3 in the first round could be joined with any 2 non 'A' groups. So you could have 6 different groupings of just Letters that include the A group (ABC, ABD, ABE, ACD, ACE, ADE). If I'm not misunderstanding (which is entirely possible), I would think you could use an list for each member (A1, A2, B3...) and keep the list of other groups that group has competed with already. Then just iterate (or randomly select), and reject if the school is the same, or if the chosen group is in the list.

And now that I have written all that, I see you already have code that works? Maybe you should re-phrase the question?

You say that it doesn't work all of the time, is that because of un-even numbers of teams in each group? If you find that if you run your program enough times you get an answer, even if it has to run 5 times, unless it takes hours (and even then if you have the time) why not check the results for 'correctness' and if it is not right, just loop back until you get an answer that works?

Replies are listed 'Best First'.
Re: Re: Perl for Adjudication
by dejoha (Novice) on Sep 26, 2003 at 18:36 UTC

    What I mean by only having four options refers to the fact that competitor A1 cannot compete against two members of another school, thus violating rule #1. You are correct in saying that A1 has more than four possible groupings.

    I haven't tried to keep track of each panel (yet) but I do like your idea. The reason my solution doesn't really work is because I was just making and shifting rows back and forth, much like a bad carnival game with ducks on a track.

    My question, I suppose, is trying to find out 1) is there a simple (or complex, but doable) mathematical solution to find matches (factorials just tell you how many possible combinations, but not unique combinations for each unit). 2) is there a better way to structure a program to fill these panels.

    I like your idea of keeping track of each user/panel. I'll have to think about that one for a little while.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://294404]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2024-04-19 01:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found