Editing 216: Romantic Drama Equation

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 23: Line 23:
 
Each straight pair needs to include one of the x males and one of the (n-x) females, so there are x(n-x) possible ways of combining one of each.  E.g., if there are n=5 people, of whom x=2 are male, then there will be 3 possible pairings involving the first male, and 3 possible pairings involving the second, yielding 2(5-2)=6 possible pairs.
 
Each straight pair needs to include one of the x males and one of the (n-x) females, so there are x(n-x) possible ways of combining one of each.  E.g., if there are n=5 people, of whom x=2 are male, then there will be 3 possible pairings involving the first male, and 3 possible pairings involving the second, yielding 2(5-2)=6 possible pairs.
  
βˆ’
Wolfram|Alpha: [https://www.wolframalpha.com/input/?i=x*%28n-x%29 x*(n-x)]
+
Wolfram|Alpha: [https://www.wolframalpha.com/input/?i=n*%28n-1%29%2F2%2Bx*%28x-n%29 n*(n-1)/2+x*(x-n)]
  
 
Each gay pair needs to include either two males or two females.  To choose two males, we can start with any of the x males and choose any of the (x-1) remaining males.  However, that counts each possible pair twice.  E.g., Adam&Steve got counted when we chose Adam first and Steve second, and again when we chose Steve first and Adam second.  To avoid double-counting the pairs, we therefore need to divide the product by 2.  So there are x(x-1)/2 possible pairs of two males.  Similarly, there are (n-x)(n-x-1)/2 possible pairings of two females. Summing these, we get the total number of possible gay pairs as [x^2 - x  +  n^2 - nx - n - xn + x^2 + x]/2.  That simplifies to [n^2 - n  +  2 x^2 - 2 xn]/2.  The left two terms can be combined together as n(n-1) and the right two terms can be combined together as -2x(n-x) or 2x(x-n) [which is negative, because x-n<0].  Since the sum of these terms was divided by 2, we get that the total number of possible gay pairs is n(n-1)/2 - x(n-x), or n(n-1)/2 + x(x-n), which is what the cartoon says.
 
Each gay pair needs to include either two males or two females.  To choose two males, we can start with any of the x males and choose any of the (x-1) remaining males.  However, that counts each possible pair twice.  E.g., Adam&Steve got counted when we chose Adam first and Steve second, and again when we chose Steve first and Adam second.  To avoid double-counting the pairs, we therefore need to divide the product by 2.  So there are x(x-1)/2 possible pairs of two males.  Similarly, there are (n-x)(n-x-1)/2 possible pairings of two females. Summing these, we get the total number of possible gay pairs as [x^2 - x  +  n^2 - nx - n - xn + x^2 + x]/2.  That simplifies to [n^2 - n  +  2 x^2 - 2 xn]/2.  The left two terms can be combined together as n(n-1) and the right two terms can be combined together as -2x(n-x) or 2x(x-n) [which is negative, because x-n<0].  Since the sum of these terms was divided by 2, we get that the total number of possible gay pairs is n(n-1)/2 - x(n-x), or n(n-1)/2 + x(x-n), which is what the cartoon says.
  
βˆ’
Wolfram|Alpha: [https://www.wolframalpha.com/input/?i=n*%28n-1%29%2F2%2Bx*%28x-n%29 n*(n-1)/2+x*(x-n)]
+
Wolfram|Alpha: [https://www.wolframalpha.com/input/?i=x*%28n-x%29 x*(n-x)]
  
 
==Transcript==
 
==Transcript==

Please note that all contributions to explain xkcd may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see explain xkcd:Copyrights for details). Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel | Editing help (opens in new window)