# 770: All the Girls

 All the Girls Title text: You know that I'll never leave you. Not as long as she's with someone.

## Explanation

A young couple (Cueball and Megan) are in love. In the first panel, Cueball says he's lucky to have Megan, a perfectly fine thing to say to someone when you're in love. In the second panel, Cueball tells Megan he loves her most out of all the girls in the world, which is again a perfectly fine thing to say when you're in love. Trouble sets in, however, in the third panel, where Cueball offers his qualifying statement, that he loves Megan the most of the subset of girls who also love Cueball back.

Now, on its surface it would appear that Cueball is making a hollow statement, in that the subset of girls who love him back must be smaller than the set of all the girls in the world, and we assume, because we are nerds, that that subset is probably only a few girls in size. To be optimistic, though, presume that Cueball, due to his smooth head and sentimental heart, is loved by nearly all the girls in the world, and so his sentiment is still very sweet.

The title text, however, crushes any optimism one might have in the situation. Written in Cueball's voice, we have another compliment/qualifier pair. Cueball assures Megan that he'll never leave her—so long as she's with someone. Cueball clearly has an unrequited love for another, and so really is being as shitty as we all thought he was originally. The world can be a cruel place.

It's also most likely a reference to the stable marriage problem, which is usually stated as: Given n men and n women, can they all be married off in such a way that there is no possible "adulterous" pairing that both the man and woman would prefer over their current partner? It turns out the answer is yes, and there are even algorithms that can be used to find such a set of marriages. However, such algorithms don't usually give people their first choice, just their first choice among potential partners who prefer them to all the alternatives. The algorithms also favor either the men or the women, so one side will typically get closer to their ideal preferences than the other. Such algorithms do get in used in situations like assigning medical students to residencies (technically it's a polygamous generalization, but it's basically the same idea), in which case it's biased in favor of the medical students.

In the comic Cueball and Megan appear to be a couple arranged through a stable marriage algorithm. In most cases that would mean that they both have potential partners that they would prefer over the one they're with, and the only reason that they aren't with that person is that their love was unrequited. That leaves both of them with a certain amount of emotional baggage that most people would consider detrimental to stable marriage. In short, while a stable marriage algorithm may provide good solutions to certain matching problems, it may not be the best way to produce actual stable marriages.

## Transcript

[Cueball and Megan are standing together.]
Cueball: I'm so lucky to have you.
Cueball: I love you most out of all the girls in all the world
[They embrace.]
Cueball: who love me back.

## Trivia

• In explain xkcd lore, the blog explanation of this comic was the first time the name Cueball was used. Berg also called Megan "Cutie" but it was later found that she was referred to by name in comic.

# Discussion

The reasons why this algorithm wouldn't work so well in producing stable marriages are

• the people preferences may change (especially if they know someone better)
• people may prefer not having marriage at all (when rejected by some of their choices)

Still, it's not like there is better algorithm. -- Hkmaly (talk) 10:02, 17 April 2013 (UTC)

sub BetterThanNothing { my (@everyone,@m,@f,@o,@r,@Ps) = @_; while (my \$person = shift @everyone) { push(@m, \$person)&&next if _isMale(\$person); push(@f, \$person)&&next if _isFemale(\$person); push @o, \$person } my \$priority =(@m>[email protected])?[\@f,\@m]:[\@m,\@f]; while (@{\$priority[0]}) { push @Ps, [splice(@{\$priority[0]},rnd(@{\$priority[0]}),1), splice(@{\$priority[1]},rnd(@{\$priority[1]}),1)] } } @r = (@m,@f,@o); while (@r>1) { push @Ps, [splice(@r,rnd(@r),1), splice(@r,rnd(@r),1)] } } @r && push @Ps, [(shift @r) x 2]; return @Ps } # Totally untested Perl for when you /really/ don't care too much... ;) 31.110.88.49 04:34, 4 May 2013 (UTC)

When I read 'I love you out of all the girls who love me back,' I thought that he meant...

Rob: 'I courted a lot of females because I was looking for the best life partner, since marriage is a serious thing. You are the perfect future life partner.'
Megan: '...but what about all those girls who do not love you?'
Rob: 'Frankly, my dear, I couldn't care less. They do not love me. Why bother violating their wishes for my own?' Greyson (talk) 14:44, 28 June 2013 (UTC)