Update: You may also want to look at the Gale Shapely (proposal) stable matching algorithm. Each group of guests ranks the rooms in their order of preference (bigger is better, perhaps), and each room ranks the groups of guests in its order of preference (less wasted space is better, perhaps). Then the two sides "propose" to each other. When it's done, the pairs are made such that no two pairs can break their "engagements" to obtain a more favorable engagement. It's quite a quite and simple algorithm. I can't remember whether the correctness still holds when the number of rooms is different than the number of guests, and I'm a little short of time right now, but it's worth looking at.
blokhead
In reply to Re: Assign guests to hotel rooms
by blokhead
in thread Assign guests to hotel rooms
by richard5mith
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |