Skip to content

Instantly share code, notes, and snippets.

@primaryobjects
Created October 13, 2015 15:44
Show Gist options
  • Save primaryobjects/63d485e68f7e50d73bfa to your computer and use it in GitHub Desktop.
Save primaryobjects/63d485e68f7e50d73bfa to your computer and use it in GitHub Desktop.
n choose k
n choose k
n! / k!(n - k)!
How many pairs in: x,y,a,b,c,d,e,f
8C2 = 8! / 2! * (8 - 2)! = 40320 / (2 * 6!) = 40320 / (2 * 720) = 40320 / 1440 = 28
xy,xa,xb,xc,xd,xe,xf
ya,yb,yc,yd,ye,yf
ab,ac,ad,ae,af
bc,bd,be,bf
cd,ce,cf
de,df
ef
https://www.google.com/webhp?sourceid=chrome-instant#q=8%20choose%202
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment