|
-
Mar 8th, 2007, 06:11 AM
#1
Thread Starter
Junior Member
[RESOLVED] Algorithm Help Needed
I need help to figure out algorithm in vb6 for creating groups of people given the total based on some rules. The groups need to be as even as possible. The Maximum people in a group is 8. The Minimum people in a group is 6. The groups need to be as close to the Maximum as possible.
So:
If the Total = 24 the algorithm will produce 3 Groups of 8
If the Total = 21 the algorithm will produce 3 Groups of 7
(not 2 groups of 8 and 1 group of 6)
If the Total = 26 the algorithm will produce 2 Groups of 7 and 2 groups of 6
I tried and failed to implement anything that works. Any help is greatly appreciated
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|