[mercury-users] good book question: most evenly balanced sum of permutations
Ralph Becket
rbeck at microsoft.com
Thu May 3 18:55:06 AEST 2001
> Ok, here is a good question I would like to see a program for:
> [...]
Possible heuristic: given n students and m managers, an ideal
arrangement would make it possible to allocate n/m students to
each manager. So, assume this works and use any half decent
integer knapsack problem giving each manager a knapsack of size
n/m. If this fails, increase the knapsack size by some fudge
factor and try again. Note that if k of the 26 student sets
have more than n/m members then you must special-case at least
k of the managers, allocating one of these larger-than-average
groups to each.
> I think this example will show why logic-functional programming has
> some advantages of pure functional programs.
I doubt it. Non-determinism doesn't let you pass any information back
about why a particular search path led to a dead end. Almost all
decent optimization strategies rely on being able to do this (read up
on CSPs).
- Ralph
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list