in reply to Re^7: Average Price Algorithm
in thread Average Price Algorithm

We're beginning to nest to absurdity here - feel free to out-dent any response. :-).

I did get the idea behind the use of combinations to find a brute force solution to a randomly generated distribution. Sadly, I've written such algorithms more than once (different languages),usually for test generators. Sigh.

I just thought that what you ended up doing - looking at the structure of the problem and playing around with some possibilities would get you there faster, despite the fact that I wasn't having much success at it. Given that you felt pretty strongly that there was a sub-optimal example, I felt that you had some insight into the problem that was just escaping me (and you did).

Thanks again for the great example you came up with.

Best, beth.

Replies are listed 'Best First'.
Re^9: Average Price Algorithm
by Limbic~Region (Chancellor) on Feb 03, 2009 at 14:39 UTC
    beth,
    Well, if the solution space weren't so incredibly large, I would suggest looking at a dynamic programming solution - but I have even less time to try that since it is an area I am still weak in.

    Cheers - L~R