770: All the Girls

Explain xkcd: It's 'cause you're dumb.
Jump to: navigation, search
All the Girls
You know that I'll never leave you. Not as long as she's with someone.
Title text: You know that I'll never leave you. Not as long as she's with someone.


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.[citation needed] 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.

In the title text, written in Cueball's voice, we have another compliment/qualifier pair. Cueball assures Megan that he'll never leave her—so long as some other girl is with someone. Cueball clearly has an unrequited love for another, and so really is being as unreliable and selfish as he initially appeared.

This comic is related with 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 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 could 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.


[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.


  • 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.

comment.png add a comment! ⋅ comment.png add a topic (use sparingly)! ⋅ Icons-mini-action refresh blue.gif refresh comments!


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>=@f)?[\@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... ;) 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)

You know, when I read the comic, I thought he meant the "girls" who were related to him (e.g. is mother, his grandma(s), his niece(s),etc.)

I'm not sure the explanation needs profanity such as "shitty". Sure, XKCD can often be very vulgar and profane, but I think that if the comic doesn't involve such a topic, it doesn't require that. I am still having second thoughts about editing, though (as "shitty" is actually a perfect way to describe something that is terrible). SilverTheTerribleMathematician (talk) 22:24, 8 December 2022 (UTC)

You’re right. I made an attempt to use less attention-seeking adjectives. I don’t know. —While False (museum | talk | contributions | logs | rights | printable version | page information | what links there | related changes | Google search | current time: 15:00) 22:30, 8 December 2022 (UTC)