I’ve made my fixture generating code available via a web page for those who don’t want to delve into programming in order to generate a fixture list.
Fixtures Generator (now in PHP as I didn’t want to have to install Tomcat again). Source code.
Adventures in Computer Programming – bakert@gmail.com
I’ve made my fixture generating code available via a web page for those who don’t want to delve into programming in order to generate a fixture list.
Fixtures Generator (now in PHP as I didn’t want to have to install Tomcat again). Source code.
First of all, you can use my plan for a 10-12-12 clubs league. You just use the same 12-club fixtures for both 12-club divisions. Just remember that if Man Utd is A1 in division 1 then Man City in division 2 must be A2.
Second, my plan is not a result of trial and error – it’s based on logic and system. If you want I can explain exactly what logic I apply when making my fixture sheets.
Hey Fixtureman,
That’s very interesting! If you use a system (algorithm?) when you make these sheets then we can get the computer to do the heavy lifting for us. I’m not really very interested in solutions to one-off setups like 10-12-12. I’m interested in generalizing the solution so that when someone comes along with any set of requirements they can generate themselves a fixture list that will work. Do you see what I mean? 10-12-12 is only useful if you have that exact setup. But a program that can generate fixture lists for arbitrary numbers of teams in arbitrary numbers of divisions will be very useful to lots of people.
In actual fact, the fixtures generator above probably solves 90%+ of all fixtures problems anyone ever has. But I’m still interested in your system – at the very least I might be able to save you a few night’s work!
Yes, I use algorithms – but they are rather complex I’m afraid. However, 10-12 problems are solved the same way as 14-16 problems, 18-20 problems, 22-24 problems. In other words: If the division with the highest number of clubs has 2 times an even number of clubs, the same algorithms apply. I have also algoritms for problems where the division with the lowest number of clubs has two times an even number of clubs, that is 14-12, 18-16, 22-20, and so on. The algorithms used here differ somewhat from the algorithms used in the other problems, but not very much.
I will explain my system, over several postings. But first I will check if this forum can cope with a 9 column table.
If not, I will have to rewrite my first manuscript a little before posting it.
Here’s the table:
It should work. I will now click on “Submit Comment” to see how it’ll look like.
Algorithms sound wonderful. Never mind if they are complicated – we only have to type them right once!
To get the monospace typefaces as above use <pre> before the table and </pre> after the table.
Hi,
Trying to arrange a league of 3 divisions, thats the easy bit. The problem is that we have ‘A’ & ‘B’ teams in all divisions how do we arrange so that A & B don’t play home games on the same week. Have worked out that 1 & 8 and 4 & 6 don’t play at home together but cannot workout anymore. Any suggestions.
Hi H FIRTH,
The complimentary teams feature makes sure that team n and team n+m in the /same/ division do not play at home together (where m is half the number of teams rounded up, and n is a number less than m).
To make this work across divisions you have to make ‘A’ and ‘B’ teams be team n and team n+m in different divsions.
A simple example. Say we have two divisions of 4 teams:
Div 1: Everton, Liverpool, Chelsea, ManU ‘A’
Div 2: Stockport, Lincoln, Barnsley, ManU ‘B’
In a 4 team division, m is 2. This means that team 1 never plays at home at the same time as team 3 and team 2 never plays at home at the same time as team 4. So make ManU ‘A’ team 1 in Div 1. And make ManU ‘B’ team 3 in Div 2.
Hope that helps!
Hi,
Thanks for the quick reply. This has worked fine.
Thanks a lot this has saved me a lot of time brill
Hello H Firth
When you have A teams and B teams in different venues who shared the same venue, it does become tricky. If all the divisions have the same number of teams the same complimentary pairings that Thomas uses will work. When the number of teams in each division is different (there is one exception) there are other pairings required and there is a limit to the number of pairings that exist – 4 (it depends on the fixture pattern that you use). So if you have one league of 8 and one league of 10 and there are 5 pairs of A’s and B’s across each division, then it can’t be done. The Advanced+ version at www.sportsfixturelists.com copes with this sort of scenario.
H Firth and Alan,
one can easily create fixtures for a 8-club division and a 10-club division, with each club in the 8-club division having a club in the 10-club division never playing at home in the same league round.
In the example below A1 and A2 are never at home in the same round. The same is true for B, C, D, and E,
This is true both within the same division and across divisions.
With this plan each team plays at home and away alternately with maximum 2 breaks in the pattern during the season. Similar fixture plans can be made for 12/10 cluns, 14/12 clubs, and so on.
I am setting up a darts singles league which will have between 20 and 24 players in it. your generator gives me the fivtures the problem I have is that all these matches will take place at one venue with 4 boards and we will play 20 matches a week. is there a way, apart from trail and error, that I can organise it so that where players play twice on the night they do not play two consecutive matches and don’t play on the same board twice. I dont need home and away matches as they will only play each other once during the season. hope this makes sense as I know nothing about programming.
Martin, interesting puzzle.
I think I’ve cracked it for a league of 20 players. I won’t bore the readers of this board with the table I’ve created. But if you send me a mail to fixtures “at” runbox.no I will send you my 20-player plan. And I’ll see what I can come up with in case of 21, 22, 23 or 24 players.
Martin, I think I have now found a simple algorithm (or a set of algorithns) for your problem in the case of 20, 22, or 24 players. (I’m not quite satisfied with the 22-player solution, but it meets your requirements except that you’ll have to play 19 instead of 20 matches each week.) But in case of 21 or 23 players it’s very difficult.
Send me a mail to fixtures “at” runbox.no and I’ll send you my algoritms.
I, Paul Teal, the results secretary of the Beverley Pool League, thanks Fixtureman for saving him hours of head scratching and promises to buy him a pint if he ever comes to Beverley. May your algorithms bring you and your family untold wealth and happiness.
This works perfectly fine. The teams that are opposite each other are the first team and the last team, the second team and the one before last and so on and so on. Take a look at these quite illustrations as to what I mean.
http://swweb.frih.net/opposites.gif
http://swweb.frih.net/opposites2.gif
Cheers
Steve
I still prefer to think of it as Team t and Team t + (n / 2) where n is the total number of teams, but your way is good too.
Hi,
I am trying to create a fixture list for 8 teams at a three pitch venue so 6 are playing and 2 are off at any one time.
Each team will play every other team once.
Do you have any suggestions?
Many thanks.
To Tim Luck,
Since home and away is not an issue in your problem, you can solve it by applying tables, as shown below.
First you set up table 1, by writing the club names (A, B, C, and so on) in two columns, like this:
To set up table No 2, let H stay put and rotate the other teams counter-clockwise:
Table No 3 looks like this;
There are 7 such tables for a 8-club league, since there are 7 ordinary rounds when teams meet each other once only. (If you continue creating tables, you’ll find that table 8 is identical to table 1.)
Now, to return to your problem with 3 pitches and 8 teams.
Round 1 contains the top three matches from table 1 (A v H, B v G, C v F)
Round 2 contains the last match from table 1 and the top two matches from table 2 (D v E, G v H, A v F).
Round 3 contains the last two matches from table 2 and the first match from table 3 (B v E, C v D, F v H)
And so on. The good thing about this table system is that from one table to the next, no team move more than one line up or down. This guarantees that our system will have no team appearing twice within a 3.match round.
I hope this solves your problem, Tim.
I’ve just found your generator thanks to a search on google. Brilliant! You’ve saved me, and the youth cricket league I represent, http://www.wsycl.org.uk loads of time. I just need to read through the thread and work out how I’m going to update the database but that’s not the difficult part. I’d like to publish the generator on our website http://www.itinfraco.co.uk, is there a link you would prefer me to use to give you the credit. Once again, Brilliant! regards Phil
Is there any way to randomize the fixtures. I think the fixtures are determined by the order you put the teams down in, I may be wrong. Still, an excellent generator.
Yes that’s right. Best I can suggest is entering the teams into the box in a random order. I could perhaps add a checkbox for “randomize teams” if it would be useful.
just been given job to set out fixtures for 2008/09 season 3 divs of 14 , with no guidance from last fixture sec
2 clicks of google took me here and saved me a lot of work
Well done for taking the time to sort this to save others who do it all voluntarily a ton of headaches
Brilliant.
I run an online fantasy cricket league and this has saved me a lot of time and energy.
Thanks!
I NEED TO GENERATE FIXTURES FOR 20 TEAMS WITH 5 OF THEM SHARING THE SAME VENUE CAN YOU HELP?
Sue,
with 20 teams there’ll be 38 league rounds (providing that a team meets each other team twice during the season; once home and once away). This means that your 5 teams sharing venue will have to play 5×19 = 95 home matches in all. This means an average of 2.5 home matches per round for those 5 teams. The best one can do is to arrange the fixtures such that there are never more than 3 of these teams playing at home in any league round. Then you can avoid clashed by letting the teams play at home on different days (Friday, Saturday, and Sunday for instance) during a league round.
If you use the fixtures below, with your 5 teams as A1, A2, B1, B2, and F1, then there will not be more than 3 of the 5 teams at home during any league round. (My fixture system is based on the rule that teams with the same capital letter are never at home in the same round.)
(If the table below appears gibberish, then I have to contact the site administrator to fix it. He usually does this very quickly, so please wait a day or two.)
Here are the fixtures:
Hope this will help you.
Hi,
Is there anyway from the algorithm to indicate which of the teams are the ones which will avoid each other. So for instance if I produce matches for 10 teams, how will I know which of those 10 teams will not play at home at the same time? Or is this something additional I have to work out!
Thanks
Lee
Hi Lee,
The complimentary teams feature makes sure that team n and team n+m do not play at home together (where m is half the number of teams rounded up, and n is a number less than m).
For example, in a 10-team division teams 1+6, 2+7, 3+8, 4+9 and 5+10 never play at home at the same time.
Hope that helps,
Tom
Hi Thomas
Thanks for the reponse. Just to clarify you say ‘.. and n is a number less than m’. Should that be less than or equal to as 5+10 wouldn’t meet that criteria?
Thanks
Thanks for the generator Tom, you just made my life a whole lot easier!
Hello Thomas,
I am trying to make a fixture for a 22 Team League and I have 6 Stadiums that two or more teams play at. Two of the Stadiums have 5 Teams and the other four Stadiums have 2 Teams. Is there anyway you can help me out?
Thanks
Travis,
a 22-team league means each team playing 42 matches (21 at home and 21 away). With 5 teams sharing a stadium, that stadium will have 5 x 21 = 105 matches during the season. Unless you intend to strech the season to more than 42 rounds (with some league rounds containing less than the full round of 11 matches) this means that the 5.team stadiums in average will have 105/42 = 2.5 matches per league round in average. The best you can then hope for is to avoid more than 3 matches at the same stadium in any league round.
I have a suggestion on how you can solve your problem. In the fixture list below, teams with the same capital letter are neighbour teams (never at home in the same league round). For instance team A1 is never at home when team A2 is. The same is true with teams B1 and B2, and so on.
4 stadiums with 2 teams and 2 stadiums with 5 teams make 4 x 2 + 2 x 5 = 18 teams alltogether, Since there are 22 teams in your league, I take it there are 22 – 18 = 4 teams who do not share their stadium with another team.
Now, stadium 1 (teams A1 and A2), stadium 2 (teams B1 and B2), stadium 3 (teams C1 and C2), and stadium 4 (teams D1 and D2) are the 2-team stadiums, and stadium 5 (teams E1, E2, F1, F2 and G1) and stadium 6 (teams H1, H2, I1. I2 and J1) are the 5-team stadiums.
The remaining teams (not sharing a stadium with anyone) are G2, J2, K1 and K2.
This fixture list should then solve the problem within the limitations of a strict 42-round season:
Absolutely brilliant. Just started a pool league. Priceless. Thank you.
Derek
Hi Thomas
I can only say thank you for everything.
Greetings
GOOD MORNING,
I AM WONDERING IF YOU ARE ABLE TO ASSIST IN PROVIDING INFORMATION ON HOW TO DO DRAWS FOR THE FOLLOWING YOUNG SOOCER/FOOTBALL PLAYERS :
OUR FIXTURES ARE 18 rounds –
Total of 3 clubs, Club 1 – 3 age groups, Club 2 – 4 age groups, Club 3 – 3 age groups.
Club 1 (A6 – 2 teams) – HOME & AWAY THIS AGE GROUP
Club 2 (A6 – 7 teams)
Club 3 (A6 – 5 teams)
Club 2 (AA6 – 8 teams) – HOME GAMES ONLY
Club 1 (B7 – 3 teams) – HOME & AWAY GAMES THIS AGE GROUP
Club 2 (B7 – 12 teams)
Club 3 (B7 – 6 teams)
Club 1 (C8 – 8 teams) – HOME & AWAY GAMES THIS AGE GROUP
Club 2 (C8 – 2 teams)
Club 3 (C8 – 4 teams)
Any help or information would be greatly appreciated. If you requrie further information please advise.
Regards,
Jodie – Secretary for local soccer/football club
my email client is not set to default to email you directly thru yr website so pls reply to me at squash@labrador squash.com
I have a squash centre with 8 courts and I need to do a draw for ten teams each week WITH TWO TEAMS on a bye each wek (we have 8 courts and each 2 teams playing each other use 2 courts) ie. 2 teams on 2 courts
I need to do a draw whereby two teams each week take it in turn to sit out.
Can you help?? Either by a 12 draw with 2 byes or something like that.
Thanks. Jo
Jo,
I have sent you a solution to your email address. Please let me know if you don’t receive it-
Wow, this has saved me a lot of time and effort on a new project, thanks for sharing.
Fanstastic stuff. Is there any way of converting your Java code into VB?
“Is there any way of converting your Java code into VB?” You mean automatically? Not that I know of.
It should not be much work to convert the Java by hand, convert the PHP by hand (source code link above) or you could write the VB prog from this algorithm description:
http://www.barrychessclub.org.uk/berger2001.htm
Hi Thomas. What a fast reponder you are!!! I can’t get your link to work. Maybe it’s my Internet settings. I’ll have a fiddle. Perhaps you could confirm that it’s still a live URL.
Ignore my last message……..I googled barrychessclub and got straight to it. What a dummy!!!! Must learn how to use a computer!!!! Much respect.
Im trying to create a 11 team comp. All teams will only play each other 1. I have treid all sorts of ways to make this happen but end up with on combination that doesnt fit,
Can anybody help
Cheers
Steve R
Steve – you can just use the first half of the season generated by the program above, no?
Hi Thomas,
Thanks mate it was early in the moring Aussie time and once I had a good look at the fixture generator it soved all my problems. What a great program,
Cheers
Steve R
please could you help me in sorting a formula out for us.
14 teams to play on same night 5 teams share same table.
For instance 1&2, 3&4, 5&14, 6&8, 10&11,
7, 9, 12, 13 have only one team that does not share a table can you help please.
I found what I was looking for from one of your messages but struggled to use the Generator for my 3 divisions of 8 Quoits teams in each, many pubs with 2 teams in. Do you have a program to generate league tables if results are inputted. I had one 30 years ago at University!!! Thanks for your help, Richard
Hi,
Could someone e-mail me the original algorithm description as the link at http://www.barrychessclub.org.uk/berger2001.htm seems to be down
thanks
Hi Paul
His new address is above
http://www.barrychessclub.ndo.co.uk/berger2001.htm
Hi,
I’m hoping someone can help, we have a Summer Pool League starting in May. We have 2 Divisions of 17 teams, but each team only plays the other once. There are 10 venues with 2 teams which will need to be alternated.
Thanks
Hi again
Got it sorted
Many thanks