in reply to Re^4: Average Price Algorithm
in thread Average Price Algorithm
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Average Price Algorithm
by ELISHEVA (Prior) on Feb 02, 2009 at 21:31 UTC | |
by Limbic~Region (Chancellor) on Feb 03, 2009 at 13:32 UTC | |
by ELISHEVA (Prior) on Feb 03, 2009 at 14:34 UTC | |
by Limbic~Region (Chancellor) on Feb 03, 2009 at 14:39 UTC |