News for hackers. Stuff that matters.
Re:Generating all permutations, combinations, and power set ... by mlpinit on Friday May 05, 2017 @01:00PM (#14274923)
An example can be helpful:

Given Set A = {1, 2, 3}

This is the power Set of A P(A) = {{}, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}} (All the subsets of A including the empty set and A itself)

3 choose 2 = 3 (If you look in the power set, you'll see that there are only 3 ways to choose 2 items out of 3)

Note that order does not matter.

There are no comments on this comment yet.