> I am considering writer (yet another...) football management simulation, one of the stumbling blocks being how to generate the set of fixtures. There must be a
>
> Say, for example, there were 8 teams in a division, first week would be:
>
> (Home team no. v Away team no.)
well, in total you have n!/(a!*(n-a)!) possible combinations, what you can do is to build all the
different combinations possible, storing them in some array, and then for each team choose 1 of
the 20 possible fixtures at random, making sure it wasn't selected by any previous fixture. that
way, you'll get a more realistic spread of fixtures since they're based on chance and that means
that one fixture can be selected more than once, as it should be.