• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need help with algorithm

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, starting to actually put my project together and have been trying to figure out how I am going to accomplish the following:

I have a tournament with 4 different divisions. Each of these divisions is made up of a varying number of teams (from 3 to 7 teams per division). Each team needs to race the other in a "Round Robin" format. I want to generate a scheduled list of all the races to ensure that each team races every other team in their division ONLY.

Secondly, each team belongs to a club. A club may have more than one team in the same division and they may have teams in multiple divisions. I want to limit, as much as possible, teams from the same club running in consecutive races.

Lastly, the race takes place in two lanes, the left and the right. I need to ensure that teams get an "even" amount of racing in each lane. Preferably they would switch from left to right with each race, but that may not always be possible.

So, how impossible is this? Can anyone point me in the right direction?
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
this might do you for the round robin part

 
Brett Williams
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you, it is definitely a start and easy enough to understand. I shouldn't have to tweak this much. I am assuming I would call this for each of the divisions and it would create the schedule for that division. This would leave me at having to marry all of the divisions schedules together into on list and then ordering the list, based upon my above requirements.

Thank you very much for helping with this.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic