News for hackers. Stuff that matters.
Re:Generating all permutations, combinations, and power set ... by daenz on Friday May 05, 2017 @03:08PM (#14276015)
I came at this from the perspective of the Binomial theorem:

(x + y)^n = sum{k=0,n} (n choose k) x^(n-k) y^k

And since a powerset is:

sum{k=0,n} (n choose k)

The way we can turn the first equation into a powerset is by setting x=1 and y=1, hence:

2^n = sum{k=0,n} (n choose k)

There are no comments on this comment yet.