automatic "lotjes trekken"
greg.ewing at compaq.com
Wed Nov 24 11:46:32 CET 1999
Martijn Faassen wrote:
> each time a person is drawn by someone, the program removes that program
> from everybody else's lists (if that person was in there in the first
That doesn't guarantee that everyone gets drawn, though.
You might get down to drawing for the last person and find
that there's nobody left on their list, even though there
are people remaining on other lists that have never been
I can't think of any method that wouldn't have to backtrack
under some circumstances.
But is that really a problem in practice? How big a data
set are we talking about? Unless you have a REALLY BIG
family with lots and lots of conflicts, I'd expect a
solution to be found fairly quickly in most cases, even
if theoretically it could take a long time for some
More information about the Python-list