Combinative mathematics - yes pretty difficult - I am aware of a league table setup that uses it to calculate who plays who.
I got code from this lad called Dev Avish who I think is a Access MVP. I put together a small database and posted an example of it on here
http://www.access-programmers.co.uk/forums/showthread.php?t=105677
I just had a bash at altering it to see if I could get 170 teams into it..
The idea I had was that you could substitute the teams for names of students and it would produce a league where everyone played everyone else over 169 days. So everyone would appear to have 169 matches. By taking blocks of 5 matches starting from the top of the fixture list you would group 170 people into groups of 10.
Now this is where it gets sketchy. I thought that week 2 or day 2 games would be a separate set of 85 games with people playing different people and you could make up a new block of 5 matches.
The idea that the substituted individual students would have been randomised as if they were teams such that every individual student/player played every other individual over the league period but there was never an overlap of people having to play more than one person on the same day or fixture period. So for you the first 85 games would have been a clean group of 17 groups of 10people in what would equate to the first period you are interested in and the second 85 games would be the next set of 17 groups for the next period you are interested in. Of course the coding also works out the random groups for the next 167 periods!
Given that everyone in a 170 team league would play everyone else such that they would have to have 169 games it would take 169 days/student periods at one game a day or 169 weeks for everyone to have been in a pairing with everyone else.
Of course this randomises students for one vs another student and I can't figure out whether this would also randomise students for block group of 5 games or groups of 10 students. Looking down it though I suspect to all intensive purposes it may well do. Certainly the iterative procedure getting through all the different combinations looks like it does the job.
Well went through it and for a start several things started happening.
In my original explanation I thought that there was no upper limit on the number of teams it could put through a league. Sorry but that turns out to be wrong. There was one limit of 50 placed on a parameter and also other variables had to be changed to type long rather than integer.
I got it as far as calculating a league for 98 teams...
However when I pushed to 100 it fell over say
with the following error
run time error '9'
subscript out of range
and then the debugger took me to the following line
rstFixtures.Fields("Player2") = TeamNames(Player2)
Don't have time to figure it out at the moment..
But if anyone knows an easy way to solve this please tell me.
Mark