Now assuming you don't have any bugs in your code and GrandFather used it correctly, it can be shown that it does not always produce optimal results. Update: To give you an idea of how I was going to find such a scenario - see Re: Permutation of groups (and the root thread).40 units at value of 1 10 units at value of 2 10 units at value of 4 60 units total with a value of 100 and an average of 1 + 2/3 Problem: Divide into 2 groups of 30 Group A & B both have 30 units with exactly 1.67 (1 + 2/3) 20 units of 1 5 units of 2 5 units of 4
Cheers - L~R
In reply to Re^5: Average Price Algorithm
by Limbic~Region
in thread Average Price Algorithm
by camelcom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |