## 0216: "Romantic Drama Equation"

This forum is for the individual discussion thread that goes with each new comic.

Moderators: Moderators General, Prelates, Magistrates

TonyD
Posts: 17
Joined: Mon Jan 29, 2007 5:05 am UTC

### 0216: "Romantic Drama Equation"

Romantic Drama Equation

Is it just me or is the equation for straight pairings incorrect? It shouldn't be divided by two. The equation for gay pairings is the total number of pairings minus the number of straight ones, so the straight number should just be x(n-x). There's no need to divide by two because you don't double count -- the woman can't be chosen from the male group and vice versa. There are x ways to choose a male, and then there are n-x ways to choose a female, but this doesn't involve any double counting.

Another way to look at it is that the number of gay pairings plus the number of straight pairings should be equal to the total number of pairings (which is n(n-1)/2), but that's not the case as written.

Peshmerga
Posts: 2061
Joined: Wed Oct 04, 2006 1:56 am UTC
Contact:
I much rathered life when being gay was unacceptable.

That is, in a time before I was even sperm.
i hurd u liek mudkips???

ohki
Posts: 187
Joined: Wed Aug 23, 2006 9:27 am UTC
Location: San Luis Obispo, California
Contact:
Peshmerga wrote:I much rathered life when being gay was unacceptable.

That is, in a time before I was even sperm.

1) Your mastery of grammar awes me.
2) Don't go back too far, it becomes acceptable again.
But it raining and me peeing on your foot are NOT mutually exclusive.
"Isn't arrogance measured in nano-Dijkstra's?"- Alan Kay

beard0
Posts: 21
Joined: Wed Jan 17, 2007 5:17 am UTC
Location: Ottawa
Contact:

### Re: "Romantic Drama Equation" discussion

TonyD wrote:Is it just me or is the equation for straight pairings incorrect?

Nope, not just you. n(n-1) is guaranteed to be even, so dividing by two is possible (and also, for other reasons, correct) x(n-x) has no such guarantee. Take for example the case where there are 2 cast members, one male; There should be 1 pairing possible, not half a pairing.
Who has been making grilled cheese sandwiches with the defibrillator paddles?
-Delores Herbig

beard0
Posts: 21
Joined: Wed Jan 17, 2007 5:17 am UTC
Location: Ottawa
Contact:
Peshmerga wrote:I much rathered life when being gay was unacceptable.

I'm amazed that comics of this intelligent a calibre would appeal to someone stupid enough to be a homophobe.
Who has been making grilled cheese sandwiches with the defibrillator paddles?

-Delores Herbig

TonyD
Posts: 17
Joined: Mon Jan 29, 2007 5:05 am UTC

### Re: "Romantic Drama Equation" discussion

beard0 wrote:Nope, not just you. n(n-1) is guaranteed to be even, so dividing by two is possible (and also, for other reasons, correct) x(n-x) has no such guarantee.

Ah, another nice point.

break314dancer
Posts: 3
Joined: Mon Jan 29, 2007 6:09 am UTC
beard0 wrote:
Peshmerga wrote:I much rathered life when being gay was unacceptable.

I'm amazed that comics of this intelligent a calibre would appeal to someone stupid enough to be a homophobe.

You totally just made my day.

xxrobot
Posts: 1
Joined: Wed Dec 20, 2006 11:44 pm UTC
Location: Las Vegas
Contact:
This is equation is so incredibly wrong.

Everyone knows that gay people are incredible sluts and if person B's hotness is greater than or equal to person A's there is a 100% chance of a hook up. (unless there is some sort of STD or ridiculously small penis involved)

ps. I'm gay this is a fact.

beard0
Posts: 21
Joined: Wed Jan 17, 2007 5:17 am UTC
Location: Ottawa
Contact:
xxrobot wrote:Everyone knows that gay people are incredible sluts and if person B's hotness is greater than or equal to person A's there is a 100% chance of a hook up.

Assuming this to be true, the arbitrary nature of assigning person A and B makes the equation (for gay couples) perfect - in the equation all possible gay couples are counted, completely disregarding personality, etc.
Who has been making grilled cheese sandwiches with the defibrillator paddles?

-Delores Herbig

Verysillyman
"Do me! Do me!"
Posts: 1442
Joined: Sat Aug 19, 2006 11:25 am UTC
Location: Drinks Cabinet.
Contact:
whoa whoa whoa, all you new people, whos names I'm not even reading, please introduce yourselves in the introduction thread. Else you might get deleted because we think you're a bot. We're pretty paranoid about that around here. So yeah, post in the introduction thread or you'll get introduction threats.

As for Pesh being homophobic, I read it as "less to think about when a guy comes up and says hi" rather than "I hate faggots". Apologies if I misread you Pesh I think homosexuallity is morally wrong, so if you did mean you hate faggots that's cool too.

Dadada... I've totally posted too much today. Don't I have a life? Ah yes! I remember now, my phone is broken so I can't contact half the people I would do stuff with. I guess there'll be no straight or gay pairing for me tonight.

TonyD
Posts: 17
Joined: Mon Jan 29, 2007 5:05 am UTC
Verysillyman wrote:whoa whoa whoa, all you new people, whos names I'm not even reading, please introduce yourselves in the introduction thread. Else you might get deleted because we think you're a bot. We're pretty paranoid about that around here. So yeah, post in the introduction thread or you'll get introduction threats.

What kind of bots are you worried about around here? Bots that criticize the combinatoric prowess of web-comic authors?

bitwiseshiftleft
Posts: 295
Joined: Tue Jan 09, 2007 9:07 am UTC
Location: Stanford
Contact:
I definitely prefer straight TV shows: in a straight TV show, you can find the best pairing using net flows, but if there are homosexuals around, it suddenly requires maximal matching algorithms...

Verysillyman
"Do me! Do me!"
Posts: 1442
Joined: Sat Aug 19, 2006 11:25 am UTC
Location: Drinks Cabinet.
Contact:
Yup :p exactly those ones. You wouldn't believe how often we get spambots that come in saying "this guy doesn't know what he's on about, click for videos of how gays really pair up". Or something.

Fleshpiston
Posts: 37
Joined: Thu Jul 13, 2006 9:38 am UTC
Location: Florida
I am also not a bot, just a fan of the comic who has not posted in months.

It is disappointing to see xkcd make a combinatorial mistake, but we all know that it is uncharacteristic of him, and he will fix it. After all, xckd did get the graph correct, even with the mistake.

For all n, given a 50/50 split, straight pairings dominate gay pairings. The width of the interval of (x/n) space for which straight pairings dominate is decreasing in n, but at a relatively slow rate O(n^-1/2). The graph does a fine job of illustrating the point that even for large casts (say 100), there are many proportions of males for which most pairings are straight (roughly 10% of the x/n space). However, it is not unreasonable to think that these proportions of males are ex-ante more likely to occur.

Exercise for the reader: Assuming each cast member is 50% likely to be male, and each cast member's gender is an independent draw, what is the probability there are more straight pairings than gay ones as a function of n?

TonyD
Posts: 17
Joined: Mon Jan 29, 2007 5:05 am UTC
Already fixed, I see. Nice.

Gordon
Dr. Banana
Posts: 3521
Joined: Mon Jan 08, 2007 6:51 am UTC
The straight equation is fine now, but shouldn't the gay one be

[n(n-1)]/2 - x(x-n) ?

TonyD wrote:The equation for gay pairings is the total number of pairings minus the number of straight ones

As it stands the total number of gay pairings is the total number of pairings plus the number of straight pairings.

Meaux_Pas wrote:
RealGrouchy wrote:I still remember the time when Gordon left. I still wake up in the middle of the night crying and screaming his name.
I do that too, but for an entirely different reason.
RealGrouchy wrote:
Gordon wrote:How long have I been asleep?!
Our daughter is in high school now.

beard0
Posts: 21
Joined: Wed Jan 17, 2007 5:17 am UTC
Location: Ottawa
Contact:
Gordon wrote:The straight equation is fine now, but shouldn't the gay one be

[n(n-1)]/2 - x(x-n) ?

Pay closer attention. The number x-n will be negative (or zero). All's well as it stands.
Who has been making grilled cheese sandwiches with the defibrillator paddles?

-Delores Herbig

Gordon
Dr. Banana
Posts: 3521
Joined: Mon Jan 08, 2007 6:51 am UTC
Paying closer attention is for people who suck!

Ya, I feel like an idiot now.
Meaux_Pas wrote:
RealGrouchy wrote:I still remember the time when Gordon left. I still wake up in the middle of the night crying and screaming his name.
I do that too, but for an entirely different reason.
RealGrouchy wrote:
Gordon wrote:How long have I been asleep?!
Our daughter is in high school now.

Fleshpiston
Posts: 37
Joined: Thu Jul 13, 2006 9:38 am UTC
Location: Florida
Gordon wrote:The straight equation is fine now, but shouldn't the gay one be

[n(n-1)]/2 - x(x-n) ?

TonyD wrote:The equation for gay pairings is the total number of pairings minus the number of straight ones

As it stands the total number of gay pairings is the total number of pairings plus the number of straight pairings.

Nope. For the gay pairings: you may not have noticed that the order is reversed inside the parantheses, which means the whole thing is multiplied by -1, which means you really are subtracting the number of straight pairings from the total number.

