Getting Combinations: Calculating a Binomial Coefficient
Sunday, February 24th, 2008I came across this problem on the DigitalPoint forums the other day. How can we write a script to calculate the total number of random combinations in a set (i.e. the binomial coefficient), and how can we generate a list of these combinations?
Today, we’ll tackle the first part. We’ll start with a quick primer on math - what is a binomial coefficient? Then, we’ll look into the most efficient way to calculate that and get the total number of possible combinations.
(more…)