Guys, I am stumped. It's my first post in this section because usually I don't have a problem with logic or algorithms, just coding them!

This one, however is TOTALLY beyond me.

Now, run with me for a while.

Imagine this scenario. You are running a Model Car Racing track.

30 Guys want to race their cars.
They have to do 6 races each.
There has to be 6 people in each race... AND

The grids have to be fair so that (imagning points were allocated for finishing positions) if everyone finished every race in the same position they started every race, that everyone would end up with the same points.

Difficult enough I hear you mutter BUT......

Because they need time to re-charge their cars they cannot race in consequetive races, in fact they need a gap of TWO races.

This in itself would be bad enough, but what I really need to make is a sequencer that can build this grid with the following variables

No of Car Racers (theoretical >9 and < 250)
No of races each (>3 and <11)
No of racers in each race (>3 and <20)

If ANYONE can give me ANY pointers about how I can go about this I would be eternally grateful and remember you at Christmas time!


Thank you, in advance, for ANY help or pointers in the right direction!


Pigmy