Subj : Re: efficient way of processing m combinations of n numbers in p sets To : comp.programming From : Willem Date : Tue Aug 16 2005 12:59 pm Mike wrote: ) The best analogy is to compare the calculations to a horse race with 6 ) runners. I would be varying the amount placed on each of the horses ) (by the increment) and multiplying this value by the fixed odds on each ) of the 6 sets. I wish to work through every combination of amount ) placed on each horse within the range specified (e.g. from 2 to 50 in ) increments of $0.1 or 0.1p in the above example). The calculation done ) at the end of each cycle is used to record the lowest possible "loss" ) on each combination of horse and amount placed. At the end of all the ) loops one would have recorded the best combination of money to place on ) each of the horses. So basically you want to search for the minimum on a function in 6 dimensions ? Like I said before, you don't want to brute-force that. There are just too many points to consider. You should look into search algorithms. If the function is simple enough, you could also look into an algebraic or analytical solution to your problem. SaSW, Willem -- Disclaimer: I am in no way responsible for any of the statements made in the above text. For all I know I might be drugged or something.. No I'm not paranoid. You all think I'm paranoid, don't you ! #EOT .