beard0
Posts: 21
Joined: Wed Jan 17, 2007 5:17 am UTC
Location: Ottawa
Contact:
10 points to Fleshpiston for being so on the ball.
Who has been making grilled cheese sandwiches with the defibrillator paddles?

-Delores Herbig

Oort
Posts: 522
Joined: Fri Sep 29, 2006 10:18 pm UTC
Guys and gals, I need your help. I'm trying to find the point of intersection of the two graphs. That is, what percentage of cast members must be of the same gender so that either way, there would be the same number of pairings.

rwald
Posts: 153
Joined: Mon Jan 29, 2007 7:14 am UTC
Contact:
Am I the only one who didn't like the equation for gay relationships and thus needed to work it out from first principles with m and f as the # of male and female relationships, respectively?

TonyD
Posts: 17
Joined: Mon Jan 29, 2007 5:05 am UTC
EDIT: Whoops.
Last edited by TonyD on Mon Jan 29, 2007 8:50 am UTC, edited 1 time in total.

TonyD
Posts: 17
Joined: Mon Jan 29, 2007 5:05 am UTC
EDIT: Huh?
Last edited by TonyD on Mon Jan 29, 2007 8:51 am UTC, edited 1 time in total.

TonyD
Posts: 17
Joined: Mon Jan 29, 2007 5:05 am UTC
EDIT: I'm an idiot.
Last edited by TonyD on Mon Jan 29, 2007 8:51 am UTC, edited 1 time in total.

TonyD
Posts: 17
Joined: Mon Jan 29, 2007 5:05 am UTC
Okay, here's my true (?) final answer in the form of a LaTeX document:

Code: Select all

\documentclass{article} \usepackage{amsmath} \begin{document} \noindent Let $n$ be the number of cast members, and define    $$x=\left\lceil\frac{1}{2}\left(n-\sqrt{n}\right)\right\rceil+\left\lfloor\frac{\left\lfloor\frac{1}{2}\left(n-\sqrt{n}\right)\right\rfloor}{\frac{1}{2}\left(n-\sqrt{n}\right)}\right\rfloor$$   $$y=\left\lfloor\frac{1}{2}\left(n+\sqrt{n}\right)\right\rfloor-\left\lfloor\frac{\left\lfloor\frac{1}{2}\left(n+\sqrt{n}\right)\right\rfloor}{\frac{1}{2}\left(n+\sqrt{n}\right)}\right\rfloor$$Then the probability that there are more straight pairings than gay ones is the following quantity:    $$p=\left(\frac{1}{2}\right)^{n}\sum_{j=x}^{y}\binom{n}{j}.$$ \end{document}

The nasty stuff in the definitions of x and y is just to test whether the repeated quantity is an integer, and if so add (or subract) one.

It's been awhile since I did this sort of math. Those of you playing along at home can probably tell.

ohki
Posts: 187
Joined: Wed Aug 23, 2006 9:27 am UTC
Location: San Luis Obispo, California
Contact:
Oort wrote:Guys and gals, I need your help. I'm trying to find the point of intersection of the two graphs. That is, what percentage of cast members must be of the same gender so that either way, there would be the same number of pairings.

I get the sneaking feeling that as n -> infinity, that percentage approaches 50% But I'm not sure why I think this

Afterthought: Here's TonyD's code in a more forum friendly format:

'course, this all operates under the assumption that sexual preference is mutually exclusive. Damn those bisexuals for breaking our graphs!
But it raining and me peeing on your foot are NOT mutually exclusive.
"Isn't arrogance measured in nano-Dijkstra's?"- Alan Kay

Verysillyman
"Do me! Do me!"
Posts: 1442
Joined: Sat Aug 19, 2006 11:25 am UTC
Location: Drinks Cabinet.
Contact:
Muwahahahahaha! Your math will never capture me!

