I dont konw, i expert in C++ and it is easy. But i dont know python, all you
need is sorting pairs, and mayby you can use tuples instead of pairs.

2008/12/16 Ross <ross.j...@gmail.com>

>
> I'm a novice python programmer. Would this be a difficult problem to
> represent programatically?
>
> On Dec 11, 6:37 am, "Miroslav Balaz" <gpsla...@googlemail.com> wrote:
> > i think that, you could just simulate the tournament, ande before each
> weak
> > you sort players by number of played matches, and if this numer is same
> then
> > by name.
> > And after you have them sorted,you just assign an oponent to first
> player,
> > in such way that you choose the one the first one with whom he diddnt
> > played, and you repeat this 3 more times, or you may pick first eight
> > players and try to find perfect matching.
> > for eight players it should look like this
> > AB,CD,EF,GH
> > AC,BD,EG,FH
> > AD,BC,EH,FG
> > ...
> > for ten players
> > AB,CD,EF,GH,  bye I,J
> > IJ,AC,BD,EG, bye FH
> > FH,IA,JB,CE bye DG
> > DF,GI,HJ,AE  by BC
> > BC,DG,FI,HA      by JE  <---------here it should be better if BC,DG,FJ,HI
> > and bye AE
> >
> > sorry i not sure if i made example correct, but i belive that algorithm
> is
> > good enough.
> > there are a lot things to try, for example instedad of sorting my name
> you
> > can decide by ranodm, or by firste unasigned opponent.
> >
> > 2008/12/11 Ross <ross.j...@gmail.com>
> >
> >
> >
> > > I have a problem which is a variation of the Sports League Scheduling
> > > Problem. This problem pertains specifically to a tennis league at my
> > > own sports club. Each winter, the pro puts out a blank sheet of paper
> > > for people to sign up for tennis leagues. From year to year, the
> > > number of people who sign up fluctuates; however, the number of tennis
> > > courts available stays the same at 4 courts. For my particular
> > > problem, lets say that 12 people sign up for the league (this is a
> > > singles league) so each week, 4 people will have byes and 8 will play.
> > > Can anyone come up with an algorithm which allows each player to play
> > > each other player 1 time only and also deals out a fair number of bye
> > > weeks to each player? Assume the league runs until every player has
> > > played every other player once. If anybody can come up with such an
> > > algorithm, would it scale well to years when a different number of
> > > players signed up?
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to