19 Oct '11 11:00>
A school is arranging a prom party. There are as many girls as there are boys. Everyone has a list or personal preferences on whom they would like to dance with, but obviously some girls and some boys are more popular than others. To avoid cat fights and ewww moments and people ending up not coming to the prom because they have no partner, the school makes the following arrangement.
1. Everyone gets together in the school gym.
2. In alphabetical order, the boys go ask girls to be his partner, in descending order of preference until they find a girl who says "yes" or end up with their current partner.
2a. If the girl asked has no partner or prefers the boy asking to her current partner, she'll say "yes" and the two become partners.
2b. If the girl asked has a partner already and prefers that partner to the boy asking her, she'll say "no" and the boy asks the next person on his list.
3. Once all boys have asked the process repeats over and over again until a time when no swapping takes place anymore.
Questions;
does this system always pair up every boy with a girl?
does it matter if the roles are reversed, that is, girls do the asking?
1. Everyone gets together in the school gym.
2. In alphabetical order, the boys go ask girls to be his partner, in descending order of preference until they find a girl who says "yes" or end up with their current partner.
2a. If the girl asked has no partner or prefers the boy asking to her current partner, she'll say "yes" and the two become partners.
2b. If the girl asked has a partner already and prefers that partner to the boy asking her, she'll say "no" and the boy asks the next person on his list.
3. Once all boys have asked the process repeats over and over again until a time when no swapping takes place anymore.
Questions;
does this system always pair up every boy with a girl?
does it matter if the roles are reversed, that is, girls do the asking?