Gordon
Dr. Banana
Posts: 3521
Joined: Mon Jan 08, 2007 6:51 am UTC
/me throws a 'poka ball' (poke ball? I'm not really into pokemon.) at VSM

edit: damn that didn't work either
Last edited by Gordon on Mon Jan 29, 2007 10:01 am UTC, edited 1 time in total.
Meaux_Pas wrote:
RealGrouchy wrote:I still remember the time when Gordon left. I still wake up in the middle of the night crying and screaming his name.
I do that too, but for an entirely different reason.
RealGrouchy wrote:
Gordon wrote:How long have I been asleep?!
Our daughter is in high school now.

Kin
Posts: 143
Joined: Thu Jan 04, 2007 11:54 am UTC
Peshmerga wrote:I much rathered life when being gay was unacceptable.

That is, in a time before I was even sperm.

You were never sperm..unless..perhaps, well. Yes you were never sperm. In anycase, you wish for church to rule all?

Unfortunetly I must put in my weak post on account my amazing equations are not comparable to your tweakings. Good read though.

Kin
Posts: 143
Joined: Thu Jan 04, 2007 11:54 am UTC
Kin wrote:
Peshmerga wrote:I much rathered life when being gay was unacceptable.

That is, in a time before I was even sperm.

You were never sperm..unless..perhaps, well. Yes you were never sperm. In anycase, you wish for church to rule all?

Unfortunetly I must put in my weak post on account my amazing equations are not comparable to your tweakings. Good read though.

Edit:/hands Gordon a *Master* Pokeball[Code:]You should know only this works, at least without up down side side b a[/code]

Iluvatar
Posts: 143
Joined: Wed Jan 24, 2007 2:19 pm UTC
I don't watch much TV myself, but as far as I was aware, some gays in any given show will experiment with going straight. By the bisexual way of looking at things, that gives us... I dunno, I'll try thinking about it when I wake up.

Oh, and I am totally a bot.
"Don't you see?!"

"Get out of my bed, Randall, I'm trying to sleep!"

Your results may vary.

Strilanc
Posts: 646
Joined: Fri Dec 08, 2006 7:18 am UTC
I spent way too long trying to figure out how these came out to the correct numbers. That + (x-n) is tricky.
Don't pay attention to this signature, it's contradictory.

beinsane
Posts: 42
Joined: Wed Sep 27, 2006 4:41 am UTC
There are always n(n-1) possible pairings. Everyone's potentially bi. [1]

References
1. Any slashfic-writing fangirl.
Hello, this is bein, and I pronounce "bein" as "bein".

Vaniver
Posts: 9422
Joined: Fri Oct 13, 2006 2:12 am UTC
This is equation is so incredibly wrong.

Everyone knows that gay people are incredible sluts and if person B's hotness is greater than or equal to person A's there is a 100% chance of a hook up. (unless there is some sort of STD or ridiculously small penis involved)

ps. I'm gay this is a fact.
Well, some of us are conservative enough that we *gasp* form exclusive relationships.

Strilanc
Posts: 646
Joined: Fri Dec 08, 2006 7:18 am UTC
If we're talking soap opera class shows, then chances are every characters loves a bunch of the other characters which may or may not love them. Therefore we have a directed graph with n(n-1) possible edges.

So we can have any of 2^(n(n-1)) possible relationship sets.
Don't pay attention to this signature, it's contradictory.

MrBawn
Posts: 56
Joined: Thu Sep 28, 2006 7:52 pm UTC
This comic leaves out bisexuals, which always ticks me off. But since we have number of males as a variable and total cast size as a constant, the graph wouldn't be very interesting (just a horizontal line).

thefiddler
The Fora's Prophetess
Posts: 4041
Joined: Thu Nov 16, 2006 3:07 am UTC
Location: The-middle-of-bumfuck-nowhere
Verysillyman wrote:Dadada... I've totally posted too much today. Don't I have a life? Ah yes! I remember now, my phone is broken so I can't contact half the people I would do stuff with. I guess there'll be no straight or gay pairing for me tonight.

You can never post too much!
Hrm... you should go fix your phone, though... broken phones are quite upsetting, I assume (it's never happened to me).

As for the comic:
I can't contribute anything! It made me smile? But I hate graphs.

Skatche
Posts: 6
Joined: Mon Jan 29, 2007 5:17 pm UTC
Location: Toronto
Contact:
MrBawn wrote:This comic leaves out bisexuals, which always ticks me off. But since we have number of males as a variable and total cast size as a constant, the graph wouldn't be very interesting (just a horizontal line).

On the contrary: the formulae and graph have nothing to do with the respective sexual orientations of the show's characters. They only tell you how many ways you can pair people heterosexually or homosexually. This still allows for, say, the gay man seducing the guy who says he's straight but is really just confused about his own bisexuality, and finally abandons his inhibitions, giving everything to this dark and beautiful man with long hair and taut muscles in a night of unbridled passion, bucking and

ohki
Posts: 187
Joined: Wed Aug 23, 2006 9:27 am UTC
Location: San Luis Obispo, California
Contact:
MrBawn wrote:This comic leaves out bisexuals, which always ticks me off. But since we have number of males as a variable and total cast size as a constant, the graph wouldn't be very interesting (just a horizontal line).

Bisexual pairings = n(n-1)/2 Right? Same as all pairings.

Now, what would be interesting is to attempt to feed this graph statistics about the relative populations of each preference.
But it raining and me peeing on your foot are NOT mutually exclusive.
"Isn't arrogance measured in nano-Dijkstra's?"- Alan Kay